I use Google Drive Docs as my note taking tool and it is awesome since I can use it when I am offline, but I have a problem: I can't add source code in documents there. I know this question is answered here, but Google documents have changed a lot and the solution given there is not working properly. Can anybody suggest a suitable way for it?
This method has the added benefit of being available while offline, which -- from your question -- also seems to be important to you.
In Vim, use the ":TOhtml" command. (In gVim, use "Convert to HTML", on the Syntax menu.)
In Emacs, use htmlize.