Some snippets I once wrote