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
ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAyoMK+McYdeCjy75fCwe9cBeEAvZB9LNLMrJ4DjwFseLZD2FhC0s0wZxpogp0SnbaP7VzgEhRyRBgIwx/8SoYM7MyYASAU5G/UhWGZN6fPiWrH73ztsDWZ84XkPg7BY6APEcwrBmJPbQq1JnKkfnzHN9SJUhS72+rWAfF5TyGg+neaAuZXju3T76z2xwizsLp1NX3Xks8aVWVVqQcYJAxYdBZ2Wtgk8p3eyGeQhD5I3r1HPuetrjjBGsic1jwJdyhKLh7WJE2eqTqDOB3I0h4ffJaqbERydRqJh7GqsV3tqIUswtJ1mJvkAC8cVQZynNBIDah930dSj/dcHE6C266ww== [email protected] |
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
Loading development environment (Rails 4.1.9) | |
[1] pry(main)> module Faker | |
[1] pry(main)* class Internet | |
[1] pry(main)* class << self | |
[1] pry(main)* def twitter_handle(specifier = nil) | |
[1] pry(main)* # Get a twitter handle using the udnerlying username. | |
[1] pry(main)* '@' + user_name(specifier, %w(. _ -)) | |
[1] pry(main)* end | |
[1] pry(main)* end | |
[1] pry(main)* 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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
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 all_messages | |
Message.where Message.where( sender: self, recipient: self ).where_values.reduce &:or | |
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
[76] pry(main)> class FooBar < ActiveRecord::Base | |
[76] pry(main)* scope :broken, -> { "UH OH" } | |
[76] pry(main)* end | |
=> :broken | |
[77] pry(main)> FooBar.broken.where name: "NOPE!" | |
NoMethodError: undefined method `where' for "UH OH":String | |
from (pry):65:in `__pry__' |
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
15:14:47 master ~/work/r42 $ ag "(def|alias).*assert_not_includes" `bundle list --paths` | |
/Users/jk/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/activesupport-4.2.0/lib/active_support/test_case.rb | |
81: alias :assert_not_includes :refute_includes |
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
12:18:33 ~/work/r42 $ rails c | |
Loading development environment (Rails 4.2.0) | |
irb(main):001:0> app.foos_path | |
=> "/foos" | |
irb(main):002:0> app.foos_url | |
=> "http://www.example.com/foos" | |
irb(main):003:0> |
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
[20] pry(main)> class Foo < ActiveRecord::Base | |
[20] pry(main)* end | |
=> nil | |
[21] pry(main)> f = Foo.new phone_numbers: {"dario" => "12345"} | |
=> #<Foo:0x007fc69ba76228 id: nil, name: nil, phone_numbers: "{\"dario\"=>\"12345\"}", created_at: nil, updated_at: nil> | |
[22] pry(main)> f.phone_numbers.class | |
=> String | |
[23] pry(main)> class Foo < ActiveRecord::Base | |
[23] pry(main)* serialize :phone_numbers | |
[23] pry(main)* 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
09:39:14 ~/work/r4.2.0 $ rails c | |
Loading development environment (Rails 4.2.0) | |
[1] pry(main)> f = Foo.first | |
Foo Load (0.3ms) SELECT "foos".* FROM "foos" ORDER BY "foos"."id" ASC LIMIT 1 | |
=> #<Foo:0x007fa18bf146c0 id: 1, name: "Jason", age: 44, created_at: Wed, 07 Jan 2015 01:52:26 UTC +00:00, updated_at: Wed, 07 Jan 2015 01:59:01 UTC +00:00> | |
[2] pry(main)> show-source f.wee | |
From: /Users/jk/work/r4.2.0/app/models/foo.rb @ line 7: | |
Owner: Foo | |
Visibility: public |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>Label</key> | |
<string>org.macports.gpg-agent</string> | |
<!-- Please uncomment on 10.4; OnDemand doesn't work properly there. --> | |
<!-- | |
<key>OnDemand</key> |