drewish


blog index

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

Rainboduino + FTDI FT232RL cable

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:

Read more →

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 →

Text mode Cover Flow  09 January 2009

textTunes

My side project has been writing some code to display data from iTunes on my Heathkit H19 terminal.

Read more →

Street View for the Historical Society  28 December 2008

I was walking the dog around my the block at my grandma’s house and started thinking that genre of historical cityscape photos that you’d find at a city or state’s historical society. I find it absolutely fascinating to be able to peer into a snapshot of a place and time. It’s both exciting and a bit scary to think how new technologies/databases like Google’s Street View will probably be this period’s equivalent. The exciting part is that the record would be exponentially more complete but the scary part is how fragile it is. You can’t just drop a server off at the Historical Society and wish them well… even if you could it’s hard to believe that any computerized record is going to last longer than silver based negatives and prints.

Read more →

Getting PHP + GD + PostgreSQL working on OSX 10.5 (aka recompiling everything)  24 December 2008

Finding myself in need of a PostgreSQL server to test some patches for Drupal core, I’ve decided to do a follow up to my guide to getting PHP + GD + MySQL installed on OS X.

Read more →

HOWTO: Views 2 Relationships  19 December 2008

After getting sick of closing issues in various module’s issue queues that boiled down to people not knowing how to use Views 2’s relationship feature I decided to make a screencast explaining it:

Read more →

Obama/Biden vs. McCain/Palin: November is coming  23 September 2008

My mom forwarded this to me. I usually don’t get too many of this type of email from other relatives since they’re mostly republican–and I tend to reply back fact checking them. But it’s interesting to me to see this type of stuff flying around from the dem side… and I agree with it completely.

Read more →