I used to use Evernote for this but it wasn't quite working because of constant context switching and lack of spaced repetition.
So I wrote open source program called Dnote [0] and have been use it every day for the last year to store my learning. To minimize distraction, it works as browser extensions, cli, and IDE plugin. And I automated the spaced repetition by writing a cron job to send me digests every Friday.