most of these require logout/restart to take effect
# Enable character repeat on keydown
defaults write -g ApplePressAndHoldEnabled -bool false
# Set a shorter Delay until key repeat| require "money" | |
| class Decorator < BasicObject | |
| undef_method :== | |
| def initialize(component) | |
| @component = component | |
| end | |
| def method_missing(name, *args, &block) |
Get Homebrew installed on your mac if you don't already have it
Install highlight. "brew install highlight". (This brings down Lua and Boost as well)
| # The following recipe works with upstream rails proxy for custom 404s and 500s. | |
| # Errors are usually handled via rails except if proxy is really down, in which case | |
| # nginx needs a bit more configration. | |
| server { | |
| # ... | |
| location / { | |
| error_page 404 = @rails; # let rails show a page with suggestions | |
| try_files maintenance.html @rails; |
| module DelayedJob | |
| module Matchers | |
| def enqueue_delayed_job(handler) | |
| DelayedJobMatcher.new handler | |
| end | |
| class DelayedJobMatcher | |
| def initialize(handler) | |
| @handler = handler | |
| @attributes = {} |
Locate the section for your github remote in the .git/config file. It looks like this:
[remote "origin"]
fetch = +refs/heads/*:refs/remotes/origin/*
url = [email protected]:joyent/node.git
Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/* to this section. Obviously, change the github url to match your project's URL. It ends up looking like this:
| require "timeout" | |
| module WaitSteps | |
| extend RSpec::Matchers::DSL | |
| matcher :become_true do | |
| match do |block| | |
| begin | |
| Timeout.timeout(Capybara.default_wait_time) do | |
| sleep(0.1) until value = block.call |
| #!/bin/bash | |
| while [ 1 ] | |
| do | |
| rsync -avz --partial source dest | |
| if [ "$?" = "0" ] ; then | |
| echo "rsync completed normally" | |
| exit | |
| else | |
| echo "Rsync failure. Backing off and retrying..." |
| group :production do | |
| gem 'unicorn' | |
| # Enable gzip compression on heroku, but don't compress images. | |
| gem 'heroku-deflater' | |
| # Heroku injects it if it's not in there already | |
| gem 'rails_12factor' | |
| end |