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
| RSpec::Matchers.define :my_composed_matcher do |expected| | |
| match do |actual| | |
| begin | |
| expect(actual).to be_some_fancy_aspect_of(expected) | |
| true | |
| rescue RSpec::Expectations::ExpectationNotMetError => error | |
| false | |
| end | |
| end | |
| 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
| ww () { | |
| local config=".watch" | |
| local target='.' | |
| local changes= | |
| if [[ $# -eq 1 ]] | |
| then | |
| $target = $1 | |
| fi | |
| echo "watching $target" | |
| cd $target |
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
| # Taken from http://en.wikipedia.org/wiki/Leap_year#Algorithm | |
| isLeapYear = (year) -> | |
| if year % 400 == 0 then true | |
| else if year % 100 == 0 then false | |
| else if year % 4 == 0 then true | |
| else false |
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
| Error: undefined local variable or method `xcode_version' for cdargs:Cdargs | |
| Please report this bug: | |
| https://github.com/mxcl/homebrew/wiki/checklist-before-filing-a-new-issue | |
| /usr/local/Library/Homebrew/formula.rb:354:in `handle_llvm_failure' | |
| /usr/local/Library/Homebrew/formula.rb:268:in `brew' | |
| /usr/local/Library/Homebrew/build.rb:53:in `install' | |
| /usr/local/Library/Homebrew/build.rb:27 | |
| /usr/local/Library/Formula/cdargs.rb:28 |
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
| / | |
| .7 | |
| \ , // | |
| |\.--._/|// | |
| /\ ) ) ).'/ | |
| /( \ // / | |
| /( J`((_/ \ | |
| / ) | _\ / | |
| /|) \ eJ L |
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
| # See https://github.com/rack/rack/blob/master/test/spec_utils.rb | |
| # and http://www.ruby-forum.com/topic/215584 | |
| # for further details and historical explanation | |
| "x[y][z]=1" # => {"x" => {"y" => {"z" => "1"}}} | |
| "x[y][z][]=1" # => {"x" => {"y" => {"z" => ["1"]}}} | |
| "x[y][z]=1&x[y][z]=2" # => {"x" => {"y" => {"z" => "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
| <script type="text/template" id="item-template"> | |
| <div class="todo <%= done ? 'done' : '' %>"> | |
| <div class="display"> | |
| <input class="check" type="checkbox" <%= done ? 'checked="checked"' : '' %> /> | |
| <div class="todo-content"></div> | |
| <span class="todo-destroy"></span> | |
| </div> | |
| <div class="edit"> | |
| <input class="todo-input" type="text" value="" /> | |
| </div> |
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
| after 'deploy', 'git:tag' | |
| after 'deploy:migrations', 'git:tag' | |
| namespace :git do | |
| desc "tags the deployed version and pushes it to the git repo" | |
| task :tag, :except => { :no_release => true } do | |
| cmd = "git tag #{rails_env}/#{Time.now.strftime("%Y_%m_%d-%H_%M-%Z")} && git push --tags" | |
| system(cmd) | |
| end | |
| 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
| -# Ist es so im Quelltext? | |
| %a(href="/") Selbermachen - Das Heimwerkerlexikon | |
| %ul | |
| %li | |
| Hefte | |
| %li | |
| Abonnement | |
| %li | |
| CD-Roms |