UX Design and Development course

Github Gists

Githup gists are awesome. Here are some tips and tricks you can use to make using Gists even better!

List all your Gists

Gists are a great way to save and share little snippets of code. But let's face it, Github's way of managing Gists pretty much suck. I always find myself going page my page, opening gist after gist looking for something. Total time killer!

So, here is a little trick I know about seeing all your Gist data in a single output. Just hit the Gist API directly:

https://api.github.com/users/<username>/gists

Running this in the browser will output a .json blob of all your Gist data like this

[
  {
    "url": "https://api.github.com/gists/10167510",
    "forks_url": "https://api.github.com/gists/10167510/forks",
    "commits_url": "https://api.github.com/gists/10167510/commits",
    "id": "10167510",
    "git_pull_url": "https://gist.github.com/10167510.git",
    "git_push_url": "https://gist.github.com/10167510.git",
    "html_url": "https://gist.github.com/10167510",
    "files": {
      "content-rule.scss": {
        "filename": "content-rule.scss",
        "type": "text/plain",
        "language": "SCSS",
        "raw_url": "https://gist.githubusercontent.com/blackfalcon/10167510/raw/a16ff58abb81383c32d503a07ed8bf91bf44e550/content-rule.scss",
        "size": 735
      }
    },
    "public": true,
    "created_at": "2014-04-08T18:27:49Z",
    "updated_at": "2014-04-08T19:15:52Z",
    "description": "Exploring the @content rule",
    "comments": 0,
    "user": null,
    "comments_url": "https://api.github.com/gists/10167510/comments",
    "owner": {
      "login": "blackfalcon",
      "id": 181089,
      "avatar_url": "https://avatars.githubusercontent.com/u/181089?",
      "gravatar_id": "992bbe0cad45fc9f941a4717f9f01642",
      "url": "https://api.github.com/users/blackfalcon",
      "html_url": "https://github.com/blackfalcon",
      "followers_url": "https://api.github.com/users/blackfalcon/followers",
      "following_url": "https://api.github.com/users/blackfalcon/following{/other_user}",
      "gists_url": "https://api.github.com/users/blackfalcon/gists{/gist_id}",
      "starred_url": "https://api.github.com/users/blackfalcon/starred{/owner}{/repo}",
      "subscriptions_url": "https://api.github.com/users/blackfalcon/subscriptions",
      "organizations_url": "https://api.github.com/users/blackfalcon/orgs",
      "repos_url": "https://api.github.com/users/blackfalcon/repos",
      "events_url": "https://api.github.com/users/blackfalcon/events{/privacy}",
      "received_events_url": "https://api.github.com/users/blackfalcon/received_events",
      "type": "User",
      "site_admin": false
    }
  },
  {

It's a lot of data, but at least you can use the search tool to find things.