A selection of code snippets that I regularly use, or might find useful.