Skip to content

Instantly share code, notes, and snippets.


Austin Fonacier austinrfnd

View GitHub Profile
View gist:74a6acba2c1e36a9e849
DV.Search.json = {"results":[{"active":true,"approved":true,"averageResponseTime":7,"calendarModified":1439592463000,"cancellationPolicy":"flexible","id":148858,"instantBookNewGuest":false,"instantBookRepeatGuest":false,"lastLogin":1443752666000,"location":{"fullAddress":"2 Alphonse St, Saint Isidore, ON, Canada","city":"Saint Isidore","country":"CA","latitude":45.385898,"longitude":-74.9059569,"state":"ON","zipcode":"K0C 2B0","neighborhood":null,"propertyType":"house","outdoorArea":"large","residentDogCount":2,"updatedAt":1443752700000},"maxDaycareDogsAllowed":3,"maxDogsAllowed":4,"newMentorReviewed":false,"profile":{"boardingImage":"148858.1379375977.5371.jpg","description":"I offer dog sitting in my own home situated in St. Isidore, Ontario. My assistants are my 5 year old Rottweiller and my 4 year old Boxer. During their stay with us your special canine friend will ...","facebook":null,"hasDogBoardingPhotos":true,"name":{"first":"Leslie-Ann","last":"B"},"profileImage":"148858.1381539913.1439.jpg","profil

Rails Girls LA 2015 Part1

Our Goals

At the end of the day you should

  • Feel comfortable in the terminal
  • Know about ERB (Embeded Ruby) and how to use it
  • Know how to start a new Rails project
  • Have your project online
austinrfnd / gist:23a9b5649e6a2814e607
Created Oct 27, 2014
Sublime Text User Settings
View gist:23a9b5649e6a2814e607
"font_size": 15.0,
"tab_size": 2,
"translate_tabs_to_spaces": true,
"trim_trailing_white_space_on_save": true,
"word_wrap": "true"
austinrfnd / gist:2d48013a769261599090
Created Oct 27, 2014
Sublime Text Key Bindings
View gist:2d48013a769261599090
{ "keys": ["super+l"], "command": "show_overlay", "args": {"overlay": "goto", "text": ":"} }
austinrfnd / gist:6217640
Created Aug 13, 2013
Find all tags given a context of a model from Acts as Taggble!
View gist:6217640
ActsAsTaggableOn::Tag.includes(:taggings).where("taggings.taggable_type = 'Question'").select("DISTINCS tags.*")
austinrfnd / gist:6128877
Created Aug 1, 2013
A wonder comment I found in this code base.
View gist:6128877
# TODO Still don' know what this controller is for and what to do wiith it...
View gist:6026848
def admin
if read_attribute(:admin) == "t" || read_attribute(:admin) == "1"
def admin=(value)
austinrfnd / gist:5887260
Created Jun 28, 2013
sublimetext user settings
View gist:5887260
{ "keys": ["super+l"], "command": "show_overlay", "args": {"overlay": "goto", "text": ":"} }
austinrfnd / gist:5856131
Created Jun 25, 2013
Another jewel I found in a code base
View gist:5856131
has_many :enrollments, class_name: "CourseEnrollment", conditions: "course_enrollments.role='student'", dependent: :destroy
has_many :student_enrollments, class_name: "CourseEnrollment", conditions: "course_enrollments.role='student'", dependent: :destroy
austinrfnd / gist:5847849
Created Jun 24, 2013
I found this in an ActiveRecord Model.
View gist:5847849
def email_must_be_uniq
user = User.find_by_email(email)
if user.present? && =!
errors.add(:email, "is already taken")
You can’t perform that action at this time.