The manual contains usage examples. For compiling them, just use them in a suited script.