I've tried a few of tools mentioned in this thread. cacher.io (former GistBox) is best so far. Its free plan covers all the useful features and it's integrated with gist.github.com.
I'm a dev with a strong *NIX sysadmin background. I've been programming for 20+ years, started with IRC scripts, C, Python, PHP, Ruby/Rails, Node/JS, Go and Elxir. Full time on Ruby,Elixir and Rust.
I use a git repo, I organize snippets in folders named with a given language or topic (it depends). Sometimes are source code files, other times they are in markdown format so that they can be easily read/exported.
I can then share it on github
As of today, it’s the cheapest/easiest way I’ve found.
My code snippets are stored as blog posts in my personal space of our corporate Confluence instance.
Together with the keyword searches of Firefox (or custom search engines for Chrome) this works really well. E.g. I just need to type in "myspace bash parameters" in the address bar. This triggers the Solr based search in Confluence, filtered by my personal space. Then I can click on one of the first entries and copy over a template for the parameter handling into a shell script.
P.S.: The "Add block post" dialog can be stored as a bookmark.
I don't, really. Any code that is useful I've either written myself for a project (in which case I check the source for the project), written myself for a one-shot script or similar (in which case I save the script) or found elsewhere (in which case I bookmark the elsewhere).
Anything too small to justify the effort of those, I'll probably just type out each time, not worth the interruption in flow to do otherwise.
Latest comments (41)
boostnote.io/ is free to use. It looks like cacher.io and snippetlabs but it's free :) Moreover, backed by great community.
I've tried a few of tools mentioned in this thread. cacher.io (former GistBox) is best so far. Its free plan covers all the useful features and it's integrated with gist.github.com.
Winword
I use a git repo, I organize snippets in folders named with a given language or topic (it depends). Sometimes are source code files, other times they are in markdown format so that they can be easily read/exported.
I can then share it on github
As of today, it’s the cheapest/easiest way I’ve found.
My code snippets are stored as blog posts in my personal space of our corporate Confluence instance.
Together with the keyword searches of Firefox (or custom search engines for Chrome) this works really well. E.g. I just need to type in "myspace bash parameters" in the address bar. This triggers the Solr based search in Confluence, filtered by my personal space. Then I can click on one of the first entries and copy over a template for the parameter handling into a shell script.
P.S.: The "Add block post" dialog can be stored as a bookmark.
In my ~/projects folder, as a Gist, or on GitHub.
Here is my most recent snippet:
github.com/nrobinson2000/particle-...
Often my snippets turn into full projects.
Anything I find super-useful gets tossed into my public GitHub.
I don't, really. Any code that is useful I've either written myself for a project (in which case I check the source for the project), written myself for a one-shot script or similar (in which case I save the script) or found elsewhere (in which case I bookmark the elsewhere).
Anything too small to justify the effort of those, I'll probably just type out each time, not worth the interruption in flow to do otherwise.
gnome-gpaste is amazingly useful during the day - and doesn't require using the mouse.
Otherwise all code stays in projects:
To copy and paste? Nowhere, I always go back to the main source code. If I need a snippet many times in a row, my clipboard manager can handle it.
For sharing I use pastebin.com because I like the classics 😁