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.2 and RSpec 1.2 | |
RSpactor::Runner.class_eval do | |
alias old_formatter_opts formatter_opts | |
def formatter_opts | |
# update this path to where you saved unicode_formatter.rb | |
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
class BlackHoleStore | |
def logger | |
Rails.logger | |
end | |
def fetch( *args ) | |
yield | |
end | |
def read( *args ) |
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
# Hi! I'am rack middleware! | |
# I was born for return to you valid js on json i18n objects | |
# My author's name was Aleksandr Koss. Mail him at kossnocorp@gmail.com | |
# Nice to MIT you! | |
class I18nJs | |
def initialize app, options = {} | |
@app = app | |
@options = options |
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
gemcutter => redis downloads spec | |
================================= | |
keys | |
---- | |
downloads => global counter for all gem downloads | |
downloads:today => sorted set for downloads from today | |
downloads:rubygem:rails => counter for all rails downloads | |
downloads:version:rails-2.3.5 => counter for all rails 2.3.5 downloads |
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
## example Gemfile | |
source :rubygems | |
group :rails do | |
gem 'rake', '< 0.9', :require => nil | |
gem 'rails', '~> 2.3.5', :require => nil | |
gem 'builder', '~> 2.1.2' | |
gem 'memcache-client', '>= 1.7.4', :require => nil | |
gem 'tzinfo', '~> 0.3.12' | |
gem 'i18n', '>= 0.1.3' |
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 "http://rubygems.org" | |
gem 'rack-contrib', :git => 'git://github.com/rack/rack-contrib.git' | |
gem 'rack-rewrite' |
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
#!/bin/bash | |
SNAPID="SNAP" | |
BACKUPDBID="TEMPDB" | |
#config groups | |
SECURITYGROUP="Mysecgrup" | |
PARAMSGROUP="Myparamsgrup" | |
#rds verifying commands |
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
# | |
# Cookbook Name:: nodejs | |
# Recipe:: default | |
# | |
if ['solo'].include?(node[:instance_role]) | |
nodejs_file = "node-v0.1.101.tar.gz" | |
nodejs_dir = "node-v0.1.101" | |
nodejs_url = "http://nodejs.org/dist/#{nodejs_file}" |
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
# usage: | |
# $ superblame Mislav <from>..<to> | |
function superblame { | |
git log --format=%h --author=$1 $2 | \ | |
xargs -L1 -ISHA git diff --shortstat 'SHA^..SHA' app config/environment* config/initializers/ public/stylesheets/ | \ | |
ruby -e 'n=Hash.new(0); while gets; i=0; puts $_.gsub(/\d+/){ n[i+=1] += $&.to_i }; end' | tail -n1 | |
} |
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
eslint () { | |
if [[ -f ./node_modules/.bin/eslint ]]; then | |
./node_modules/.bin/eslint $* | |
else | |
"${$(nvm which default)%node}eslint" $* | |
fi | |
} |
OlderNewer