I just use Emacs and Markdown. It's like my permanent memory, and it's public: https://github.com/azer/notebook
I even got a pull request once about a note on parenting :) Specifically about coding, the best thing is, I can quickly open a note within my editor.
For example, I forget some rules about Bash all the time. Instead of Googling the same thing over and over, I open the bash programming notes with a few key presses, check the rule, close the note. This happens really fast as I use Emacs for both coding and taking notes.