Blogs

Installing and using Drush Make

Posted on May 2nd, 2010 by David Luhman and tagged , .

Drush and Drush Make are two great utilities for folks who use Drupal.

Here's how to setup and use Drush Make :

Create a ~/.drush directory and download Drush Make to there :


  $ cd
  $ mkdir .drush
  $ cd .drush
  $ wget http://ftp.drupal.org/files/projects/drush_make-6.x-2.0-beta6.tar.gz
  $ tar -xvzf drush_make-6.x-2.0-beta6.tar.gz
  $ cd /var/www/yoursite
  $ cat makeYourWebSite.txt
     core = 7.x 
     projects[] = drupal 
  $ drush make makeYourWebSite.txt

How to mount Windows (SMB) shares on Ubuntu Linux

Posted on April 30th, 2010 by David Luhman and tagged , .

Here's how to mount SMB (Windows) shares on an Ubuntu system. Most of this assumes you're the root user. You may have to prepend 'sudo' to many commands depending on your situation.

First, you may have to install the following :

  • # apt-get install smbfs smbclient

You can do a simple interactive connect with this :

  • # smbclient \\YOUR_SERVER\myusername-U myusername -W YOUR_WORKGROUP

This will at least show the SMB share is reachable.

Next, to enable auto-mounting on system start, you'll want to add one of the following to your /etc/fstab file :

DrupalCon SF 2010 Day Two Notes

Posted on April 20th, 2010 by David Luhman and tagged .

Batch vs. Queue : An API Smackdown

Drupal 7 will use OO for cache and queue systems.

- createQueue
- createItem
- claimItem
- releaseItem

SystemQueue => MySQL
MemoryQueue => in-memory one request
BatchQueue extends SystemQueue

Use Drush for cron-based batch operations

Use queue to queue for later

I think the "Batch" API is somewhat misnamed. It's intent is to "batch up" and provide feedback DURING AN INTERACTIVE SESSION (ex. upgrading a site). To really batch big jobs, use the Queue API.

DrupalCon SF 2010 Day One Notes

Posted on April 19th, 2010 by David Luhman and tagged .

Unconference by Seth Cohn - Views Default Args

Grab Views default arguments by setting variables with Context module.

http://drupal.org/project/views_arg_context

College's price has nothing to do with college's cost

Posted on April 10th, 2010 by David Luhman and tagged .

I ran across the following article titled 'Why Top Colleges Squeeze You Dry' :
http://online.wsj.com/article/SB2000142405270230401740457516573097962917...

Here's a key entry which indicates how colleges set tuition prices :

Themes for Drupal 7

Posted on April 9th, 2010 by David Luhman and tagged .

Drupal 7 (D7) hasn't been released yet, but there already are some themes compatible with D7. Here are some of them :

  • Forest Floor - OK - kind of gray
  • Dingus - Mostly CSS - no custom PHP
  • mulpo - Clean and interesting
  • Moleskine - Nice and rustic - derived from Basic theme
  • NineSixty - Kind of plain
  • AD Blueprint - Looks OK - clean
  • AD The Morning After - Clean, spartan look
  • Abessive - Unique, but a little too stark
  • Basic - Based on Zen theme. Allows you to use Skinr module and SASS CSS.

NoSQL Data Stores - Mongo

Posted on April 8th, 2010 by David Luhman and tagged , , , .

I stumbled across Mongo the other day. MongoDB is one of the non-relational (NoSQL http://en.wikipedia.org/wiki/Nosql) data stores along the lines of CouchDB.

If you're interested, here are some links to MongoDB :
http://www.mongodb.org/
http://try.mongodb.org/
http://www.mongodb.org/display/DOCS/PHP+Language+Center

The try.mongodb.org link is especially useful. It provides a JavaScript shell and a tutorial which allows you to try MongoDB easily.

MySQL won't start - a couple fixes

Posted on April 8th, 2010 by David Luhman and tagged .

Let's say you get this message while Linux is booting :

   Starting MySQL database server mysqld     [fail]

One possible cause may be a network setting in /etc/mysql/my.cnf. Look for the following :


    # Instead of skip-networking the default is now to listen only on
    # localhost which is more compatible and is not less secure.
    bind-address    = 127.0.0.1

Change the bind address to your static IP address if necessary.

Start MySQL with

    $ sudo /etc/init.d/mysql start

Git : fatal: unable to write new_index file

Posted on April 5th, 2010 by David Luhman and tagged .

Let's say you try the following command :

$ git status
fatal: unable to write new_index file

One cause of this that I found was that my file system had run out of space. Finding large directories with something like the following helped clean up some log files that had run wild :

$ du -h / | grep ^[0-9.]*G

Using a custom Firefox profile when running Selenium tests

Posted on March 26th, 2010 by David Luhman and tagged .

If you use Selenium for testing web interfaces, you'll probably want to create a custom Firefox profile for use by Selenium. To me, the main reasons for this are to provide more screen real estate (remove toolbars etc.) and to speed up browser loading.

But it's a little tricky to get Selenium to find your saved profile.

Here's a great link for this :

Here are the highlights, for a Linux/Ubuntu user :

Start Firefox from the command line and create and save your custom profile :