Miscellaneous ideas and code snippets