Making sql-sync Safer

Drush aliases can be a huge timesaver when you’re working back-and-forth between your local dev environment and a remote server. You can clear caches remotely as easily as adding @remote to your usual drush cc all command. Or use the sql-cli command to log into the remote server’s MySQL instance without leaving the comfort of your local command prompt. My favorite is updating my local database to what’s on the remote server: drush sql-sync @remote @local (followed by a coffee break).

Adding Custom Mobile Protocols to Drupal

With the proliferation of mobile apps and Web sites on mobile devices, developers are often asked to integrate the two. Mobile apps can register a custom protocol with the mobile OS so that a link on a Web page such as <a href=”myapp://openapp”>Open in MyApp</a> will open MyApp on the user’s phone. An early example of this was to have links on phone numbers actually call the number on mobile phones.

Migrating a CCK Field into the Node Title Field

On a recent migration project I came across an odd error:

Illegal offset type in isset or empty File ...snip...\sites\all\modules\pathauto\, line 182

I was using Migrate 2.5 to move date from a Drupal 6 project into Drupal 7 and had already migrated several content types without having problems with my pathauto settings.

Google Transit Directions got Lost

When recently trying to plan a trip to the airport, I realized that Google has over-optimized their transit directions. I assume much of this is downstream of the Google Maps upgrade announced at the recent IO conference. Or perhaps part of it is that Google’s dogfooders – their own employees using their products in real-world scenarios – don’t take public transit that much.

How to Setup a Domain

I get asked this question a lot: What’s the best way to setup a new domain? Unfortunately, the answer has dozens of variations based on what sort of traffic you’re expecting, what kind of Web site you’re running, and what software is running that site. But there is one recommendation that has remained the same for several years: divide or be conquered – put your domain registration, Web hosting, and email hosting with three different companies.

A Drupal Developer’s Setup on Windows

UPDATE: 3/23/2013: In general, these instructions still work for Windows 8. While some of the UI aspects have changed, the basic directions are the same. One exception is when downloading PuTTy. Since it’s an unsigned .exe file, Windows will boldly claim that “Windows protected your PC.” Click More info followed by Run anyways and you’re on your way.

UPDATE: 4/22/2012: A few more scattered updates, plus a new section on setting up XDebug on Aptana for super-easy  debugger config.