various code snippets I want to keep for reference.