Author Archive
GPG Key Transition Statement 2010
So, to make the Debian keyring maintainers happier people, I’ve created a new 4096 bit key. Below you’ll find a transition statement signed with both the new and my previous key. Incidentally, I’ve also revoked my first (1024 bit) key which I had transitioned away from a year ago. —–BEGIN PGP SIGNED MESSAGE—– Hash: SHA256 [...]
Triggers in MySQL
DELIMITER $$ CREATE TRIGGER messages_ins_recipientuser BEFORE INSERT ON messages FOR EACH ROW BEGIN SET NEW.recipient_user_id := (SELECT users.id FROM users WHERE users.mobile=NEW.recipient_mobile ORDER BY id ASC LIMIT 1); END; $$ delimiter ; Run this in the MySQL prompt; MySQL Administrator (MySQL Query Browser) won’t take it. To see all the database’s triggers: SHOW TRIGGERS; Other [...]
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 [...]
Debious – A dubious Debian packaging GUI
Just some little (unfinished) concept mockup. Seeing that much of it still ends up as a “text box with syntax highlighting” it’d probably make sense to implement it as a gedit plugin. Balsamiq source XML Just some little (unfinished) concept mockup. Seeing that much of it still ends up as a "text box with syntax [...]
My dot files (Tips and Tricks for Bash & co.)
.bashrc # If not running interactively, don’t do anything [ -z "$PS1" ] && return # don’t put duplicate lines in the history and ignore same sucessive entries. export HISTCONTROL=ignoreboth # make the history longer HISTFILESIZE=5000 # append to the history file, don’t overwrite it shopt -s histappend # check the window size after each [...]






