Skip to content

Instantly share code, notes, and snippets.

@traeblain
Forked from jcouyang/github-contribution-widget.rb
Last active December 30, 2015 04:41
Show Gist options
  • Save traeblain/d4355c770f75ea1d5ca9 to your computer and use it in GitHub Desktop.
Save traeblain/d4355c770f75ea1d5ca9 to your computer and use it in GitHub Desktop.
require "nokogiri"
require "open-uri"
url = "https://github.com/#{params['username']}"
document = Nokogiri::HTML(open(url))
contrib_boxes = document.css('.boxed-group')
{
:pop_repos => contrib_boxes[0].to_html,
:calendar => contrib_boxes[1].to_html
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment