Some C snippets I felt like writing. Quality will vary.