Skip to content

Instantly share code, notes, and snippets.

@bradylove
Created September 9, 2012 18:54
Show Gist options
  • Select an option

  • Save bradylove/3686457 to your computer and use it in GitHub Desktop.

Select an option

Save bradylove/3686457 to your computer and use it in GitHub Desktop.
require 'net/http'
uri = URI(ARGV[0])
gist = nil
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true if uri.scheme == 'https'
http.start do |h|
data = h.request Net::HTTP::Get.new(uri.request_uri)
gist = data.body
end
eval gist
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment