Skip to content

Instantly share code, notes, and snippets.

@ranjib
Created March 19, 2013 20:56
Show Gist options
  • Save ranjib/5200067 to your computer and use it in GitHub Desktop.
Save ranjib/5200067 to your computer and use it in GitHub Desktop.
Clone all opscode cookbooks
require 'nokogiri'
require 'restclient'
Nokogiri::HTML(RestClient.get('https://github.com/opscode-cookbooks/')).
css('ul.repolist h3 a').collect{|n| n.attribute('href').value}.each do |s|
system "git clone http://github.com#{s}"
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment