my (old) c++ snippets