Skip to content

Instantly share code, notes, and snippets.

@rtlong
rtlong / movie.md
Created July 13, 2018 20:12 — forked from laser/movie.md

Movie Ticket Kata

First, head here to join our Zoom meeting. It will help me following along while you work through the assignment.

What Are We Building?

Write a program that calculates purchase price for movie tickets using any language you like. It should not be a full-blown web app; it can be a simple class or collection of methods invokable by your test suite. We'll provide you with some requirements, test-cases, and even a sample interface - all you have to do is give us some software.

Base Admission Rate

@rtlong
rtlong / Gemfile
Created October 23, 2013 19:48 — forked from sr/Gemfile
source "http://rubygems.org"
gem "janky", "~>0.9"
gem "pg"
gem "thin"
@rtlong
rtlong / locale.rb
Created March 5, 2012 02:56 — forked from aulizko/locale.rb
Exports $app/config/locale/$locale.yml contents to mongodb database
# usage:
# bundle exec rake locale:file RAILS_ENV=production
# if you want to export a different locale (not en.yml), provide locale option, as follows:
# bundle exec rake locale:file RAILS_ENV=production locale=ru
require 'mongo-i18n'
def write_to_database(sc, path, value)
key = path.join('.')
sc[key] = value.to_json
@rtlong
rtlong / install_homebrew.rb
Created February 5, 2012 04:38 — forked from mxcl/install_homebrew.markdown
Installs Homebrew to /usr/local so you don't need sudo to `brew install`
#!/usr/bin/ruby
# This script installs to /usr/local only. To install elsewhere you can just
# untar https://github.com/mxcl/homebrew/tarball/master anywhere you like.
module Tty extend self
def blue; bold 34; end
def white; bold 39; end
def red; underline 31; end
def reset; escape 0; end
def bold n; escape "1;#{n}" end