Category Archives: Technical Notes

Installing the pg gem on OS X with MacPorts

The pg gem, used to connect ruby programs to the PostgreSQL server, is notoriously difficult to install on OS X. I’m using MacPorts and have PostgreSQL 9 installed. Here’s what I did: jacques$ sudo bash root$ export PATH=/opt/local/lib/postgresql90/bin:${PATH} root$ env … Continue reading

Posted in Technical Notes | Leave a comment

Fixing blogger imports into Wordpress

I’ve been expanding my Ozblogistan network and have run into an interesting bug. When importing from Google’s blogspot, all post titles and post content wind up with the ‘>’ symbol prepended. This is annoying. If you have database access, the … Continue reading

Posted in Technical Notes | Leave a comment

More Mongrel2 / OS X notes

Having a bit of spare time this Sunday, I’m continuing to work through the Mongrel2 manual (it’s good, as such things go). There are still places where Mac OS X does not behave according to the expectations of the manual … Continue reading

Posted in Technical Notes | Leave a comment

Building Mongrel2 on OS X with MacPorts

The documentation says “make all install” — use “make macports install” instead. That’s what I get for not reading the damn makefile first. Update: To build the procer utility mentioned in the Mongrel2 manual, a quick-and-dirty hack is to copy … Continue reading

Posted in Technical Notes | Leave a comment

An XCache ‘gotcha’

XCache is a PHP opcode cacher. This is good and well as it speeds up pageloads by removing PHP parsing overhead. On the downside, you must remember to restart your PHP processes after changing PHP files, as XCache doesn’t seem … Continue reading

Posted in Technical Notes | Leave a comment

Brian’s Latest Comments doesn’t scale.

Or, to be fair, MySQL 3.x is rubbish. But you knew that already. Most of the blogs on the Ozblogistan network use BLC. Recently, Larvatus Prodeo came on board and expected it to work for them too. But it simply … Continue reading

Posted in Technical Notes | 13 Comments

More tweaking for Ozblogistan

I did some minor optimisations on Ozblogistan last weekend. I have HTTP compression enabled on the webserver (gzip, to be precise). I found out through the excellent YSlow plugin that not everything was being compressed. HTML was compressed, but not … Continue reading

Posted in Technical Notes | Leave a comment

An nginx/PHP gotcha

If you are allowing larger-than-default files to be uploaded to an nginx server with PHP FCGI, you need to alter both the php.ini and the nginx.conf. In particular, for nginx.conf, you need to use the client_max_body_size directive to set the … Continue reading

Posted in Technical Notes | Leave a comment

Automated backups for Ozblogistan

It’s a cliche amongst nerds that everyone preaches automated backups, and very few have it. Partly because it’s surprisingly fiddly to set up “right”. And even fiddlier to do restoration testing. Still, one thing at a time. I’ve just now … Continue reading

Posted in Technical Notes | Leave a comment

Moving a database from Wordpress to Wordpress Mu

Some rough notes, before I forgot what I did. mysqldump –default-character-set=”latin1″ -elt database_name | sed ‘s/wp_/wp_{new blogs id}_/’ > database_name.sql –default-character-set is required because of MySQL’s unrestrained enthusiasm for fucking up encoding by assuming everything is encoded in utf8. Would … Continue reading

Posted in Technical Notes | 1 Comment