I'm playing with this right now. It allows you to save snippets with cells set to various types (text, markdown, code w/language), and stores them as JSON objects in text files. Thus, you can mix Markdown and code snippets, copy them out, tag them, and even has a presentation mode. It has a few missing features, but shows promise.