Skip to content

Instantly share code, notes, and snippets.

View case-eee's full-sized avatar

Casey Ann (Cumbow) Schlotter case-eee

  • Lessonly
  • Indianapolis, IN
View GitHub Profile
@case-eee
case-eee / recursion.md
Created October 26, 2015 00:21
Recursion Practice

Write a recursive function that searches for a target in a sorted array using binay search, where the array, its size and the target are given as parameters.

@case-eee
case-eee / oauth.rb
Created November 12, 2014 18:44
OAuth Example w/ Google
require 'httparty'
require 'sinatra'
require 'securerandom'
require 'json'
get '/' do
erb :index
end
get '/redirect_auth_url' do
@case-eee
case-eee / hospital.rb
Created August 18, 2014 19:29
hospital interface
# TODO
# add employee and patient ID numbers - in case two people with the same name are both employees or patients
# AUTH process
class Hospital
attr_reader :name, :location, :employees, :patients
def initialize(args)
@name = args[:name]
@case-eee
case-eee / todo.rb
Created August 15, 2014 20:46
todo-example (FYI this code won't actually run!)
# What classes do you need?
# Remember, there are four high-level responsibilities, each of which have multiple sub-responsibilities:
require 'csv'
class Todo
end
class BoggleBoard
def initialize(boggle_board)
@boggle_board = boggle_board
end
def create_word(board, *coords)
coords.map { |coord| board[coord.first][coord.last]}.join("")
end