Post it on Stackoverflow. I can't even count how many times I found myself in a situation where I had no idea what was going, googled and found the answer on SO/SE written by myself. Sometimes as recent as two years ago, sometimes a decade ago.
Definitely documenting works even if you never refer to it again. Just the process of writing it up helps it stick. I like to put it on the internal company wiki if it's too specific but Stack Overflow sounds like a good idea for general topics.