I hereby claim:
- I am bit-dragon on github.
- I am bdragon (https://keybase.io/bdragon) on keybase.
- I have a public key ASCW0NM7AnTzYqHAgTrC0cFncIk-_cFjsJr0GDfRe1rRSQo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
| # Memoization | |
| # Example number one | |
| # Original class | |
| #class Discounter | |
| # def discount(*skus) | |
| # expensive_discount_calculation(*skus) | |
| # end | |
| # | |
| # private |
| class ShippingOption | |
| @children = [] | |
| def self.inherited(child) | |
| @children << child | |
| end | |
| def self.for(weight, international) | |
| @children.select do |child| | |
| child.can_ship?(weight, international) | |
| end |
| var publisher = { | |
| subscribers: { | |
| any: [] // Event type: subscribers | |
| }, | |
| subscribe: function (fn, type) { | |
| type = type || 'any'; | |
| if (typeof this.subscribers[type] === 'undefined') { | |
| this.subscribers[type] = []; | |
| } |
| .vim | |
| ├── autoload | |
| │ └── pathogen.vim | |
| ├── bundle | |
| │ ├── ctrlp.vim | |
| │ ├── gundo | |
| │ ├── nerdcommenter | |
| │ ├── nerdtree | |
| │ ├── quicktask | |
| │ ├── scss-syntax.vim |
| call pathogen#infect() | |
| " Tabs | |
| set shiftwidth=2 | |
| set tabstop=2 | |
| set vb | |
| " Highlight | |
| set hlsearch! |
| git ls-files --deleted -z | xargs -0 git rm |
| # This file is copied to spec/ when you run 'rails generate rspec:install' | |
| ENV["RAILS_ENV"] ||= 'test' | |
| require File.expand_path("../dummy/config/environment", __FILE__) | |
| require 'rspec/rails' | |
| require 'rspec/autorun' | |
| require 'factory_girl_rails' | |
| require 'database_cleaner' | |
| require 'shoulda/matchers/integrations/rspec' | |
| ENGINE_RAILS_ROOT=File.join(File.dirname(__FILE__), '../') |
| #! /bin/bash | |
| clear | |
| echo "Running the rspec sorted correctly" | |
| find spec -type f -name '*_spec.rb' | sort | xargs rspec |