Skip to content

Instantly share code, notes, and snippets.

@dtan4
Created May 12, 2014 04:47
Show Gist options
  • Save dtan4/7023d51cc3de196a8b9f to your computer and use it in GitHub Desktop.
Save dtan4/7023d51cc3de196a8b9f to your computer and use it in GitHub Desktop.
#!/usr/bin/env ruby
require "json"
require "open-uri"
URL = "https://api.github.com/users/dtan4/repos"
json = open(URL).read
repositories = JSON.parse(json, symbolize_names: true)
repositories.each do |repo|
next if Dir.exist?(repo[:name])
system "git", "clone", repo[:ssh_url]
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment