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
require File.expand_path(File.dirname(__FILE__) + %q[/../spec_helper]) | |
describe ApplicationHelper do | |
it %q[should flunk] do | |
violated %q[Auto-flunk] | |
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
colorscheme delek | |
filetype plugin on | |
set background=dark | |
set showcmd | |
set number | |
syntax on | |
" all tab stuff to 2 | |
set tabstop=2 | |
set softtabstop=2 |
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
augroup filetypedetect | |
au! BufRead,BufNewFile *.asd setfiletype lisp | |
au! BufRead,BufNewFile *.cgi setfiletype ruby | |
au! BufRead,BufNewFile *.dbk setfiletype xml | |
au! BufRead,BufNewFile *.rb_txt setfiletype ruby | |
au! BufRead,BufNewFile *.rbx setfiletype ruby | |
au! BufRead,BufNewFile *.ly setfiletype tex | |
augroup 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
:abbr teh the |
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 | |
# libertarianism_made_easy.rb | |
module LibertarianismMadeEasy | |
attr_accessor :is_government | |
def acceptable_to?(some_action) | |
not is_government | |
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
#!/usr/bin/env ruby | |
# liberal_sort_by.rb | |
class Array | |
def liberal_sort | |
liberal_sort_by { |x| x } | |
end | |
def liberal_sort_by(&block) | |
pertains, others = partition(&block) | |
pertains.sort_by(&block) + others |
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 | |
# vehicle.rb | |
class Vehicle | |
MEDIUM = :ground | |
def self.medium; self::MEDIUM; end | |
# Using MEDIUM instead of self::MEDIUM makes Aircraft use the ground | |
end | |
class Car < Vehicle; 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
# encoding: UTF-8 | |
module Kernel | |
alias_method :λ, :lambda | |
end | |
=begin | |
Allows code like this, using the actual Greek λ character: |
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
[diff "bz2"] | |
binary = true | |
textconv = /bin/bzcat | |
[diff "gzip"] | |
binary = true | |
textconv = /bin/zcat | |
[diff "tar"] | |
binary = true | |
textconv = tar --to-stdout -xf | |
[diff "tar-bz2"] |
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
/* | |
* Simple JS subclassing, shamelessly stolen from | |
* http://kevinoncode.blogspot.com/2011/04/understanding-javascript-inheritance.html | |
*/ | |
function Super() { | |
this.value = 42; | |
} | |
function Sub(parent) { |
OlderNewer