Skip to content

Instantly share code, notes, and snippets.

@nitincoded
Created December 11, 2016 11:06
Show Gist options
  • Save nitincoded/dcada9a08b826af394daffe14be75139 to your computer and use it in GitHub Desktop.
Save nitincoded/dcada9a08b826af394daffe14be75139 to your computer and use it in GitHub Desktop.
Read GitHub Events (Ruby sample code)
require 'open-uri'
require 'zlib'
require 'yajl'
gz = open('http://data.githubarchive.org/2015-01-01-12.json.gz') #Date range 1-12
js = Zlib::GzipReader.new(gz).read
Yajl::Parser.parse(js) do |event|
print event
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment