Skip to content

Instantly share code, notes, and snippets.

View taylor-smith's full-sized avatar

Taylor Smith taylor-smith

View GitHub Profile
{
'id': 'happy2014',
'name': 'Happy Tour 2014',
'startDate': 'Feb 3 00:00:00 UTC 2014',
'endDate': 'Feb 5 00:00:00 UTC 2014',
'description': 'This is a tour of all the artwork that you would want to see to make you smile',
'picture': 'http://happytour.org/happy2014.png'
}
def initialize (args={:event_time, :deadline, :event_name, :event_location, :minimum_attendees, :maximum_attendees, :creator_name, :phone, :email, :invitees})
@required = args.fetch(:event_time, :deadline, :minimum_attendees) # .fetch will throw an error if key doesn't exist in Hash
@optional = args[:creator, :event_name, :event_location, :attendees, :maximum_attendees] # simple access returns nil if key isn't set--no exception raised
end
@taylor-smith
taylor-smith / gist:6244537
Created August 15, 2013 20:30
Initializing needed variables
var text = "Taylor Smith Taylor Smith Taylor Smith Taylor Smith"
var myName = "Taylor Smith"
var hits = []
$ rails new Hello_World
rails new Hello_World