Snippets of useful code.