Archive for the ‘Uncategorized’ Category

CakePHP: Using a model inside a component

Apparently this is discouraged for some mysterious reason, but if like me you want to have nice code where models are used from within components (so you don’t have to clutter up your controllers or shell classes), here’s how: $this->ModelName = ClassRegistry::init(‘ModelName’); Source For example, you can place it like this at the start of […]

Command-line script to edit PDF file meta-data

I’ve just written a little wrapper around pdftk to simplify the modification of PDF file meta-data. It extracts the existing meta-data, opens it in your favourite editor, writes it back to the original PDF and finally removes the temporary files it generated. #! /bin/sh if [ ! -f “$1” ] then echo “Usage: $0” exit […]

Book Review: The Heart Mender

Some time ago I found out about Book Sneeze, a service by Thomas Nelson offering free books in exchange for reviewing them on your blog (the reviews aren’t required to be positive). I decided to give it a try, and a couple days after signing up my account got approved. The website shows a changing selection of […]

GPG key signing with CAFF

I’ve finally got around to doing my homework from FOSDEM and since I’m sure before long I’ll have forgotten again how all this works, let me write it down here. 1. Installing CAFF (CA – Fire and Forget) Easy. sudo aptitude install signing-party 2. Configuring CAFF For this we open up ~/.caffrc and write in […]

Introduction to Zeitgeist 0.2’s API

So now that Zeitgeist 0.2.0 is out I’ve thought I’d write down some examples of how to use it’s API to get information from it. Please keep in mind that this is a development version and the API isn’t guaranteed to be stable (and I can tell you now, many of them will change). If […]

 
Skip to toolbar