Ask HN: What do you use to share snippets of code with colleagues?
Hello all,
It's been a while I ask myself this question :
How can I efficiently share snippets and/or examples of code with my colleagues ? I haven't encountered any good solution so far, but I must not be the only one to have this problem ?
My requirements would be : - versionning - tagging - private by default
Of course, there is always the possibility to host it in a git repository, but then, you miss the tagging which I think is quite important. The goal is to be able to share by just giving a link/pointer but also to be able to easily discover if a colleague has already solved your problem on a different project.
So, are there any software/service for that ? (It can be self-hosted if necesary)
8 comments
[ 2.8 ms ] story [ 36.8 ms ] threadExmeple : #js (more or less obvious from the filetype) #googlemapsapi for a snippet which would show how to use the google maps API
Then you would have a page with a tag cloud which allows to easily filter all the snippets (or that could be used in search).
Quite close to the way tagging works in stackoverflow for instance
https://gist.github.com/
Gist is a simple way to share snippets and pastes with others. All gists are Git repositories, so they are automatically versioned, forkable and usable from Git.
You get two buttons, "create secret gist" and "create public gist".
You can put your tag in the description. Gists are searchable.