Commonly used code snippets for ease of reference.