Skip to content

Instantly share code, notes, and snippets.

View elizabrock's full-sized avatar

Eliza Brock Marcum elizabrock

View GitHub Profile
@elizabrock
elizabrock / db schema.rb
Last active August 29, 2015 13:56
elizabrocksoftware.com's Freckle Integration. This drives: http://elizabrocksoftware.com/what_are_they_doing
# encoding: UTF-8
# This file is auto-generated from the current state of the database. Instead
# of editing this file, please use the migrations feature of Active Record to
# incrementally modify your database, and then regenerate this schema definition.
#
# Note that this schema.rb definition is the authoritative source for your
# database schema. If you need to create the application database on another
# system, you should be using db:schema:load, not running all the migrations
# from scratch. The latter is a flawed and unsustainable approach (the more migrations
# you'll amass, the slower it'll run and the greater likelihood for issues).
@elizabrock
elizabrock / Instructions.md
Created April 7, 2014 16:38
Cheers Exercise

How do we start a new program?

Let’s try it by building:

A small program that takes input and does something with it.

Cheers, Pt. 1

#!/usr/bin/env ruby
# -*- ruby -*-
require 'rake/testtask'
Rake::TestTask.new() do |t|
t.pattern = "test/test_*.rb"
end
desc "Run tests"
task :default => :test
@elizabrock
elizabrock / cron.rb
Created May 5, 2014 18:29
Message Expectations Example
class Cron
def self.run!
User.send_digests!
end
end
@elizabrock
elizabrock / cheers.rb
Created July 7, 2014 16:43
Cheers Exercise - Cohort Blueberry
# Build on the results of our in-class exploration to output, for example:
# Give me an... A
# Give me a... B
# Give me a... B
# Give me a... Y
# ABBY’s just GRAND!
# When given the input of “Abby”.
# Note: the “a” vs. “an”
@elizabrock
elizabrock / gist:19d3e2a63c6b6f776e41
Last active August 29, 2015 14:04
Koans Progress - Cohort Blueberry
01. about_asserts: TDD, minitest [TDD: Terrence][ minitest: adam ]
02. about_nil: nil in ruby (Matt Spell)
03. about_object: objects, to_s, object_id (Richmond)
04. about_arrays: slicing vs. access (MaRisa)
05. about_array_assignment (MaRisa)
06. about_hashes (Kelley)
07. about_strings (Carter)
08. about_symbols (Andrew) (D1 milestone)
09. about_regular_expressions (Courey)
10. about_methods (Wes)
class CreateLineItems < ActiveRecord::Migration
def change
create_table :line_items do |t|
t.references :order
t.references :product
t.integer :quantity
t.boolean :delivered
end
end
end
@elizabrock
elizabrock / Ruby Gem Lightning Talks.md
Last active August 29, 2015 14:06
Ruby Gem Lightning Talks