Misc Code Snippets I wrote