Notes on GitHub Gist

Da (Derek) Kuang
3 min readOct 26, 2020

--

There are some code snippets I always need to refer to. For instance, an environment to insert a picture into a LaTeX file, some templates to initialize a new project, and some customized wrapper functions to have reproducible IO. GitHub Gist would a good place to take notes on them because it has version control, online assessment but easier to use comparing with GitHub Repository.

But after using it for a while, things get out of control. Whenever opening the GitHub Gist page, I am overwhelmed by my own notes, even though I have not composed too many notes. Moreover, the way GitHub Gist organizes its files confuses me a lot. In this post, I will take some notes on the usage of GitHub Gist to make my life more organized. I hope it could better fit into my workflow and help me to crystalize my programming skills.

GitHub Gist

To have a quick idea about Gist, this GitHub Doc would be a perfect start. Note that Gist is designed to be less private tools. A private Gist cannot be searched, but anyone can access your Gist as long as he has the URL.

One Gist has one name but can contain multiple files. The name of the Gist will the name of the first file. Here is an example as follows.

I am not a fan of this way to organize files, and it turns out that I have many allies. Lepton is open-source software, and GistPad is a VSCode Plug-in. Both of them are designed to have a better experience with Gist.

As long as we write the Gist description in a certain format, the above two tools will organize them with a better visualization. The format is

[title] description #tag1 #tag2

Lepton

Lepton is a lean code snippet manager based on GitHub Gist. GitHub and Lepton's main difference is that Lepton organizes the Gist by the title instead of the first file's name in the Gist. It significantly improves readability. Moreover, the Gists can be index by tags, which is more flexible.

GistPad

GistPad is a VSCode plug-in. The searching ability is not dedicated to Lepton, but it can work seamlessly with your project if you program with VSCode. Here is a short demo about it. It looks like GistPad is not only a Gist manage tool but also a quick notebook. I have not spent too much time on it since I perfect to make my editor light, but both GistPad and Lepton are good tools to use Gist.

Conclusion

I finally start to feel comfortable about Gist by composing this post. I hope this note could help someone to organize their code snippet better. Cheers!

--

--

Da (Derek) Kuang
Da (Derek) Kuang

Written by Da (Derek) Kuang

Computer Science Ph.D. Student @ UPenn

No responses yet