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
Scenario: Requesting an invalid page | |
When I go to an invalid path | |
Then I should see a 404 page with a goat |
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
mathiasx@banshee:~/dev/shoes (rake_refactor *)$ rake osx:deps:install | |
git remote add shoes https://github.com/wasnotrice/homebrew.git | |
From https://github.com/wasnotrice/homebrew | |
* [new branch] gh-pages -> shoes/gh-pages | |
* [new branch] master -> shoes/master | |
* [new branch] quartz -> shoes/quartz | |
* [new branch] shoes -> shoes/shoes | |
* [new branch] shoes-dev -> shoes/shoes-dev | |
gettext already exists, continuing | |
glib already exists, continuing |
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
mathiasx@banshee:~/dev/shoes (rake_refactor)$ rake clean | |
mathiasx@banshee:~/dev/shoes (rake_refactor)$ rake osx:deps:install | |
git remote add shoes https://github.com/wasnotrice/homebrew.git | |
From https://github.com/wasnotrice/homebrew | |
* [new branch] gh-pages -> shoes/gh-pages | |
* [new branch] master -> shoes/master | |
* [new branch] quartz -> shoes/quartz | |
* [new branch] shoes -> shoes/shoes | |
* [new branch] shoes-dev -> shoes/shoes-dev | |
gettext already exists, continuing |
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
Shoes.app :height => 185, :width => 215, :title => "SassyTomato" do | |
background white | |
@time_to_start = Time.new | |
@stopped = true | |
flow do | |
stack :margin => 10, :width => 75 do | |
image "http://i.imgur.com/NgtbE.jpg" | |
end | |
stack :margin => 10, :width => -75 do | |
button "Pomodoro" do |
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 FooController < ApplicationController | |
def index | |
@foo = Foo.find(params[:id]) | |
@bar = Bar.find(params[:bar_id]) | |
@locals = @foo + @bar # this line and the locals view stuff gets removed when you're done developing | |
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
# >---------------------------------------------------------------------------< | |
# | |
# _____ _ _ __ ___ _ | |
# | __ \ (_) | \ \ / (_) | | | |
# | |__) |__ _ _| |___\ \ /\ / / _ ______ _ _ __ __| | | |
# | _ // _` | | / __|\ \/ \/ / | |_ / _` | '__/ _` | | |
# | | \ \ (_| | | \__ \ \ /\ / | |/ / (_| | | | (_| | | |
# |_| \_\__,_|_|_|___/ \/ \/ |_/___\__,_|_| \__,_| | |
# | |
# This template was generated by RailsWizard, the amazing and awesome Rails |
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
mathiasx@banshee:~/dev$ git clone git@github.com:mathias/geronimo.git | |
Cloning into 'geronimo'... | |
remote: Counting objects: 123, done. | |
remote: Compressing objects: 100% (82/82), done. | |
remote: Total 123 (delta 32), reused 114 (delta 23) | |
Receiving objects: 100% (123/123), 34.18 KiB, done. | |
Resolving deltas: 100% (32/32), done. | |
mathiasx@banshee:~/dev$ cd geronimo/ | |
/Users/mathiasx/dev/geronimo |
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
(ns chapter_2_clj.core) | |
; here I use atoms as a replacement for chapter 2's globals | |
(def small (atom 1)) | |
(def big (atom 100)) | |
(defn average [& all] | |
(quot (apply + all) (count all))) | |
; here's a version that uses arguments |
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 Object | |
def try_chain *meths | |
meths.inject(self) do |res, meth| | |
break unless result = res.try(meth) | |
result | |
end | |
end | |
end |