Filed under code on April 04, 2016.
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:
Bonus Geek Tip: Use the following third-party tools to make access to Gist snippets faster and easier:
If you have a Gist account, let me know in the comments below. I’d be interested to read any tips you may have.