This miscellaneous code snippets are simple enough to be Googled, but are nice to have laying around.