Some snippets written by myself or from internet