This file contains 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/ruby | |
# | |
# Download and execute this script in one-line with no temporary files: | |
# | |
# ruby -e "$(curl http://gist.github.com/raw/436471/install_homebrew.rb)" | |
# | |
# | |
# I deliberately didn't DRY /usr/local references into a variable as this | |
# script will not "just work" if you change the destination directory. However | |
# please feel free to fork it and make that possible. |
This file contains 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 '~/viking_develop_with_passion.rb' | |
# Ignore the following apps | |
disable "Remote Desktop Connection" | |
disable /VirtualBox/ | |
#---------------------------------------- | |
#core_shortcuts | |
#---------------------------------------- | |
toggle "<Cmd-Shift-E>" | |
map "<Cmd-d>" { application_previous } |
This file contains 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 Command | |
def initialize(action,description) | |
@action = action | |
@description = description | |
end | |
def call | |
@action.call | |
end | |
def to_s | |
"#{@description}" |
This file contains 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
public class when_doing_something | |
{ | |
It should_complete = () => | |
{ | |
new SomeClass().DoSomething().ShouldBeTrue(); | |
}; | |
} |
This file contains 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
public class SomeClassSpecs | |
{ | |
public class when_doing_something | |
{ | |
It should_complete = () => | |
{ | |
new SomeClass().DoSomething().ShouldBeTrue(); | |
}; | |
} | |
} |
This file contains 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
public class when_doing_something :Observes<SomeClass> | |
{ | |
It should_complete = () => | |
{ | |
sut.DoSomething().ShouldBeTrue(); | |
}; | |
} |
This file contains 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
only /Chrome/ do | |
imap "<Cmd-o>", lambda{ | |
send(".com<Enter>") | |
} | |
end |
This file contains 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
module RSpec | |
Matchers.define :have_received do|symbol,*args| | |
match do|fake| | |
result = true | |
method = fake.received(symbol) | |
result &= method != nil | |
unless (args.count == 0) | |
result &= method.called_with(*args) != nil | |
end |
This file contains 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
describe 'When extending an item with a dynamic module that dynamically defines methods' do | |
before (:each) do | |
@target = Object.new | |
@the_module = Module.new do | |
define_method :age do | |
33 | |
end | |
end | |
end |
This file contains 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
ValidationRule = Ember.Object.extend | |
description: null | |
constraint: null | |
validate: (target) -> | |
return @constraint.call(target) | |
ValidationResult = Ember.Object.extend | |
successfulRules: [] | |
brokenRules: [] |
OlderNewer