Skip to content

Instantly share code, notes, and snippets.

@louisswarren
Last active Sep 21, 2016
Embed
What would you like to do?
user="louisswarren"
github="https://api.github.com"
pyjsonlines="'\n'.join(r[sys.argv[-1]] for r in json.loads(sys.stdin.read()))"
pycmd="import sys, json; print($pyjsonlines)"
curl -s "$github/users/$user/repos" | python3 -c "$pycmd" git_url |
while read x; do
git clone "$x"
done
if [ ! -d gist ]; then
mkdir gist;
fi
cd gist/
curl -s "$github/users/$user/gists" | python3 -c "$pycmd" git_pull_url |
while read x; do
git clone "$x"
done
cd ../
@louisswarren

This comment has been minimized.

Copy link
Owner Author

@louisswarren louisswarren commented Sep 21, 2016

Need second one to replace https://gist.github.com/ with git@gist.github.com:.

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