Code

  • Linux Disk Space Paradox

    July 31, 2013

    Our server crashed the other day because the disk was full. I quickly discovered a rogue bandwidth log file not getting cleaned up was to blame, so I deleted it. Strangely, running df after deleting the file showed that 100% of the disk was still in use even though I had gotten rid of the... Read More

  • A Better Behaved Infinite Scroll

    June 12, 2013

    After several days of trying to integrate the Infinite Scroll plugin into the Simply Recipes mobile site, I finally came up with a solution that works well.

  • So You Want To Learn To Code?

    February 27, 2013

    The best place to start is by realizing that coding is fundamentally about solving problems. It's not about variables or subroutines or even the code itself. Those are just the means to an end. Coding is about identifying problems and finding the best way solve those problems.

  • WordPress Publish Confirmation

    December 19, 2012

    I don’t typically like confirmation dialog boxes. In nearly all cases, an undo button is the better choice than a confirmation dialog. However, because of our existing WordPress set up, publishing an entry sets off a whole chain of events involving RSS feed readers, caches and a CDN that make it difficult to undo. So... Read More

  • CloudApp Screenshots… Uncluttered

    October 24, 2012

    I like CloudApp. I use it every day for sharing information with other people. I especially like how it can autoupload screenshots I take on my Mac. Trouble is, it makes a real mess of my desktop.

  • My 10 Most Useful Shell Commands

    August 22, 2012

    I use most of these commands on a regular basis, so I thought I'd pass them along in the hope that others find them useful.

  • Cheap Site Backups Using Amazon S3

    March 29, 2012

    I created a PHP script that archives a specific folder and database then uploads the archives to an Amazon S3 bucket for safe keeping. Here's how it works, hopefully it can help you get your backups in order.

  • Easy Audio Output Toggle Using AppleScript, Growl and Quicksilver

    December 30, 2008

    Necessity is the mother of invention, and with Ethan crying frequently, I needed a quick and easy way to switch between my headphones and desktop speakers. So I put together this simple AppleScript that toggles between two audio output sources and assigned it to a Quicksilver hotkey. Here it is in a nutshell.