Skip to content

Instantly share code, notes, and snippets.

@offensivepolitics
Forked from tsnow/README.md
Last active December 12, 2015 08:49
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 offensivepolitics/4746859 to your computer and use it in GitHub Desktop.
Save offensivepolitics/4746859 to your computer and use it in GitHub Desktop.

Spend 5 literal minutes thinking about:

  • How much time you have to devote to this exercise?
  • How can you verify that your solution is correct?

Then:

  1. Fork this gist and clone it locally.
  2. Send tsnowhite@taximagic.com and aharris@taximagic.com a link to your forked gist, along with an estimate of how long the solution should take in man-hours and an estimate of when you will be finished.
  3. Complete the exercise.
  4. Send tsnowhite@taximagic.com and aharris@taximagic.com a link to your forked gist, along with the actual amount of time you spent on the problem, and a discussion of your solution. If you choose to use external dependencies besides ruby, please provide a Rakefile which allows one to run rake install to install the dependencies.

Create a ruby script utilizing http://www.githubarchive.org/ which has the following options:

   > ./gh_repo_stats -h
   gh_repo_stats [--after DATETIME] [--before DATETIME] [--event EVENT_NAME] [-n COUNT]

And responds like so:

   > ./gh_repo_stats --after '2012-03-08T00:00:00Z' --before '2012-03-08T01:00:00Z' --event WatchEvent -n 20
   FortAwesome/Font-Awesome - 20 events
   twitter/bootstrap - 8 events
   yodasw16/date-picker - 8 events
   jondot/graphene - 5 events
   jkbr/httpie - 4 events
   edjafarov/remote-impress - 4 events
   arturadib/shelljs - 3 events
   thoughtbot/bourbon - 3 events
   xk/node-threads-a-gogo - 2 events
   kartograph/kartograph.py - 2 events
   Induction/Induction - 2 events
   ajaxorg/cloud9 - 1 event
   pa7/heatmap.js - 1 event
   fuelphp/kernel - 1 event
   documentcloud/backbone - 1 event
   johnjbarton/UglifyJS - 1 event
   jquery/jquery - 1 event
   zendframework/zf2 - 1 event
   umpirsky/country-list - 1 event
   ncb000gt/node-cron - 1 event
   > ./gh_repo_stats --after '2012-03-08T10:00:00Z' --before '2012-03-08T11:00:00Z' --event WatchEvent -n 2
   ChiperSoft/Kalendae - 33 event(s)
   FortAwesome/Font-Awesome - 19 event(s)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment