This file contains 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 characters
def create_pets_with_http_info(opts = {}) | |
if @api_client.config.debugging | |
@api_client.config.logger.debug "Calling API: PetsApi.create_pets ..." | |
end | |
# resource path | |
local_var_path = "/pets".sub('{format}','json') | |
# query parameters | |
query_params = {} |
This file contains 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 characters
require_relative 'geocoder' | |
require 'shoulda-matchers' | |
require 'geocoder' | |
require 'debugger' | |
class ActivityCluster | |
MAX_ROUTE_LENGTH = 4 | |
MAX_DISTANCE = 20 |
This file contains 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 characters
<li><%= post.content %></li> |
This file contains 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 characters
class Topic < ActiveRecord::Base | |
has_many :votes | |
# Something that provides the result of the method below, | |
# but without dominating the db | |
#SQL would look something like this | |
# SELECT topics.*, COUNT(id) as vote_count from topics | |
# join on votes where topic_id = topics.id | |
# group_by(topic_id) | |
# order by (vote_count) |
This file contains 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 characters
def some_method | |
puts "foo" | |
end |
This file contains 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 characters
Justin |
This file contains 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 characters
Components | |
1. Database - Text file (maintains each list item) | |
2. User device - Takes input and displays output to user | |
3. Middleman - Translates between database and user device | |
- (i.e. takes input from user device and tells database to save it) | |
- (i.e. asks database for current list or specific list items) | |
Potential Classes | |
ListItem - (id, task (text), status) | |
List - Array ListItem objects |
This file contains 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 characters
def deaf_grandma | |
loop do | |
response = gets.chomp | |
if response == "I love ya, Grandma, but I've got to go." | |
break | |
elsif curse_word_check(response) | |
puts "Make your own Fucking meatloaf" | |
elsif response.upcase == response | |
puts "NO, NOT SINCE 1983!" | |
else |
This file contains 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 characters
class Company < ActiveRecord::Base | |
has_many :users, :inverse_of => :company | |
end | |
class User < ActiveRecord::Base | |
belongs_to :company, :inverse_of => :users | |
end | |
# Code from the Consle |