This gist shows how to create a GIF screencast using only free OS X tools: QuickTime, ffmpeg, and gifsicle.
To capture the video (filesize: 19MB), using the free "QuickTime Player" application:
| gemname=$1 | |
| bundle gem $gemname | |
| cd $gemname | |
| git commit -am"bundle gem $gemname" | |
| git checkout --orphan dummy | |
| git rm -rf . | |
| cd .. | |
| rails plugin new $gemname \ | |
| --skip-bundle \ | |
| --skip-keeps \ |
| module ArrayMatching | |
| class ArrayMatching | |
| def initialize(array) | |
| @array = array | |
| end | |
| def ==(other_array) | |
| Set.new(@array) == Set.new(other_array) | |
| end |
| # Use vim keybindings in copy mode | |
| setw -g mode-keys vi | |
| bind-key -t vi-copy v begin-selection | |
| bind-key -t vi-copy y copy-pipe "reattach-to-user-namespace pbcopy" | |
| unbind -t vi-copy Enter | |
| bind-key -t vi-copy Enter copy-pipe "reattach-to-user-namespace pbcopy" |
| gem 'lograge' # more readable logs | |
| gem 'logstash-event' # for logstash json format | |
| gem 'mono_logger' # threadsafe logging |
| #!/bin/sh | |
| library=/usr/local/Homebrew/Library/Homebrew | |
| mv "$library"/cmd/{upgrade,upgrayyed}.rb | |
| sed -E -i '' 's/def upgrade$/def upgrayyed/' "$library"/cmd/upgrayyed.rb | |
| # No longer exists -- where is the completion? | |
| # sed -i '' 's/upgrade/upgrayyed/' /usr/local/Library/Contributions/brew_zsh_completion.zsh |
Teams kind of broke it last time. So did too many rules. Let's strip it down.
If the ball goes between 2 pins and they're the only ones left, your score for the frame is set to 3 points (not 8). If you get a "field bowl", even if you have more rolls left (i.e. in candlepin, you have three rolls per frame), your turn is over.
If you knock down 1 pin every turn except for your first roll, your score for the game is a perfect 300 points. We ignore the first roll so you can decide whether to shoot the moon based on your first-round score. Your first roll is referred to as the Queen of Spades. Jump shots don't count against shooting the moon, so they can be a good, albeit crazy, source of extra points.
| # Overwrite `t` helper in Rails views to raise in tests, | |
| # which it otherwise doesn't do, even if I18n is configured to. | |
| # | |
| # Installation: | |
| # put in lib/i18n_raise_on_missing_in_action_view.rb | |
| # and require "i18n_raise_on_missing_in_action_view" in e.g. config/environments/test.rb | |
| if Rails.env.test? | |
| module ActionView::Helpers::TranslationHelper | |
| def t_with_raise(*args) |