“LESSjs will obsolete css”

August 31st, 2010

http://fadeyev.net/2010/06/19/lessjs-will-obsolete-css

How to import a module programmatically

August 30th, 2010

To import a module where you have the module name as a string and want to do it programmatically:

X = __import__(‘X’)

X is now a variable that can be used in your code:

e.g. getattr(X, method)

converting ssl cert from PKCS#12 to PEM

July 28th, 2010

$ openssl pkcs12 -in /path/to/my/cert.p12 -out /pathto/my/cert.pem

If you get “X509_check_private_key:key values mismatch” e.g. with stunnel, then try adding -clcerts

$ openssl pkcs12 -clcerts -in /path/to/my/cert.p12 -out /pathto/my/cert.pem

HOWTO install couchdb 0.11.0 on Ubuntu Lucid from source

June 30th, 2010

Only 0.10.0 available in ubuntu package, but I want 0.11.0. Here goes…

Get couchdb tarball from apache couchdb website.

sudo apt-get install xulrunner-dev libicu-dev libcurl4-openssl-dev erlang-dev help2man

You need xulrunner-dev as a replacement for the Mozilla spidermonkey which used to conflict with Mozilla and is not available in Lucid.

Then follow the rest of the instructions at http://wiki.apache.org/couchdb/Installing_on_Ubuntu (look for the section called “Ubuntu 10.04″)

iPad annoyances

June 8th, 2010

1. Can’t use certificate authentication with Safari, so there are some websites I can’t access that I can from my laptop.

2. iPhone-native apps don’t rotate into landscape mode.

3. Book selection in iBooks is paltry.

“host not found” on nxclient connect to nxserver

April 9th, 2010

Cause: my user couldn’t read /etc/hosts

things I hate: companies who won’t let you leave them

September 7th, 2009

Anyone thinking of signing up with Be Internet: be warned, it’s easier to join them than to leave.

I’m currently having a fight with them because they insist the only way you can close an account with them and stop paying them money, is by phoning a telephone number and giving lots of security information including your date of birth.

Not allowed to do it via their own “secure” account system…

Not allowed to do it in writing…

Not allowed to do it by them phoning me on the mobile phone number I’d given them X years ago…

Apparently even after the telephone line is disconnected tomorrow, they *still* won’t accept that I really, really don’t want their service any more.

This is going to be interesting!

Extracting files from rpm

August 27th, 2009

rpm2cpio .rpm | cpio -vid (or -vt just to view contents)

OSX MacPorts install of postgres

June 23rd, 2009

Following their instructions to initialise the database, you get a complaing about /dev/null.

This is because the default postgres user is installed with a shell of /dev/null.

To change it, forget all the Unix stuff you know about administering users and do this


sudo dscl . -change /Users/postgres UserShell /dev/null /bin/sh

Or if you want to check first, check that the user exists

sudo dscl . -list /Users UniqueID

And then check the postgres user

sudo dscl . read /users/postgres

perl: warning: Setting locale failed.

June 11th, 2009

Needed to do this:


sudo locale-gen en_GB.UTF-8
sudo dpkg-reconfigure locales