This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
source 'https://rubygems.org' | |
gem 'rake' | |
gem 'lotus-router' | |
gem 'lotus-controller' | |
gem 'lotus-view' | |
group :test do | |
gem 'rspec' | |
gem 'capybara' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Mac | |
3N6EAJLH649N | |
M7RM3HYF9HLE | |
KK4TN46LEAPF | |
NKP6K4YFEWTN | |
6NK9L3W3R9M9 | |
E3HW464L77WR | |
RHY9XXNRL793 | |
HWNF6RPXTPY9 | |
W7M373W7KXP7 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// approach one: simply assign function to prototype | |
// it works, but you still need to use "apply" to make the method | |
// work as needed | |
function smallest1(array){ | |
Array.prototype.min = Math.min; | |
return array.min.apply(array, array); | |
} | |
// approach two: use apply in the function assigned to Array's prototype | |
function smallest2(array){ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# copy to your Capistrano recipe file | |
namespace :deploy do | |
task :clear_cached_assets, :roles => :web do | |
dir = "#{current_release}/public" | |
run %(rm #{dir}/javascripts/all.js #{dir}/stylesheets/master.css) | |
end | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# this goes in the $HOME dir | |
# needs mislav-rspactor v0.3.1 and RSpec 1.2 | |
Runner.class_eval do | |
class << self | |
alias old_formatter_opts formatter_opts | |
def formatter_opts | |
old_formatter_opts + " -r /Users/mislav/Projects/unicode_formatter -f UnicodeFormatter" | |
end | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Experiments in revision control: Curry recipe. | |
My personal recipe for Japanese curry, which has mutated over the years and is | |
now open-source thanks to github, hot damn. Some of the ingredients are not | |
very Japanese, but curry came to Japan from England which got it from India to | |
begin with, so whatever. | |
1.5 - 2 lbs. of meat, prefer thin-sliced beef (komagire), pork works, too. | |
Thin-sliced stuff is always best, but in a pinch stewing beef works. Bacon | |
works surprisingly well. Chicken will work, technically, but if you must, |