Mario. Web Developer, Snowboarding Addict

Blog

Not so much a blog as an infrequently updated collection of tidbits I run across from time to time. Hope you find something helpful here.

Was migrating a few sites between Drupal-7.7 and Drupal-7.10 platforms and came across the following PHP notice:

Notice: Undefined index: distribution_name in drupal_install_profile_distribution_name() (line 202 of /srv/drupal-7.10/includes/install.inc).

Git reset submodules 09 Dec 2011

I'm managing a large number of git submodules on a particular project, and found their working directories often became dirty in various ways (i.e. file perms changing with an Aegir deployment).

I wanted to get notifications for mentions/messages on a remotely screened session of Irssi, and came across a cool notify.io irssi script.

The Aegir handbook has a handy tip on injecting into site vhosts. It's pretty straightforward to extend this to work for specific sites.

You can add extra display modes using hook_entity_info_alter.

Say you have a custom module 'myModule' and want to add a custom view to the node entity:

Drupal 6/7 make use of the PECL uploadprogress library for upload progress. This is how to install it.

I finally upgraded my 3 year old Macbook Pro this week, and decided against migrating files from the old one to start fresh, only moving things as I found I needed them.

Seeing as I generally have all my video related files in the Movies folder, I thought it would be better to rename this to Video, but it turns out you can't just change the name of System Folders by hitting return in Finder.

It appears that if you're trying to get nodes by type in your Drupal module or theme (i.e. not on a page, in which case you should use Views) then a quick and easy way to get them is through an SQL query.

A little while ago I found some additions for Textmate that I reckon have made it just that much more pleasant to use.

Firebug's console.log() often breaks Javascript for users without Firebug (or a Webkit based browser), and seeing how much we love chaining with jQuery, there are two simple things you can do to make logging in both better.