Mine is currently a mess. I have my web components store at a personal account in jsfiddle, some of my common server config files I let sit in my github gists, speaking of which there's where I also keep cheatheets, documentations and some javascript snippets. Finally I have a few sublime autofill snippets in my personal pc at home.
I'd like to know what do people around usually use to manage their code snippets and why? Or do people actually do it? I only started getting in the habit since I've noticed I've been doing a lot of repetitive stuff.
Depends on the size of the snippet.. will it fit in a tweet, tweet it... Otherwise, gist and tweet the link... Larger, github repo... YMMV, but good bad or indifferent, if rather my snippets be out there... If they're useful in the future I can find them again.
I use Git. Every code I write is versioned and pushed to some remote host like github or gitlab. If I need anything, I just go there and fetch from some other project I wrote before.
As for editor snippets, you can probably check if your editor supports backups of your configurations, like Atom or VSCode does.
I host a local gitlab which has a "snippets" section that is quite easy to use/maintain. :)
Pretty low-fi: mostly Dropbox.
js-notes.js). I also share a few things in Bitbucket Snippets, although it's not my primary system - just a way to share.
I use ATOM snippets for very important ones
It's been evolving from simple emails to myself, to then notes and snippet programs, to end up in a mix of gists mainly ..
I also tried to make code snippets in SublimeText, when the task at hand allowed, but changing between home and work computers was a pain by the time ..
I've been writing markup and code since the mid-1990s and I have never found cheatsheets or snippet palettes particularly useful. If I use a piece of code often enough that it's worth adding to a snippet palette in my editor, I likely already have it memorised anyway. If I don't remember what a function is called or what its signature is supposed to be, a quick google is about as fast as digging up a cheatsheet that may already be outdated and irrelevant.
It's generally a bad idea to keep code around for copy-pasting -- it either means you are planning to write code you don't actually understand, or that you're repeating yourself too much and should consider refactoring or using better abstractions.
That said, sometimes I run into code snippets on the web that I want to keep or I write snippets of code that are fairly specific but might be useful in the future but are hard to memorise or look up. I recommend using GitHub gists for these. Additionally I try to use browser bookmarks to keep track of documentation or libraries I might find useful but would likely forget about otherwise.
There are two exceptions however: I keep a file around with the exact docker commands I used to create each container because these can be a bit intricate and annoying to deduce after the fact; and I stick helpful bash commands in my .bash_aliases file (which I prune every now and then to get rid of stuff that seemed useful at the time but I never really ended up using).
If you are using some product of JetBrains, can use the live templates
Thomas Langdon
Software Developer at Olstom LTD
We use 3cols.com because it is the only thing we have found that lets you store all your content in the cloud and access it from either the web or an app without being painfully slow to load and look through snippets (ahem gists ahem). Another plus is that it lets you share the 'boards' with other developers so our entire dev team is now reading from the same sheet