Terminal Oops: Resume a Stopped Process in OSX, Linux, or UNIX

June 20, 2012

Have you ever accidentally suspended or stopped a process in your shell? In UNIX, Linux, and Mac OSX it is easy enough to do. An accidental hit to CTRL-z will suspend a program, returning a message like this:

    [1]+  Stopped                 top

The message above says that the process that was stopped...

Pronto.js: How ConsumerSearch's Mobile API Server is Driven by Node.js

June 20, 2012

I was thrilled to read the story at Mobile Drupal about how ConsumerSearch is using Pronto.js to expose their huge Drupal content to their mobile application.

Pronto.js is designed to be a high performance asynchronous application framework that makes it simple to chain together components to build...

Connection Sharing with CURL in PHP: How to re-use HTTP connections to knock 70% off REST network time.

June 18, 2012

The PHP CURL library is the most robust library for working with HTTP (and other protocols) from within PHP. As a maintainer of the HPCloud-PHP library, which makes extensive use of REST services, I've been tinkering around with ways of speeding up REST interactions.

What I've found is a way to cut...

Drupal and HP Cloud: DrupalEasy Interview

May 19, 2012

At DrupalCon Denver, Ryan Price of DrupalEasy interviewed me about what it means to be a Developer Experience engineer at HP Cloud. We talked about the new HP Cloud PHP bindings, our new HP Cloud Drupal module, and the recent release of my Drupal 7 Multi-Site book/ebook. As always, hanging around...

Updated Instructions for Installing Drupal Vagrant on Windows 7

May 19, 2012

VirtualBox, Vagrant, Ruby, and Git have all gone through upgrades (major and minor) since I wrote the chapter on installing them in Multi-Site Drupal. While this hasn't made much of a difference for Mac and Linux/UNIX, Windows 7 support is now much better.

Here is a guide for installing the Multi...

QueryPath in Practice: Migrating ICANN.org to Drupal

May 5, 2012

The Four Kitchens blog is running a story on how they used QueryPath and the Migrate module to migrate over 10,000 pages of content, in many different languages, into Drupal. I love to hear stories about the creative ways developers use QueryPath to accomplish complex tasks. A huge thanks to Mark...

The Architect and the Organism: What Plato and Aristotle have to say about Drupal

March 21, 2012

The video and slides for my DrupalCon Denver 2012 session are already available.

The slides and video can be found at the official site. Kudos to the DrupalCon Denver organizers, who are in the midst of running a fantastic conference.

PHP Stream Filters: Compress, transform, and transcode on the fly.

February 28, 2012

Your task: In PHP code, open a file compressed with BZ2, convert its contents from one character set to another, convert the entire contents to uppercase, run ROT-13 over it, and then write the output to another file. And do it as efficiently as possible.

Oh, and do it without any loops. Just for...

PHP Mode Strings with Stat (and Stream Wrappers)

February 15, 2012

This article explains how to work with mode strings in stream wrappers, and in low-level calls to PHP's stat() functions. It will be helpful to those writing stream wrappers that must respond to functions like:

  • isdir/isfile
  • file_exists
  • isreadable/iswritable
  • stat

Stream wrappers must supply the...

Removing trailing whitespace with VIM regular expressions

February 4, 2012

While cleaning up old sourcecode that I wrote with TextMate, I'm finding many cases where TextMate left trailing whitespace. To keep with current coding conventions, I am removing these extra spaces.

Here's a quick way to do this in VIM:

:%s/\s\\+$//g

This tells VIM to search the entire document...