Snippet storage?

Hi all,

I’m new to GitHub and really all coding beyond HTML. I am trying to teach myself enough JavaScript to use D3. I am struggling to keep track of the code snippets I’ve used to do certain (simple!) actions. Is there a tool on Github for storing things like this? I’m looking for a way to keep the 4 lines to do a calculation and the 5 lines to code a circle the way I want it.

I’ve been just listing them on a .txt file and keep it open while I work. Wondering if there was a more grown-up way of doing things.



Yes, there is, it’s called Gist. You can use it to store, share, comment on and fork other people’s snippets of code. It’s a great way to keep track of these things and there are even add ons for some text editors that allow you to easily include them in the code as you’re writing.