Over on Github I’ve open sourced a little library for generating and verifying product registration keys. I needed this for a couple of my projects, and I’ve made it available with hopes of saving anyone else from having to write one!

The tool takes a someone’s name and a salt (which is your product id in most cases) and spits out a short upper case string of letters and numbers (minus confusing ones like o/0 1/l).

The goals of this tool are simple: to generate a short easily entered registration code without the need for an internet connection or the need for cryptographic libraries which may not be commonly available.

As a result the code the tool generates is by no means cryptographically secure, but since serious crackers can just bypass the reg-key check altogether using commonly available tools, this is really just to keep honest people honest!

Hopefully it’ll be useful to you someone…

» Visit the project page on Github…

The Simple Download Manager is another itch scratch to open source software project tale, basically I needed a simple way to serve files for download and keep some statistics. So, like a good open source citizen I’ve made it available under the GPL, hopefully it’ll save someone some time!

Usage is very simple; clone the git repository onto your web server, put your downloads in the “downloads” directory, and describe them with a manifest in “products”, e.g.


DownloadManager::registerProduct(
new Product(array (
'productid' => 'ExampleProduct12345',
'name' => 'Example',
'description' => 'An example download',
'file' => 'downloads/example.zip',
'tags' => 'download, example',

'gacode' => 'GA-12345',
'icon' => 'gfx/download.gif',
))
);

Have fun!

» Visit the project page on Github…

I have previously written about using Git to add revision history to existing rsync backups. Having performed a number of configuration changes and system upgrades recently, I have found another use of Git which has proven invaluable.

It’s a fairly obvious hack, but it turns out that turning selected configuration directories (for example /etc/apache2/ and /etc/exim4/) into in situ Git repositories is a very handy thing to do.

The revision log you get in a Git repo gives you a very handy place to note down the reasons behind a certain configuration change. This provides a very handy historical context for a change, meaning you’re less likely to remove something odd that turns out later on to have been important.

Having configuration under version control also means that even if you do accidentally remove or change something that later causes problems you can easily roll them back.

Another handy feature is the ability to easily branch, so you can very quickly experiment with some wild configuration settings and very quickly revert them to the original working configuration should they turn out to be problematic or if you run out of time to complete them.

So, give it a try!