This is the reason I started my blog.
How I accomplish it. I open an MD file the second I run into any resistance while effecting a task. When I am done, I commit it.
I have more unpublished than published, but I have documented a lot of weird things, and silly mistakes!