++ some useful snippets