What You Can Do With Gists on Github?

Github is the popular website among software developers for sharing code. The site hosts over 12 million open-source projects — including games, books and even fonts — making Github the largest code repository on the Internet.

Github offers another useful service called Gist that developers often use to dump their code snippets but Gists aren’t just for geeks and coders — they offer something for everybody. If you have ever heard of web apps like Pastebin or Pastie, Gist are similar but more polished, they are free of advertising and loaded with more features.

Gists in Github - They aren’t just for Geeks!

Here are some areas where you can utilize the Gist service. And you don’t have to be a geek for this.

1. Write Text Anonymously

You don’t have to create an account at Github to use Gists. Just go to gist.github.com, write any block of text in the space provided and create a Gist. You can choose to have a secret Gist that will not be visible to search engines but only to those who know the URL of that secret Gist.

Also see: How to Host Files on Github

2. Track Changes like a Wiki

When you edit the content of a Gist that has already been published, the previous versions of the Gist are also preserved. You can hit the Revisions tab to track edits made over time and there’s a built-in diff engine that will visually highlight the changes between any two versions of a gist. This can also be used for comparing text files.

Compare File Difference

3. Publish Gists in Rich Text

While gists only accept plain text, you can use the Markdown format to publish your text in rich HTML format. You can add lists, images (hosted externally) and even Tables that are not supported in the original Markdown specification. When you are done writing the text in Markdown, remember to save the file with a .md extension.

markdown gist

4. Gist as a Writing Platform

While there exist plenty of writing engines — from WordPress to Medium — you can also Github’s Gist service to quickly publish your writings on the web. Create a Gist either in plain text or markdown format and then use roughdraft.io to publish that Gist as a standalone web page. It’s like integrating Readability with your Gists. And you can use emoji (smileys) too!

If you are using Dictation.io for online speech recognition, you can directly save the transcribed text as a public Gist for quick sharing via Email or Twitter.

5. Host Single Page Websites on Gist

Bl.ocks is one of the most interesting applications built for Gists. You can write your HTML, CSS and JavaScript code in plain text, save the Gist as index.html and then use bl.ocks.org to serve the rendered version of that HTML web page as it should appear in the browser. For instance, here’s a live version of an HTML file that is hosted on gist.github.com.

There are bandwidth constraints obviously but bl.ock.org is still an excellent tool for hosting your HTML through Gists. The other alternative is Google Drive.

6. Maintain a Task List

You can use Gists to keep track of pending tasks (see example). The tasks are written in a special syntax in plain text but they are rendered as a list of check boxes.

- [x] Pick the flowers
- [ ] Call John 9303032332
- [x] Cancel cable subscription
- [ ] Book the flight tickets

You can check or uncheck the items and the source text will update automatically. If your Gist is public, anyone can see your to-do lists but only the gist owner can change the status of individual tasks.

7. Gist as a Web Clipper

The GistBox add-on for Google Chrome lets you save text snippets from web pages as public or private gists. You can even add labels, or #hashtags, to your gists making discovery easier.

8. Embed Gists in Web Pages

You can embed any Gist in your web pages with a line of JavaScript code. The embedded Gists maintain all the formatting and syntax highlighting and visitors to your website can easily clone (or fork) your Gist into their own Github accounts. There’s also a plugin and shortcode for embedding Gists in WordPress blogs.

<script src="https://gist.github.com/username/gist-id.js"></script>

9. Measure the Traffic

You can use Google Analytics to measure the traffic to your Gists. Since Github does not allow JavaScript code to run inside plain text Gists, we can use the GA Beacon to log visits in real-time to Gists.

Add this line to your Gists, save in Markdown format and it will add a transparent tracking image to your Gists.


10. Manage Gists from the Desktop

Gisto is free desktop application that lets you manage your Gists outside the browser. You can search Gists, edit the content of gists, view revisions over time and also share Gists. The app is available for Mac OSX, Windows and Linux. The other alternative is GistBox which is a web app.

Amit Agarwal

Amit Agarwal

Google Developer Expert, Google Cloud Champion

Amit Agarwal is a Google Developer Expert in Google Workspace and Google Apps Script. He holds an engineering degree in Computer Science (I.I.T.) and is the first professional blogger in India.

Amit has developed several popular Google add-ons including Mail Merge for Gmail and Document Studio. Read more on Lifehacker and YourStory


Awards & Titles

Digital Inspiration has won several awards since it's launch in 2004.

Google Developer Expert

Google Developer Expert

Google awarded us the Google Developer Expert award recogizing our work in Google Workspace.

ProductHunt Golden Kitty

ProductHunt Golden Kitty

Our Gmail tool won the Lifehack of the Year award at ProductHunt Golden Kitty Awards in 2017.

Microsoft MVP Alumni

Microsoft MVP Alumni

Microsoft awarded us the Most Valuable Professional (MVP) title for 5 years in a row.

Google Cloud Champion

Google Cloud Champion

Google awarded us the Champion Innovator title recognizing our technical skill and expertise.

Email Newsletter

Sign up for our email newsletter to stay up to date.

We will never send any spam emails. Promise.