Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
# get page # of 'last' page
curl -si https://github.<yourdomain>.com/api/v3/users/abackstrom/gists?access_token=$TOKEN | grep ^Link:
# download json metadata for all gists. use the right page range! curl expands the bracketed range
curl "https://github.<yourdomain>.com/api/v3/users/abackstrom/gists?access_token=$TOKEN&page=[1-27]" -o gists_#1.json
# clone all the repos
# install jq first. http://stedolan.github.io/jq/
jq -r '.[] | .git_pull_url' *.json | while read repo ; do git clone $repo ; done
# later, update all the repos
find . -type d -mindepth 1 -maxdepth 1 | while read repo ; do ( cd $repo && git rpull ) ; done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.