Skip to content

Instantly share code, notes, and snippets.

@devpruthvi
Created July 31, 2016 15:15
Show Gist options
  • Save devpruthvi/dd9aeab3dd05e2f7d684bd14d4cd50eb to your computer and use it in GitHub Desktop.
Save devpruthvi/dd9aeab3dd05e2f7d684bd14d4cd50eb to your computer and use it in GitHub Desktop.
Gist to download all public and private gists
#!/usr/bin/python
#Depends on: https://github.com/defunkt/gist and git
#install them first
#then run python clone-all-gists.py
import subprocess,re
gists = subprocess.check_output(['gist','-l'])
gists = re.findall('^.*com\/(.*?)(?:\s|$)',gists,re.M)
for gist in gists:
url = 'https://gist.github.com/%s.git' % gist
subprocess.call(['git','clone',url])
Copy link

ghost commented Mar 1, 2022

it matches .com urls in descriptions too

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment