This file contains hidden or 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
set nocompatible | |
set number | |
set ruler | |
syntax on | |
" Set encoding | |
set encoding=utf-8 | |
" Whitespace stuff |
This file contains hidden or 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
irb(main):001:0> a = {"foo" => "bar" } | |
=> {"foo"=>"bar"} | |
irb(main):002:0> b = {"foo" => "bar" } | |
=> {"foo"=>"bar"} | |
irb(main):003:0> a.keys.first.object_id | |
=> 23812032 | |
irb(main):004:0> b.keys.first.object_id | |
=> 23802852 | |
irb(main):005:0> a = { foo: "bar" } | |
=> {:foo=>"bar"} |
This file contains hidden or 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
// Foo.m: | |
- (instancetype) initWithResult:(NSTextCheckingResult *)result forLine:(NSString *)line { | |
if ( self = [super init] ) { | |
// do some stuff | |
} | |
return self; | |
} | |
+ (instancetype) parse:(NSString *)line { |
This file contains hidden or 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 "should fail without some param" do | |
thing = Thing.new(@valid_params.delete[:some_param]) | |
thing.valid? | |
assert_not_equal thing.errors[:some_param], [] | |
end |
This file contains hidden or 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
source :rubygems | |
gem "sinatra", "~>1.0" | |
gem "sinatra-content-for", "~>0.2", :require => "sinatra/content_for" | |
gem "sinatra-subdomain", "~>0.1.0", :require => "sinatra/subdomain" | |
gem "dm-core", "~>1.0.2" | |
gem "dm-aggregates", "~>1.0.0" | |
gem "dm-migrations", "~>1.0.0" | |
gem "dm-mysql-adapter", "~>1.0.0" | |
gem "dm-pager", "~>1.1.0" | |
gem "dm-timestamps", "~>1.0.0" |
This file contains hidden or 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 testing | |
#this is a test of gist embedding on posterous | |
@test = Gist.find(:first) | |
end |