Useful code snippets and setup cofigurations