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
"-------------------------------------------------------------------[Vundle]---- | |
set nocompatible | |
filetype off | |
set rtp+=~/.vim/bundle/vundle/ | |
call vundle#rc() | |
Bundle 'gmarik/vundle' | |
Bundle 'kien/ctrlp.vim' | |
Bundle 'mileszs/ack.vim' |
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
# Columns: Score, Coolness, Want, Profit, Name | |
11.25 A- A- A- Mortgage Harmony | |
11.00 A A B MoneyDesktop | |
10.75 A- B+ A- Backbase | |
10.50 B+ A B+ Credit Sesame | |
10.25 A- A- B- Playmoolah | |
10.25 A- B+ B+ PayTap | |
10.25 A A C+ Dashlane | |
10.00 B+ B- A Currency Cloud | |
10.00 B+ A B- Deluxe SwitchAgent |
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 ruby | |
BRANCHES = %w( qa stage stable) | |
REJECT_OPTIONS = %w( git tag branch path ) | |
old_sha, new_sha, ref = STDIN.read.split(' ') | |
exit 0 unless BRANCHES.include?(ref.split('/').last) | |
diff = %x{ git diff-index --cached --name-only #{old_sha} 2> /dev/null } | |
#puts diff.inspect |
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
CABasicAnimation *animation = [CABasicAnimation animationWithKeyPath:@"position"]; | |
[animation setDuration:0.08]; | |
[animation setRepeatCount:3]; | |
[animation setAutoreverses:YES]; | |
[animation setFromValue:[NSValue valueWithCGPoint: | |
CGPointMake([formContainer center].x - 20.0f, [formContainer center].y)]]; | |
animation setToValue:[NSValue valueWithCGPoint: | |
CGPointMake([formContainer center].x + 20.0f, [formContainer center].y)]]; | |
[[formContainer layer] addAnimation:animation forKey:@"position"]; |
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
# Fascinating behavior of symbolize_keys usage. If you have two keys that | |
# are `to_sym` equivalents, the non-symbol version is the winner, | |
# regardless of the order in the hash. | |
# For some reason I expected if a symbol key existed it would be | |
# the winner. | |
1.9.2p290 :002 > {"one" => 1, :one => 2}.symbolize_keys | |
=> {:one=>1} | |
1.9.2p290 :001 > {:one => 1, "one" => 2}.symbolize_keys | |
=> {:one=>2} |
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
require 'date' | |
today = Date.today | |
peeps = [ | |
[:bj, 1983, 1, 18], | |
[:angelee, 1983, 12, 27], | |
[:bella, 2004, 11, 17], | |
[:anders, 2008, 6, 30], | |
[:india, 2012, 2, 23] |
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
>> hmm | |
hello | |
I got here | |
in ensure |
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
# set some vars | |
@high = 100 | |
@low = 0 | |
# Simply calc the midpoint (no remainder) | |
# of the high and low value (bit shift right) | |
def ask | |
(@high + @low) >> 1 | |
end |
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
def STDOUT.puts *args | |
super(*args) | |
STDERR.puts(caller[0..5]) if args.any?{|a| a.to_s =~ /my semi-unique string/ } | |
end |
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
# Synchronize all mainline branches (master, qa, stage, stable) | |
function reposync() { | |
git fetch | |
git checkout master | |
git rebase origin/master | |
git checkout qa | |
git rebase origin/qa | |
git checkout stage | |
git rebase origin/stage | |
git checkout stable |