Skip to content

Instantly share code, notes, and snippets.

View sidonath's full-sized avatar
🐈
Petting cats

Damir Zekic sidonath

🐈
Petting cats
View GitHub Profile
@sidonath
sidonath / Gemfile
Last active August 29, 2015 13:59 — forked from jodosha/Gemfile
source 'https://rubygems.org'
gem 'rake'
gem 'lotus-router'
gem 'lotus-controller'
gem 'lotus-view'
group :test do
gem 'rspec'
gem 'capybara'
Mac
3N6EAJLH649N
M7RM3HYF9HLE
KK4TN46LEAPF
NKP6K4YFEWTN
6NK9L3W3R9M9
E3HW464L77WR
RHY9XXNRL793
HWNF6RPXTPY9
W7M373W7KXP7
// 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){
# 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 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
@sidonath
sidonath / gist:58895
Created February 5, 2009 18:21 — forked from pete/gist:57898
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,