I use Webstorm and other JetBrains editors as my IDEs. They have a Scratch Files feature where I put random notes and snippets. If the snippet is useful, I'll turn it into a live template. I also include a git-ignored file named todos in my projects, so that I can add // TODO: comments there that will be checked at commit time.