Skip to content

Instantly share code, notes, and snippets.

@gus
gus / riot_example.rb
Created July 20, 2010 21:16 — forked from toothrot/riot_example.rb
Riot examples - via toothrot
require 'rubygems'
require 'riot'
context "Something" do
setup do
D = 8
end
asserts("big") { 8==D }
asserts("bigger") { 8===D }
@gus
gus / index.txt
Created November 30, 2009 21:55 — forked from toothrot/index.txt
Ruby/Clojure analogs
For each Ruby module/class, we have Ruby methods on the left and the equivalent
Clojure functions and/or relevant notes are on the right.
For clojure functions, symbols indicate existing method definitions, in the
clojure namespace if none is explicitly given. clojure.contrib.*/* functions can
be obtained from http://github.com/kevinoneill/clojure-contrib/tree/master,
ruby-to-clojure.*/* functions can be obtained from the source files in this
gist.
If no method symbol is given, we use the following notation:
@gus
gus / gist:180907
Created September 4, 2009 14:24 — forked from mtodd/gist:180398
Ruby and Heredocs
Surround a heredoc with quotes and you can continue the code on the same line:
render :status => 404, :text => <<-'EOH' and return unless setup
article not found<br/>
I, as a server, have failed<br/>
https?
EOH
Quotes also give you more freedom/creativity with the terminal ID: