Skip to content

Instantly share code, notes, and snippets.

It is more than a pastie clone - it's a versioned pastie! Through the eversexy git! <3
We couldn’t find that file to show.
-@authors.each_with_index do |author, index|
#container{:style=>"float:left;"}
.bigsansed="#{link_to author.name, author}"
%br/
-@authors.each_with_index do |author, index|
#container{:style=>"float:right;"}
.bigsansed="#{link_to author.name, author}"
%br/
#pagination
=will_paginate @posts
Interesting.
def test_delete_middle
assert_equal [1, 2, 3, 4], ListMixin.find(:all, :conditions => 'parent_id = 5', :order => 'pos').map(&:id)
ListMixin.find(2).destroy
assert_equal [1, 3, 4], ListMixin.find(:all, :conditions => 'parent_id = 5', :order => 'pos').map(&:id)
assert_equal 1, ListMixin.find(1).pos
assert_equal 2, ListMixin.find(3).pos
assert_equal 3, ListMixin.find(4).pos
namespace :gem
task :spec => :version do
file = File.new(__DIR__ + "fold.gemspec", 'w+')
spec = %{
Gem::Specification.new do |s|
s.name = "fold"
s.version = "#{@version}"
s.platform = Gem::Platform::RUBY
s.has_rdoc = false
s.summary = "Toolkit for creating whitespace active mini-languages. Inspired by Haml. Feature light."
@mattetti
mattetti / gist:248
Created July 21, 2008 21:13 — forked from schacon/gist:1
my test fork!
This is gist.
There are many like it, but this one is mine.
It is my life.
I must master it as I must master my life.
Without me gist is useless.
Without gist, I am useless.
#!/usr/bin/env ruby -w
# This should be run through './script/runner'
options = YAML.load($stdin.read)
demo = Demo.find(options[:demo])
runner = Outback::Runner.new
runner.manager = demo.manager
#!/bin/sh
git stash
git symbolic-ref HEAD refs/heads/$1
rm .git/index
git clean -f -d
# (via johnw)
237.times("All work and no play makes Jack a dull boy.")