This is a short post for those new to coding (Arduino, CSS, HTML, Python, Javascript, Ruby, etc). Lately, I’ve been reactivating my dormant coding skills. As I complete projects and tutorials, I often like to save my code, or snippets from the code, for future reference and recall.
To quickly access my code snippets, I use GitHub’s Gist service. Where GitHub is used for large coding projects (this blog is hosted on GitHub pages), Gist is the perfect tool to capture and share simple code snippets to archive language syntax, program flow or technique.
Gist provides tools to archive and share your code snippets either as a link or as an embedded object. As an example, below is an embedded Gist.
As you can see, the embedded Gist includes language based color syntax code and code numbering that make it easy to read and reference. Both tools are beneficial for anyone teaching and/or sharing code and code languages.
Create snippets by visiting the Gist page, clicking the New snippet button, copying and pasting the code snippet into a form field, selecting the code language and hitting submit.
After the code is published, you share the code by copying a small script that you can include in a blog post (see below) or share the URL to the script page to share in an email, text or other electronic communication.

Use the URL below to create a free Gist account and get started:
To review my Gist collection, use the URL below:
https://gist.github.com/stevencombs
Bonus Geek Tip: Use the following third-party tools to make access to Gist snippets faster and easier:
- Gist bundle for Textmate 2
- GistBox browser extension for Chrome
- Gist package for Atom
- GistPal Mac application
If you have a Gist account, let me know in the comments below. I’d be interested to read any tips you may have.
Comments
Comments use GitHub Discussions; sign in with GitHub to join in.