Some nifty snippets of code.