A few useful snippets