View gist:8943777
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
➜ fu irb -r 'minitest/autorun' | |
irb(main):001:0> class TestClass < Minitest::Unit::TestCase | |
irb(main):002:1> def test_fu | |
irb(main):003:2> assert true, "should be true" | |
irb(main):004:2> end | |
irb(main):005:1> end | |
=> nil | |
irb(main):006:0> | |
Run options: --seed 10470 |
View time_greeter.rb
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 TimeGreeter | |
def initialize(time = Time.now) | |
@time = time.hour | |
end | |
def greet | |
puts "At the tone, the time of day is #{hour_word}" | |
end | |
private |
View gist:d20a3c6176e22cb011e8
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
At the end of the 10th year of the Trojan war, the Trojans found the beach bare of Greeks and only a towering Horse left behind. | |
The beseiged went to behold the effigy and showed it to their wary priest of Neptune, Laocoon, who said: | |
"I distrust Argives -- especially those bearing gifts." | |
But the horse was borne into the city's walls for it was believed to be safe. | |
But Ulysses Most clever of all the Argive JavaScript programmers knew how to abuse open prototypes. | |
He created a setTimeout() to be run after dark | |
The horse blesses the Trojans, the tamers of horses | |
The horse blesses the Trojans, the tamers of horses | |
The horse blesses the Trojans, the tamers of horses | |
The horse blesses the Trojans, the tamers of horses |
View gist:5b8fbf68b824643563b9
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
add_pr_remotes () { | |
mv .git/config .git/config-orig | |
awk '/remote "origin"/ { | |
print $0 | |
getline; | |
print $0 | |
getline; | |
print $0 | |
print "\tfetch = +refs/pull/*/head:refs/remotes/origin/pr/*" | |
}1' .git/config-orig > .git/config |
View z
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 User < ActiveRecord::Base | |
def key_is_valid? | |
... | |
end | |
end | |
# A "helper" | |
def user_key_is_valid?(user, params) | |
user.user_key == params[:user_key] |
View migration-down.rb
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 AClassicPattern < ActiveRecord::Migration | |
def self.up | |
begin | |
try | |
rescue | |
raise ObiWan, "You're my only hope." | |
end | |
end |
View linguistics
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
From a075b71833cec1b673b3ab3dd566cc83b902091a Mon Sep 17 00:00:00 2001 | |
From: Steven G. Harms <sgharms@stevengharms.com> | |
Date: Mon, 29 Jun 2009 02:11:59 -0500 | |
Subject: [PATCH 01/11] s/independant/independent/g | |
--- | |
README | 2 +- | |
1 files changed, 1 insertions(+), 1 deletions(-) | |
mode change 100755 => 100644 README |
View gist:281500
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
$ sudo gem search debug | |
*** LOCAL GEMS *** | |
ruby-debug (0.10.3) | |
ruby-debug-base (0.10.3) | |
ruby-debug-ide (0.4.9) | |
$ script/server -u | |
=> Booting Mongrel |
View gist:427394
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
Buildfile: /Users/stharms/java_card/build.xml | |
clean: | |
[delete] Deleting directory /Users/stharms/java_card/classes | |
[delete] Deleting directory /Users/stharms/java_card/tests | |
init: | |
[mkdir] Created dir: /Users/stharms/java_card/classes | |
[mkdir] Created dir: /Users/stharms/java_card/tests |
View gist:428934
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
stharms@stharms-mac:~/java_card$ git status | |
# On branch anttune | |
# Untracked files: | |
# (use "git add <file>..." to include in what will be committed) | |
# | |
# thedoug.txt | |
nothing added to commit but untracked files present (use "git add" to track) | |
stharms@stharms-mac:~/java_card$ ant | |
Buildfile: /Users/stharms/java_card/build.xml |
OlderNewer