Miscellaneous scripts and snippets