Skip to content

Instantly share code, notes, and snippets.

@aviflombaum
aviflombaum / test
Created July 28, 2015 16:17
A gist from Demo App
Tada!!!!
@aviflombaum
aviflombaum / test
Created July 28, 2015 15:56
A gist from Demo App
Make a new gist
@aviflombaum
aviflombaum / test
Created July 28, 2015 15:41
A gist from Demo App
Test
# Title
Test
# Picture
media: test
# Objective
test
# Duration
test
# Age Group
undefined
class School
@@school_hash = {}
@@school_count = 0
def initialize(school, location, ranking)
@school = school
@@school_hash[:school] = school
@@school_count += 1
end
@aviflombaum
aviflombaum / strong.cpp
Created January 26, 2015 22:33
for every i, there is a stronger us Charles Mulloy
#include
using namespace std;
class For_every
{
public:
require 'bundler'
Bundler.require
Banjo.load_channels!
Banjo.tempo = 150
Banjo.ticks_per_beat = 4.0
Banjo.beats_per_measure = 4.0
Banjo.measures_per_loop = 32.0
Banjo.play
# You have software to take payment from a customer
# There are 4 ways to pay, and they are all very similar.
# One day, you are paying by cash, and you realize you never calculated the tax!
# So you went in to your code and added order.compute_tax to the pay_by_cash method.
# Everything was great, until you realized you forgot to add it to pay_by_check also!
#
# You fixed this bug already, but the same code is duplicated in many places,
# so the bug fix didn't get everything. Frustrated, you decide to refactor your code.
#
# You see a lot of duplciation, but unfortunately, right in the middle of each of these
before do
@this_variable = 1+1
end