Discover gists
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
It is more than a pastie clone - it's a versioned pastie! Through the eversexy git! <3 |
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
-@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 |
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
Interesting. |
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
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 |
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
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." |
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 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. |
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
#!/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 |
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
#!/bin/sh | |
git stash | |
git symbolic-ref HEAD refs/heads/$1 | |
rm .git/index | |
git clean -f -d | |
# (via johnw) | |
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
237.times("All work and no play makes Jack a dull boy.") |