random code snippets from my tutorials.