I'm developing this app that makes it really easy to write tutorials with code examples from github:
http://that-s-the-way-you-do-it.herokuapp.com
You can just grab a git file URL, paste it in the text editor and your code will be imported right away!
(other urls imported now are: lines, line interval, commits and pull requests)
The result is something like this:
http://that-s-the-way-you-do-it.herokuapp.com/docs/how-to-use-github-omniauth-at-your-rails-app
The editor also has markdown support :).
It's open source and you can deploy it yourself. Check the code here:
https://github.com/coopera/that-s-the-way-you-do-it
You don't need to login to write a tutorial (but it'll only grab code from public repos).
Do you like the idea? I'm running a research on this, so I'd be very thankful if you can provide me some feedback (and, yeah, you can be really harsh!)
https://www.youtube.com/watch?v=FwQW4TzelFw