I always prefer snippets, as I easily see the code and the explanation about it together without context change (change tabs vs just a bit of scroll). But if the snippet is too long, I like a gist/repo.
EDIT: Also, you are writting for other, so you want to make it easy for them to read it. And only then you want to make it easy for you to update your content (something that occurs way less times). It seems like a premature microptimization ;)
I always prefer snippets, as I easily see the code and the explanation about it together without context change (change tabs vs just a bit of scroll). But if the snippet is too long, I like a gist/repo.
EDIT: Also, you are writting for other, so you want to make it easy for them to read it. And only then you want to make it easy for you to update your content (something that occurs way less times). It seems like a premature microptimization ;)
That's a great perspective!. I was writing some post and thought about it. I think it is a micro-optimization. 😉