Skip to content

Instantly share code, notes, and snippets.

@vioan
Forked from joneskoo/gist-backup.py
Created October 25, 2013 19:31
Show Gist options
  • Save vioan/7160512 to your computer and use it in GitHub Desktop.
Save vioan/7160512 to your computer and use it in GitHub Desktop.
#!/usr/bin/env python
# Git clone all my gists
import json
import urllib
from subprocess import call
from urllib import urlopen
import os
USER = os.environ['USER']
u = urlopen('https://gist.github.com/api/v1/json/gists/' + USER)
gists = json.load(u)['gists']
for gist in gists:
call(['git', 'clone', 'git://gist.github.com/' + gist['repo'] + '.git'])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment