Code snippets for various uses