How do you manage your gists on GitHub? [closed]
Asked Answered
U

11

170

I love GitHub and their gist service, and that's why I'm keeping a lot of code snippets and even development notes as a gist on my GitHub account. It also makes it easy to share them with my colleagues.

The problem is that it doesn't scale!! The GitHub features for gist are primitive, and I have lots of gists there which make it really difficult to find some of my old gists. There's no search, no tagging, or anything.

Do you know any application that can handle this mess? I would like an application that could

  • Search my gists
  • List my gists by source type and date
  • Let me edit or copy them
  • Let me tag or at least edit description

I would love to see something like this, and I'm willing to pay even some bucks for it.

So how do you manage you gists on GitHub? Do you know any software?

There's one called drift written in MacRuby, but I couldn't compile it, and it hasn't been updated for a while.

Urena answered 17/1, 2010 at 21:26 Comment(2)
Maybe this guy will add gist management: kickstarter.com/projects/1487030260/…Aparejo
Note, as I mention below in my answer, since February 2013, https:///gist.github.com/Username/ is a possible url to easily find any user's gist.Keel
P
125

Check out GistBox. It supports searching, editing and labels. Here's a screenshot:

GistBox Interface

There's also a demo video at: http://www.youtube.com/watch?v=VLgyY6lqpsQ

GistBox Clipper (a Chrome extension) also provides the ability to save <pre> tags and arbitrary text on any web page.


Edit:

Unfortunately, GistBox is becoming Cacher cacher.io - the free plan will only include: 15 private snippets, 3 private labels, unlimited public snippets. If you plan on having many private gists then you will need to but (sic) a paid plan. – Bartek Skwira

Pliocene answered 9/5, 2013 at 21:51 Comment(8)
Truly awesome! Searching + labelling were the only things missing in Gists. I have been checking out other similar services but none of them fitted my needs. Thanks for sharing!Canso
We use an enterprise version of github for our org, is it possible to use this with that version?Pyrophoric
the search function is not as good as I hoped.Bergquist
I agree with @ClaudiuCreanga The search function is not deterministic. For example: I type a word in search bar and no gists are found. Then I myself open the gist which has this word in it. Then I again try step one and search for that word. And ...now magically the gist can be found. Weird :P GitHubGist search described below by weakish works better.Spinning
GistBox will be inaccessible starting December 1st, 2017.Mercy
Unfortunately, GistBox is becoming Cacher cacher.io - the free plan will only include: 15 private snippets, 3 private labels, unlimited public snippets. If you plan on having many private gists then you will need to but a paid plan.Canso
Ruined by stupid subscription models.Passing
Above 2 are no longer working. I recommend Gistpad - integrated in VSCode marketplace.visualstudio.com/items?itemName=vsls-contrib.gistfsUnscrew
S
68

Now gist.github.com supports search. So you can search your gist. I use #hashtag in description, so I can search my gist by tags via user:myusername #tag.

For offline usage, I cloned all my gists. And use find and grep to search them. I also search them with gonzui (open source code search engine).

I've written a shell script: gister.sh. I use it to post gists. It will clone the repo to local and import into csearch automatically after the post. The script also supports sync all your gists (gister sync).

https://github.com/weakish/gister/

Sutherlan answered 4/4, 2011 at 10:52 Comment(10)
Nice tip on including your username in gist searches to narrow things down (since they only have a search for all gists at the moment).Hypocaust
Note that you can now use the user: prefix provided by gist search: e.g., "user:myusername #tag".Colangelo
Nice tip indeed, thanks. The recommendation to use user:myusername combined with a keyword search allows finding gists that would otherwise require clicking the "Older" button 100 times.Fall
Awesome! in chrome you can right-click the address bar > pick Edit Search Engines and click ADD to add gist search as a search engine: https://gist.github.com/search?utf8=%E2%9C%93&q=user%3MY_GITHUB_USER+%s. Set gist as a keyword, so now you can type gist in the address bar, press space and type your query.Natashianatassia
I like this Answer best for it's use of offline search as well, and gister.sh looks interesting. Github also has a list of all the search prefixes available from the search page, see the Pro Tip at the bottom: gist.github.com/searchDittography
@ccpizza's URL pattern doesn't seem to work. Gives me a file not found error.If I leave off the terminal +%s and change the % code after user to %3A. it searches. Seems broken at the moment though, as I'm not getting any results.Frodi
@mpag: I guess it was messed by escaping; assuming your github user is mpag the following will search for needle within your gists: https://gist.github.com/search?utf8=&q=user:mpag+needle. The %s is a placeholder for google chrome, and is replaced by chrome with whatever you type after the keyword. see also makeuseof.com/tag/create-custom-search-engines-google-chrome. Once configured you can type gist needle in the chrome address bar and get the results.Natashianatassia
@ccpizza: using Firefox rather than Chrome was likely why the +%s didn't work for me then. I got a user-based search to work, provided in my case I additionally used the fork:true keyphrase. But I can't seem to get a comment-search to work. See stackoverflow.com/questions/55799550/search-gist-comments. Thanks for the response to an 8-year old thread within 10 minutes:)Frodi
@mpag: for firefox I don't even see an option to edit the custom search engine URL template, only the option to set the keyword.Natashianatassia
It should work in Firefox too. "Custom search engine URL template" is stored in the Location field (the field with URL). As for the answer itself, searching by user makes it more usable, by a lot. But the hash (#) character doesn't seem to add any value. The search results are the same whether you use # or not.Jerusalem
P
31

Checkout the cross-platform (Linux/macOS/Windows) gist manager Lepton. It's free and licensed under MIT. http://hackjutsu.com/Lepton/

enter image description here

It seems it meet your needs if you are working in a desktop/laptop environment. (No iOS/Android support yet). Here is the feature list:

  • Group your gists by languages
  • Create/Edit/Delete gists
  • Instant search
  • Custom tags (#tag1, #tag2)
  • Markdown rendering
  • Cross-platform support
  • Proxy

Disclaimer: I'm the major contributor to Lepton.

Pyrargyrite answered 16/8, 2017 at 21:50 Comment(5)
This is a great option now that GistBox is going away. You are a lifesaver!Indign
Came here looking for a replacement to Gistbox this fits for me. Any chance of a black background option?Kakemono
@mappingdom Thanks for having a try. I hope some UX designer could help me with that. Otherwise, I'm not going to do it myself. (Designing a dark theme is pretty challenging for me.)Pyrargyrite
The dark theme has been added since v1.8.0.Pyrargyrite
Does it support Live markdown preview?Monarchy
P
19

Gists are lightweight repositories, so why not take advantage of that?

Clone your gists to a 'my_gists' directory, organized in the way you would want them organized.

Then they become searchable fully using whatever search tools you are familiar with on your operating system.

You also have the advantage of being able to edit, comment, commit and push.

This let's you do all that you have listed and more.

Add git instaweb to the mix and you even have a rudimentary web interface to your gists.

Pry answered 3/11, 2010 at 22:27 Comment(1)
I already do that but it's still far from the convenience I'm expecting from a code snippet manager.Urena
E
16

My colleague and I are working on an open source cross-platform project to manage gists. It's in a beta stage - gistoapp.com.

enter image description here

It current feature list:

  • Advanced search
  • Enterprise log-in
  • Tags
  • Syntax highlight
  • Grouping by language
  • Quick snippet actions
  • Copy to clipboard
  • Copy file contents to clipboard
  • Editor settings
  • Theme color changer
  • Drag and drop to create files
  • Markdown preview (with emoji)
  • AsciiDoc preview
  • Comments
  • Web app

Full source, and downloads are available via github.

Excerpta answered 7/7, 2013 at 18:3 Comment(5)
Gisto is a superb solution. I just started using it, but am already very impressed and would absolutely recommend it. It's easy to install via Cask: cask install gisto.Haematoxylon
Does it support Live markdown preview?Monarchy
@Monarchy yepExcerpta
Great. I checked and I can see the preview. But the markdown and preview are not simultaneously scrolled which makes it difficult to edit and preview long markdown file. Could you guys look into this issue?Monarchy
Could you fill in an issue for it at github.com/Gisto/Gisto/issues?Excerpta
N
6

It might be possible to clone your gists into a local folder (as pointed out by vgoff), then build some sort of personal website around this hosted on github pages... Using Jekyll/liquid you could tag and have categories... Embed using JavaScript, or use partials to inject code into the source ( using pygments to handle the syntax highlighting - or do it client side e.g using SyntaxHighlighter ). Perhaps use google search for the search component... or dynamically build up a json file, or use github's gist API ( http://develop.github.com/p/gist.html ) to pull in json for meta data and public repos...

You could possibly take this further and "demo" your HTML/CSS/JS gists using jsFiddle.net (you can create a new fiddle from a gist... See: http://doc.jsfiddle.net/use/gist_read.html )

I'm going to need a system like this for a project I'm working on ( http://getfiremonkey.com ) - it's for teaching teenagers HTML/CSS/JS in Firefox... And I'm thinking of building it on top of Github Pages/Gist/jsFiddle.net ... Free, open, interactive examples and branchable.

I've decided to setup a side project to focus on building a Gist CMS from anything I learn along the way...

https://github.com/chrisjacob/gist-cms

"Personal Gist CMS hosted on Github Pages. A code / content management system powered by Jekyll to tag, categorize and search your Gist archive. Keep all your Gist's organized in one repository; and show them off the the world with their own dedicated website."

Right now it's just an idea; so let me know if you're interested - and lend a hand if you can ^_^

Nigelniger answered 2/2, 2011 at 10:53 Comment(0)
M
5

I use Sublime Text, and the Gist plugin is very handy. It can easily insert, upload, etc. from within the text editor.

While applications such as Gistbox look pretty, I would prefer a lightweight and fast solution. If you use Sublime Text you may want to give it a try.

https://github.com/condemil/Gist
Mesopause answered 11/7, 2015 at 14:7 Comment(0)
F
1

I've found Snip2Code to be a useful service that lets you manage your own code snippets, giving you the capability to share with colleagues and edit/tag them in a powerful way

Frodina answered 24/2, 2013 at 20:33 Comment(2)
Is Snip2Code related to gist?Sutherlan
I found a feature that lets the user to import his gists into his Snip2Code accountFrodina
A
1

You can also try Snipit: https://snipit.io - it helps you easily save and organize your code snippets. It's still in beta, but it allows you to:

  • snip code blocks directly from the pages you visit, with a handy browser extensions;
  • organize your snippets in lists;
  • search snippets by list, title, syntax and tags.

Features from upcoming version:

  • collections: group multiple lists in packages or libraries (e.g. "Bootstrap code examples", or "PHP functions");
  • sharing and collaboration: share snippets with everybody, or only with specific people; collaborate with team members;
  • companion desktop app and IDE extensions: quickly find snippets while you're working, without breaking your development flow;
  • last but not least: integration with Gist.

Give it a try and hope it solves all your needs.

Anaptyxis answered 7/7, 2017 at 15:9 Comment(2)
domain is for sale.Schweitzer
@Schweitzer i have moved the website to a new domain a while ago, i didn't update this comment until you pointed this out. thanks!Anaptyxis
A
0

If your snippets are Ruby snippets, I'd suggest boson. I use it to maintain my repository of 450+ ruby commands (snippets). I search my commands by name, description, usage, alias and other fields as well as sort by them.

Since my commands reside in local files, I can easily export to gists or install gists as boson commands. I can do all of the things you want to do except list by date and tag. Listing by date is trivial (timestamp of the file) and tags is something I'd like to add to boson as a plugin one day.

Absinthe answered 19/1, 2011 at 10:58 Comment(0)
L
-1

Here's another clear and simple gists organizer - Gist List: https://gistlist.nfshost.com

Its purpose is precisely to help to manage a gists collection.

With it, you can:

  • sort and search your gists,
  • add colored tags to them,
  • backup all your gists to zip file.

What you can't do is editing and copying, it just links to GitHub functionality.

Lettyletup answered 30/7, 2014 at 11:8 Comment(1)
link does not work anymoreHearing

© 2022 - 2024 — McMap. All rights reserved.