blog index
Using memcached with stock OS X Apache 08 December 2010
I wanted to use memcached but didn’t want to compile all the dependencies by hand and wanted to use the stock version of Apache that ships with OS X so I cobbled together the following instructions.
Read more →New Mac Mini 08 November 2010
I just picked up a new Mac mini servers to replace the one that’s been my desktop machine for over 2 years. The new server version has two 500GB hard drives (as opposed to the single 120GB drive I’ve been working with) but no optical drive. That seemed like a bit of an inconvenience since I just bought a MacBook Air and it doesn’t have an optical drive either so I picked up a SuperDrive that I can use with either.
Read more →Using Mercurial and SVN 19 August 2010
At Sony we’re looking for a distributed version control system to replace Subversion—primarily Git and Mercurial. I’m very familiar with Git but hadn’t done much with Mercurial so it seemed like a good idea to use it for a couple of weeks and learn the quirks. Since I’m stuck using Subversion I decided to see if it would be feasible to use Mercurial as a “super client” working locally then pushing changes back to svn. A little Googling turned up two candidates hgsvn and hgsubversion. hgsubversion extends the commands pushing and pulling changes, giving a more native experience, so it seemed like the best choice for learning the system.
Read more →MAMP + memcache = drilling a screw in my eye 20 July 2010
Here’s yet another blog post to document something so stupid that I hope to never do it again, but know I will. I spent the better part of the afternoon trying to get the PECL memcache extension working with the PHP 5.2 part of a MAMP installation and finally managed to get it working.
Read more →iOS 4 is a total waste of time on iPhone 3G 23 June 2010
After two days of trying to use OS 4 on my iPhone 3G I’m sad to report that it’s a very un-Apple like release. It’s slower, it breaks a bunch of games and doesn’t offer any compelling features. I’d go as far as to say they should probably have only released it for the iPhone 3GS.
Read more →Correctly accessing CCK fields in SQL queries 04 June 2010
Twice today I’ve had to deal with writing a SQL query that needed data in a CCK field. The naive approach is to just look at the table and field names and plug them into your query:
Read more →Using cURL and the host header to bypass a load balancer 29 March 2010
Users are reporting that when they load the site they’re occasionally seeing stale content. We have multiple app servers behind a load balancer so my suspicion is that one server isn’t expiring content correctly so depending on which one you get you’ll see different data. To test this I want to write a simple script to connect to each server save the results and then compare them for differences.
Read more →Using logrotate and drush for daily Drupal backups 06 March 2010
If you’ve got Drush installed—and you really should—you can use the following recipe to setup a backup system that will maintain daily backups for the last two weeks. Most of the logrotate configuration is based on a Wikibooks book that I found.
Read more →Flash CS4 Gotchas 03 November 2009
I’ve been banging my head against Flash for the last few days and started trying to document a few things.
Read more →Drupal 6 on OS X 10.6 12 September 2009
Running Drupal on OS X 10.5 was a pretty huge pain in the ass. It’s much easier in in 10.6 since it includes PHP 5.3 with GD and the PDO out of the box. And Drupal 6.14 resolves the PHP 5.3 incompatibilities.
Read more →Rainboduino programming via FTDI FT232RL cable 09 September 2009
I bought one of the Rainbowduinos a while back but hadn’t tried programming. Turns out it’s a bit of a trick. They (sort of) document the process with a Seeedunio but I don’t have that particular board one so I decided to try to figure out how to do it using the FTDI FT232RL cable I’d bought from adafruit industries.
Read more →Drupal performance tuning on MediaTemple 31 August 2009
First off make sure you’ve got the root account enabled and the developer tools enabled.
Read more →Comparing a node's values with its previous version on save 24 August 2009
There was a great question on Drupal developers mailing list the other day—one to which I’ve “rediscovered” the solution to a few times—so I wanted to make sure that everyone was aware of it.
Read more →Simple loop to update nodes 21 August 2009
For some reason I find myself rewriting this little bit of code every time I need to update a bunch of nodes on a site. Going to post it here to save myself some time. Be aware that this might time out if you’ve got a large number of nodes, designed for up to a couple hundred nodes:
Read more →Bicycle inflation? 20 August 2009
The NY Times—as part of their longtime fixation on Portland—has an article arguing that the price of bicycles is inflated in Portland. There definitely aren’t easy deals there, but having now seen the $200 junk bikes that are for sale on the street in Williamsburg I think they are exaggerating. I’m pretty sure that a if they got a ZipCar and drove out to Beaverton they’d find all kinds of deals on jenky bikes.
Read more →Simple Arduino serial communications 06 June 2009
I’ve been playing around with some Arduino stuff I bought from adafruit industries and needed to rough out some serial communications between the Arduino and Processing. This just sets the Arduino up to echo characters back at the Processing sketch which buffers a line of output and displays the last line from the serial port.
Read more →Creating a CCK field in hook_install() 02 June 2009
My rule of thumb for deciding what to post on this blog has been to document anything I’ve spent more than an hour trying to figure out. Today I’ve got a good one for anyone trying to create CCK fields as part of a module’s installation process.
Read more →Everything is an update 19 March 2009
For some work projects we’ve started making all the configuration changes via update functions. These get checked into version control and from there deployed to the staging site for testing, and then eventually deployed on the production site. The nice thing about update functions is that you can test it on staging and be sure that exactly the same changes will occur on the production site.
Read more →A busy week... or two... 08 February 2009
The total number of hours I’ve worked in the last seven days has been hovering
between 60 and 70. We’re on a deadline so compromised must be made and corners
must be cut. Sections of the site are basically large JPGs with image maps of
links on top. It looks good but when I peek into .tpl.php my head
swims and I feel faint at the though of the kludges in place. It’s lead to some
fun exchanges:
Themeing a specific CCK field 06 February 2009
I wasted more time that I want to admit do trying to figure this out.
Read more →