Skip to content

Instantly share code, notes, and snippets.

(il_count == 0))
autoload -U compinit
compinit
# use cache for slow completions
zstyle ':completion:*' use-cache on
zstyle ':completion:*' cache-path ~/.zsh/cache
# fizzy match the completions
zstyle ':completion:*' completer _oldlist _complete _match _correct _approximate _prefix
zstyle ':completion:*:match:*' original only
zstyle ':completion:*:approximate:*' max-errors 1 numeric
zstyle -e ':completion:*:approximate:*' \
alias cuc=script/cucumber
# autocompletion for ruby_test
# works with tu/tf/ti aliases
# see also ~/bin/ruby_test.rb
_ruby_tests() {
if [[ -n $words[2] ]]; then
compadd `ruby_test -l ${words[2]}`
fi
}
#!/usr/bin/env ruby
require 'fileutils'
class SpecFinder
attr_reader :prefix
def initialize(prefix)
@prefix = prefix
end
def change_history(audits)
result = ''
unless audits.nil? || audits.empty?
result << '<h1>Change history</h1>'
audits.each do |audit|
result << "<p><b>Version #{audit.version} (#{audit.action.titleize}, #{audit.created_at.in_time_zone('America/Denver').to_s(:long)}):</b><br />"
result << '<ul>'
audit.changes.each do |attribute, delta|
if delta.is_a?(Array)
result << "<li>Changed #{attribute.titleize}: from '#{delta.first}' to '#{delta.last}'</li>"
(defun rvm-for-ims ()
(interactive)
(setenv "rvm_scripts_path" "/Users/michaelgarriss/.rvm/scripts")
(setenv "rvm_bin_path" "/Users/michaelgarriss/.rvm/bin")
(setenv "rvm_gems_cache_path" "/Users/michaelgarriss/.rvm/gems/cache")
(setenv "rvm_config_path" "/Users/michaelgarriss/.rvm/config")
(setenv "rvm_path" "/Users/michaelgarriss/.rvm")
(setenv "rvm_gemset_separator" "@")
(setenv "PATH" "/Users/michaelgarriss/.rvm/gems/ruby-1.8.6-p369@ims/bin:/Users/michaelgarriss/.rvm/gems/ruby-1.8.6-p369@global/bin:/Users/michaelgarriss/.rvm/rubies/ruby-1.8.6-p369/bin:/Users/michaelgarriss/.rvm/bin:/Users/michaelgarriss/bin:/Users/michaelgarriss/sbin:/usr/local/mysql/bin:/usr/contrib/bin:/usr/local/bin:/usr/local/sbin:/opt/local/bin:/usr/X11R6/bin:/usr/bin:/usr/sbin:/usr/ccs/bin:/bin:/sbin")
(setenv "rvm_rubies_path" "/Users/michaelgarriss/.rvm/rubies")
Then /^the "([^"]*)" checkbox(?: within (.*))? should not be checked$/ do |label, parent|
with_scope(parent) do
field_checked = find_field(label)['checked']
if field_checked.respond_to? :should
field_checked.should be_false
else
assert !field_checked
end
end
end
say = (phrase):
10 times (i):
20 times (j):
phrase print
_say
(load "ugly-settings")
(load "ugly-colors")
(load "ugly-functions")
(load "ugly-bindings")
(load "ugly-terminal")
(load "ugly-nav")
(load "ugly-completion")
(load "ugly-rails")
(load "ugly-scheme")
+ ./tools/check.rb
== Load Balancer Instance Health ==
./tools/check_elbs.rb:23: command not found: elb-describe-instance-health api-internal-west --region us-west-1 --show
-long
./tools/check_elbs.rb:23: command not found: elb-describe-instance-health autocomplete-external-west --region us-west
-1 --show-long
./tools/check_elbs.rb:23: command not found: elb-describe-instance-health api-internal --region us-east-1 --show-long
./tools/check_elbs.rb:23: command not found: elb-describe-instance-health autocomplete-external --region us-east-1 --
show-long
api-internal-west [OK]