Random snippets of useful and not-so-useful code.