smart/useful/complicated code snippets, for convenient reference