Some useful snippets of C code.