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 Thing | |
@@things = {} | |
def initialize | |
@pointer = self.hash | |
end | |
def set(x) | |
@@things[@pointer] = x | |
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
# test/spec test runner | |
function ts() | |
{ | |
ruby $1 -r s 2>/dev/null | grep -v "^HelperTestCase" | grep -v "dummy (e" | |
} | |
# test/spec test runner (with test name) | |
function tsn() | |
{ | |
ruby $1 -r s -n "/$2/" 2>/dev/null | grep -v "^HelperTestCase" | grep -v "dummy (e" |
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
autodetach on | |
defkanji euc | |
deflogin on | |
startup_message off | |
defscrollback 100000 | |
defshell -bash | |
chdir | |
term "xterm" | |
escape ^Tt | |
encoding UTF-8 UTF-8 |
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 Time | |
def within?(time_period) | |
self >= Time.now && self <= Time.now + time_period | |
end | |
end | |
# >> (Time.now + 55.hours).within? 2.days | |
# false | |
# >> (Time.now + 45.hours).within? 2.days | |
# true |
NewerOlder