Skip to content

Instantly share code, notes, and snippets.

@gerjantd
Created July 20, 2012 09:23
Show Gist options
  • Save gerjantd/3149847 to your computer and use it in GitHub Desktop.
Save gerjantd/3149847 to your computer and use it in GitHub Desktop.
Github: API v3 call for retrieving my public gists
#!/bin/bash
mkdir mygists
cd mygists
curl -u "gerjantd" https://api.github.com/gists | json_xs > mygists.json
cat mygists.json | grep "\"id\"" | awk -F "\"" '{print $4}' > repos
for g in `cat repos`; do git clone git@gist.github.com:$g.git gist-$g; done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment