Skip to content

Instantly share code, notes, and snippets.

View austinrfnd's full-sized avatar

Austin Fonacier austinrfnd

  • Loot Crate
  • Los Angeles, Ca
View GitHub Profile
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
austinrfnd / gist:23a9b5649e6a2814e607
Created October 27, 2014 15:58
Sublime Text User Settings
{
"font_size": 15.0,
"ignored_packages":
[
"Vintage"
],
"tab_size": 2,
"translate_tabs_to_spaces": true,
"trim_trailing_white_space_on_save": true,
"word_wrap": "true"
@austinrfnd
austinrfnd / gist:2d48013a769261599090
Created October 27, 2014 15:57
Sublime Text Key Bindings
[
{ "keys": ["super+l"], "command": "show_overlay", "args": {"overlay": "goto", "text": ":"} }
]
@austinrfnd
austinrfnd / gist:6217640
Created August 13, 2013 03:27
Find all tags given a context of a model from Acts as Taggble!
ActsAsTaggableOn::Tag.includes(:taggings).where("taggings.taggable_type = 'Question'").select("DISTINCS tags.*")
@austinrfnd
austinrfnd / gist:6128877
Created August 1, 2013 06:27
A wonder comment I found in this code base.
# TODO Still don' know what this controller is for and what to do wiith it...
def admin
if read_attribute(:admin) == "t" || read_attribute(:admin) == "1"
true
else
false
end
end
def admin=(value)
@austinrfnd
austinrfnd / gist:5887260
Created June 28, 2013 19:11
sublimetext user settings
[
{ "keys": ["super+l"], "command": "show_overlay", "args": {"overlay": "goto", "text": ":"} }
]
@austinrfnd
austinrfnd / gist:5856131
Created June 25, 2013 05:28
Another jewel I found in a code base
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
austinrfnd / gist:5847849
Created June 24, 2013 05:08
I found this in an ActiveRecord Model.
def email_must_be_uniq
user = User.find_by_email(email)
if user.present? && user.id =! self.id
errors.add(:email, "is already taken")
end
end