Skip to content

Instantly share code, notes, and snippets.

View 121watts's full-sized avatar

Andrew Watkins 121watts

  • Lightstep
  • United States
View GitHub Profile
121watts / gist:7c797b63419747f93dcc
Last active August 29, 2015 14:03
Spec harness find methods
Here’s a list of the find methods that the spec harness uses.
Please update if you find others
find_by_last_name "Ullrich"
find_all_by_first_name "Sasha”
1. What's the difference between a cookie and a session?
2. What's serialization and how does it come into play with cookies?
3. Can a cookie be shared by more than one user? How/why?
4. What would it mean to store a shopping cart in a cookie?
5. What advantages/disadvantages are there between cookie-stored carts and
database-stored carts?
121watts / gist:4d719e0e908e05af5804
Last active August 29, 2015 14:06
Storing State in Sessions
  1. What does it mean for an application to be multi-tenant? -serves many clients from one application on one server.

  2. Why would you want to build an application to be multi-tenant? -so you only have to build ONE thing that can serve many people instead of many things to serve many people

  3. How do you implement multi-tenancy at the data / database level? no idea

  4. How do Active Record scopes help keep tenant data segregated?

End of Death
"This isn't about how to live forever. Rather live indefinately."
Discuss the technologies, companies, and people that are going to make it happen.
Social ramifications/criticism
121watts / lawl
Created November 12, 2014 15:36
def execute
until (user_input == "q") || (@position_match == 4)
print "enter your guess ~> "
@user_input = gets.chomp.downcase
validator =
@turns += 1
@turns_left -= 1
if validator.correct_length? == false || validator.correct_letters? == false
puts 'Your guess must be a length of FOUR and'
puts "be of these colors #{'(r)ed'.red}, #{'(y)ellow'.yellow}, #{'(g)reen'.green}, #{'(b)lue'.blue}"