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
(1 < 10) | |
ifTrue: [ Transcript show: 'sanity reigns' ] | |
ifFalse: [Transcript show: 'not all is right with the world'] |
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
function monthsBetween(thisDate, thatDate) { | |
if (thisDate > thatDate) { | |
return monthsBetween(thatDate, thisDate); | |
} | |
var number = 0; | |
if (thatDate.getFullYear() > thisDate.getFullYear()) { | |
number = number + (thatDate.getFullYear() - thisDate.getFullYear() - 1) * 12; | |
} else { | |
return thatDate.getMonth() - thisDate.getMonth(); |
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
Getting the Gist of things: | |
<script src="http://gist.github.com/1.js"></script> |
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
%w{framing opera outline pretty print s5-core slides}.each do |style| | |
get "/ui/#{style}.css" do | |
response['Content-Type'] = 'text/css; charset=utf-8' | |
sass style.to_sym | |
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
get '/hello/?' do | |
"Hello, World!" | |
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
get '/hello/:name' do | |
"Hello, #{ params['name'] }!" | |
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
get %r{/(hello|hi)/:name} do | |
"#{ params[:captures][1] }, #{ params['name'] }!" | |
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
get '/sqrt/:num.:format' do | |
model = Math.sqrt(params[:num].to_f) | |
content_type params[:format].to_sym | |
format(model, params, self) | |
end | |
def format(model, params, app) | |
if %w{xml json pdf xls csv html}.include? params[:format] | |
app.send(params[:format], model) | |
else |
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
jrogers@rasta:~/sequel_raggi$ rake spec_oracle | |
(in /home/jrogers/sequel_raggi) | |
...Sequel::Dataset#uniq is deprecated and will be removed in a future version. Use Sequel::Dataset#distinct. | |
./spec/adapters/../../lib/sequel/deprecated.rb:193:in `uniq' | |
./spec/adapters/oracle_spec.rb:89 | |
/var/lib/gems/1.8/gems/rspec-1.1.12/lib/spec/example/example_methods.rb:114:in `instance_eval' | |
/var/lib/gems/1.8/gems/rspec-1.1.12/lib/spec/example/example_methods.rb:114:in `eval_block' | |
/var/lib/gems/1.8/gems/rspec-1.1.12/lib/spec/example/example_methods.rb:52:in `execute' | |
/usr/lib/ruby/1.8/timeout.rb:53:in `timeout' | |
/var/lib/gems/1.8/gems/rspec-1.1.12/lib/spec/example/example_methods.rb:49:in `execute' |
OlderNewer