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 'door' | |
describe Door do | |
before(:each) do | |
@door = Door.new | |
end | |
it "should be FUCKING AWESOME" do | |
Door.should be_awesome | |
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
>> class Array | |
>> def each | |
>> puts "each called" | |
>> end | |
>> end | |
=> nil | |
>> for foo in [1,2,3] | |
>> nil | |
>> end | |
each called |
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
>> for a in [1,2,3] | |
>> b = a * 3 | |
>> end | |
=> [1, 2, 3] | |
>> [a,b] | |
=> [3, 9] | |
>> [1,2,3].each do |c| | |
?> d = c * 3 | |
>> end | |
=> [1, 2, 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
Rehearsal ---------------------------------------- | |
for 2.490000 0.030000 2.520000 ( 2.947099) | |
each 2.630000 0.030000 2.660000 ( 3.169486) | |
------------------------------- total: 5.180000sec | |
user system total real | |
for 2.510000 0.030000 2.540000 ( 3.117419) | |
each 2.630000 0.040000 2.670000 ( 3.330009) |
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 String | |
ACCENTS = { | |
"a" => %w{ ã á â }, | |
"e" => %w{ é ê }, | |
"i" => %w{ í }, | |
"o" => %w{ õ ó ô }, | |
"u" => %w{ ú }, | |
"c" => %w{ ç } | |
} | |
def to_ascii! |
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
INDENT_STRING = " " | |
def ph hash, indent = 0 | |
result = "{\n" | |
hash.sort_by{|e|e.inspect}.each do |key, value| | |
result << INDENT_STRING * (indent+1) | |
value = if Hash === value | |
ph value, indent + 1 | |
else | |
value.inspect |
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
Upon clicking on Register New Account for Gadu-Gadu, Adium 1.3b11: | |
(the stdin/stdout flow is a bit messed up for some reason) | |
b '-[AIWiredString initWithString:]' | |
2008-08-12 02:32:26.333 Adium[1205:813] *** Assertion failure in -[AIWiredString initWithString:], /Users/adium/adium-1.3/Frameworks/AIUtilities Framework/Source/AIWiredString.m:178 | |
Breakpoint 1, 0x962e70d7 in objc_exception_throw () | |
(gdb) b '-[AIWiredString initWithString:]' | |
Breakpoint 2 at 0x2971ab |
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 -c /Users/mikael/Git-pulls/adium/build/Adium.build/Deployment-Debug/Adium.build/Script-345DFF4A05564DB200CEE7B3.sh | |
** BUILD FAILED ** | |
The following build commands failed: | |
Facebook: | |
PBXCp build/Deployment-Debug/Facebook.AdiumPlugin/Contents/Frameworks/JSON.framework build/Development/JSON.framework | |
Adium: | |
PBXCp build/Deployment-Debug/Adium.app/Contents/Frameworks/AIUtilities.framework build/Development/AIUtilities.framework | |
(2 failures) | |
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 'rubygems' | |
require 'stringray' | |
class String | |
include StringRay | |
# Constantizes a string, changing it from snake_case or 'space case' to | |
# TitleCase, however necessary | |
def constantize | |
str = self |
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 'rubygems' | |
require 'stringray' | |
class String | |
include StringRay | |
# Constantizes a string, changing it from snake_case or 'space case' to | |
# TitleCase, however necessary | |
def constantize | |
str = self |
OlderNewer