Skip to content

Instantly share code, notes, and snippets.

// ==UserScript==
// @name bitlyUI
// @namespace http://fluidapp.com
// @description What does this do?
// @include *
// @author Someone
// ==/UserScript==
//
// GreaseKit friendly
require 'rubygems'
require 'sinatra'
module ::Haml::Filters::Maruku
end
get '/' do
"blah"
end
require 'rubygems'
require 'bio'
triplets = %w( 1 2 3 1 2 2 4 2 1 3 2 4 3 1 1 3 4 4 2 4 1 1 1 4 2 3 1)
bases = %w(a c t g)
decoded = []
bases.each do |i|
bases.each do |j|
bases.each do |k|
require 'rubygems'
require 'bio'
triplets = %w( 1 2 3 1 2 2 4 2 1 3 2 4 3 1 1 3 4 4 2 4 1 1 1 4 2 3 1)
bases = %w(a c t g)
decoded = []
bases.each do |i|
bases.each do |j|
bases.each do |k|
#!/usr/bin/env ruby
require 'tempfile'
require 'rubygems'
require 'mojombo-grit'
include Grit
PATH_TO_DIFFMERGE = "/usr/bin/diffmerge"
= spans(!columns)
- for !column from 1 through !columns by 2 // though = .., to = ..., by = incrementor
+span(!column,!columns)
= span(!column, !columns)
.span-#{!column}
:width= 45px * !column + 15px
- if !column != !columns
:margin-right 15px
describe '#save' do
describe 'with a new resource' do
it "should save child assosciations"
it "should set defaults before create"
it "should create when the resource is dirty" do
zoo = Zoo.new
zoo.name = "San Diego"
zoo.should_receive(:create)
describe '#save' do
describe 'with a new resource' do
it "should create when the resource is dirty" do
Zoo.new(:city => "San Diego").save
Zoo.first.name.should == "San Diego"
end
end
end
# current behavior
zoo1 = Zoo.new(:city => "SF")
zoo2 = Zoo.new(:city => "SF")
zoo1.eql?(zoo2) # => true
zoo1.save
zoo2.save
zoo1.eql?(zoo2) # => false
it "should save child assosciations" do
repository(ADAPTER) do
animal = Animal.new
@zoo.animals << animal
@zoo.save
animal.new_record?.should be_false
end
end