Last active
December 29, 2015 23:39
-
-
Save webmat/7743980 to your computer and use it in GitHub Desktop.
Revisions
-
webmat revised this gist
Dec 2, 2013 . 1 changed file with 2 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,2 @@ "Attendee #","Date","Last Name","First Name","Email","QTY","Ticket Type","Date Attending","Order #","Order Type","Total Paid (USD)","Fees Paid (USD)","Eventbrite Fees (USD)","CC Processing (USD)","Attendee Status","Home Address 1","Home Address 2","Home City","Home State/Province","Home Postcode","Home Country" "277877635","21 Oct 2013","Martin","Mathieu","webmat@gmail.com","1","DevOps Enthusiast (80)","4 Nov 2013","218440551","Free Order","0.00","0.00","0.0","0.00","Attending","","","","","","" -
webmat created this gist
Dec 2, 2013 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,9 @@ #!/usr/bin/env ruby require 'csv' attendees = CSV.read(ARGV.first, :headers => true) # load attendees winner = attendees[ rand(attendees.size) ] # pick a winner puts "Winner: #{winner['First Name']} #{winner['Last Name']} " + "(Attendee # #{winner['Attendee #']})"