This file contains hidden or 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
/* | |
* object.watch polyfill | |
* | |
* 2012-04-03 | |
* | |
* By Eli Grey, http://eligrey.com | |
* Public Domain. | |
* NO WARRANTY EXPRESSED OR IMPLIED. USE AT YOUR OWN RISK. | |
*/ |
This file contains hidden or 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
## README | |
# This is a quick script I hacked out to migrate all my heroku apps | |
# to the new free individual postgres DBs. To use it: | |
# - install the heroku gem if you don't already have it | |
# - set the value of IGNORE_OTHERS_APPS to true if you only want to | |
# run the script against apps you've created yourself | |
# - add any apps you want to ignore because they don't use PostgreSQL | |
# (or for any other reason) to the IGNORE_LIST | |
## CAVEAT!! |
This file contains hidden or 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
Sidekiq.rb | |
Sidekiq.configure_server do |config| | |
config.redis = { :size => 5 } | |
end | |
Procfile | |
web: bundle exec unicorn -p $PORT |
This file contains hidden or 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
2 tsp Freshly ground pepper | |
1 1⁄2 tsp Cayenne pepper | |
1 1⁄2 tsp Paprika | |
1 tsp Dry Mustard | |
1 tsp Garlic Powder | |
1 tsp Salt | |
1 Chicken (3 lbs cut up) | |
1 cup Vegetable oil | |
1⁄2 Cup Flour | |
3⁄4 cup chopped onion |
This file contains hidden or 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 Person | |
attr_accessor :first_name, :last_name | |
def full_name | |
"#{first_name} #{last_name}" | |
end | |
end | |
matt = Person.new | |
matt.first_name = "Matt" |
This file contains hidden or 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
/Users/mdarby/.rvm/gems/ruby-1.9.3-p125-perf/gems/activesupport-3.2.1/lib/active_support/dependencies.rb:503:in `load_missing_constant': Expected /Users/mdarby/Documents/Code/ccw_32/app/controllers/reports/accountant/approved_time_off_requests_controller.rb to define Reports::Accountant::ApprovedTimeOffRequestsController (LoadError) | |
from /Users/mdarby/.rvm/gems/ruby-1.9.3-p125-perf/gems/activesupport-3.2.1/lib/active_support/dependencies.rb:192:in `block in const_missing' |
This file contains hidden or 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
#!/usr/bin/env sh | |
## | |
# This is script with usefull tips taken from: | |
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx | |
# | |
# install it: | |
# curl -sL https://raw.github.com/gist/2108403/hack.sh | sh | |
# |
This file contains hidden or 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
mkdir -p ~/Library/LaunchAgents | |
cp /usr/local/Cellar/mongodb/1.8.2-x86_64/org.mongodb.mongod.plist ~/Library/LaunchAgents/ | |
launchctl load -w ~/Library/LaunchAgents/org.mongodb.mongod.plist |
This file contains hidden or 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 CcwFormBuilder < ActionView::Helpers::FormBuilder | |
helpers = field_helpers + | |
%w(date_select datetime_select time_select) + | |
%w(collection_select select country_select time_zone_select) - | |
%w(hidden_field label fields_for) | |
helpers.each do |name| | |
define_method(name) do |field, *args| | |
options = args.extract_options! |
This file contains hidden or 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
" Use arrow keys to move buffers | |
map <up> <C-w>k<cr> | |
map <down> <C-w>j<cr> | |
map <left> <C-w>h<cr> | |
map <right> <C-w>l<cr> |