I have been looking for a solution to embed source snippets within posts for a while yet. Finally I decided to use Gists from GitHub. All gists are git repositories, so they can simply be forked. As an example I want to share with you our startup script for WSO2 products, which I use for test purposes. I think the script is not that complex, so I don't explain it in detail. If you have any questions regarding the script, please drop me a line.