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
I saw him standin' there by the CI machine | |
I knew he must a been about seventeen | |
The beat was goin' strong | |
Buildin' my favorite Long | |
An' I could tell it wouldn't be long | |
Till the light would be green, yeah green | |
And I could tell it wouldn't be long | |
Till the light would be green, yeah green, singin' | |
I love awesome code |
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
package silly; | |
import org.junit.Test; | |
public class ReallyDont { | |
public boolean doIt() { return true; } | |
public void reallyReally() { | |
if ( !!!doIt() ) { |
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 'test/unit' | |
$alphabet = 'abcdefghijklmnopqrstuvwxyz' | |
$rot13 = 'nopqrstuvwxyzabcdefghijklm' | |
class Rot13 < Test::Unit::TestCase | |
@@message = "the quick brown fox jumps over the lazy dog" | |
@@encoded = "gur dhvpx oebja sbk whzcf bire gur ynml qbt" |
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 'set' | |
class FileParser | |
def initialize filename | |
@set = IO.readlines(filename).collect{ |s| s.split(',').map!{ |t| t.strip } }.flatten.to_set | |
end | |
def match? value | |
@set.include? value |
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
class Filter | |
def initialize directory | |
@directory = directory | |
end | |
def filter regex=".*" | |
entries = Dir.entries @directory | |
entries.reject { |e| !( e =~ /#{regex}/ ) } | |
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
#I'm having a verify issue with gimme, I don't know if I've written the verify wrong or if gimme | |
# does not support matches against Java classes. | |
# | |
require 'gimme' | |
require 'orchestrator' | |
java_import java.util.Calendar | |
describe Orchestrator do |
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 'gimme' | |
require 'demeter' | |
BASE_DIR = "/tmp" | |
module DemeterHelper | |
def default_config | |
config = Hash.new | |
config[:service] = :service | |
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
require 'my' | |
module MyHelper | |
def default_config | |
config = Hash.new | |
config[:stuff] = :stuff | |
end | |
end | |
module My |
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
(global-auto-revert-mode 1) | |
(global-linum-mode 1) | |
(set-cursor-color "red") | |
(set-mouse-color "goldenrod") | |
(set-face-background 'region "blue") | |
(set-foreground-color "white") | |
(set-background-color "black") |
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 read filename | |
@logger.info "reading #{filename}" | |
rows = CSV.read filename | |
@keys = rows.shift | |
@keys.collect! { |key| key.strip.intern } | |
rows.each { |row| | |
row_hash = {} | |
row.each_index { |index| | |
row_hash[@keys[index]] = row[index] | |
} |