Skip to content

Instantly share code, notes, and snippets.

@JRHeaton
Created February 13, 2015 03:55
Show Gist options
  • Select an option

  • Save JRHeaton/6d12821e774ebff7843a to your computer and use it in GitHub Desktop.

Select an option

Save JRHeaton/6d12821e774ebff7843a to your computer and use it in GitHub Desktop.
request = require 'request'
_ = require 'underscore'
exec = require('child_process').exec
options =
url: 'https://api.github.com/users/JRHeaton/repos?type=owner'
json: true
headers:
'User-Agent': 'jgithubdownload'
request options, (err, res, body) ->
cloneURLs = _.pluck body, 'clone_url'
for url in cloneURLs
console.log 'cloning \'' + url + '\''
exec 'git clone ' + url
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment