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
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • 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