some useful snippets in my code life