Display source code to LaTEX documents

Last week, i started writing documentation for my current project. I started working with Pages but eventually i ended up writing my document with LaTEX (i guess some habbits are difficult to stop...).

Here's a useful link how you can add code snippets to LaTeX documents.