Here are some examples of simple code to port into projects and larger pieces.