Mini/micro articles and quick hacks

Display mode

Back to Home

Wildcard Email Addresses with Self-Hosted Postfix (Feb 2024)
I've found it very useful over the years to be able to receive email to any address at my domain. This is a quick look at how Postfix can be configured to provide routing for wildcard addresses, so it all lands in the same inbox.
That Time My Encrypted RAID Failed (May 2015)
A short postmortem of the time my LUKS volume failed, what I did wrong at the time, and how I got the data back.
svn branchlist (Oct 2012)
Ever run into a codebase with multiple Subversion repositories, where you just wanted to find out which branch they were all on without tediously cd'ing into each working copy?
How Emulators Work (Jun 2012)
At deviantART's technology team meetup in France ('Breadlands 2012'), I gave a short Ignite talk distilling the first three articles in the Gameboy Emulation in Javascript. The slides from that talk are now available here.
linecolor.pl for irssi (Feb 2010)
The irssi IRC client has a built-in capability for rule-based highlighting of nicknames, but does not allow for the full line to be highlighted; nor does irssi allow arbitrary colours to be set against different rules. linecolor is an extension script for irssi that allows for this functionality to be added, in an intuitive fashion.
NotPDO for PHP (Feb 2009)
It doesn't happen very often, but it does happen: you're deploying a PDO-based PHP application to a shared host, and they don't run PDO. If you can't reconfigure the server, you can always wrap MySQL to look like PDO; that's what NotPDO does.
CRC32 Calculation in 256 Bytes (Feb 2009)
A quick look at a 256-byte program capable of calculating the CRC32 checksum of a file.
Countries and Dependent Territories (Dec 2008)
If you've ever needed to know which country is at UTC+3.5 (it's Iran), or who is responsible for administrating the Western Sahara (that's Morocco), it's all in here. List is also available in SQL, for such situations as a 'select your country' dropdown on an e-commerce Website.
Making PDO Look Like ADODB (Apr 2008)
Many developers who come to PHP from ASP bring their experience of using ActiveX Data Objects (ADO) to interface with databases; however, existing solutions to allow ADO usage from PHP suffer from performance and support issues. Using PHP's native Data Objects (PDO) library can be infeasible for legacy applications: with the code provided here, PDO can be used with no redevelopment of the application.
Virus Detection with Message Digests (Sep 2006)
One day in 2006, I was set a short challenge: write an article of around 500 words on the topic of MD5 digests. This article was the result: an explanation of what it means when a computer generates a digest of a message, and a look at where message digests can be used. In particular, focus is given to automatic generation of digests for executable files, and how this can be used to detect possible manipulations of the files by viruses.