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
main » u = UserExperiment.find_by_email('---') | |
D, [2014-07-14T19:12:44.447225 #58587] DEBUG -- : UserExperiment Load (0.4ms) SELECT "users".* FROM "users" WHERE "users"."email" = '---' LIMIT 1 | |
#<UserExperiment:0x000001021c8178> { | |
:id => 490, | |
:login => "imajes", | |
:email => "---", | |
:encrypted_password => "...", | |
:reset_password_token => "LdSS1bpDFTXyziEn7s_7", | |
:reset_password_sent_at => nil, | |
:remember_created_at => nil, |
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/bash | |
for branch in `git branch -a | grep remotes | grep -v HEAD | grep -v master`; do | |
git branch --track ${branch##*/} $branch | |
done |
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
(main)> magic = App.delegate.instance_variable_get('@magic_controller') | |
=> #<MagicController:0xc072f00> | |
(main)> ap magic.methods | |
[ | |
[ 0] !() MagicController (NSObject) | |
[ 1] !=:(arg1) MagicController (NSObject) | |
[ 2] !~:(arg1) MagicController (NSObject) | |
[ 3] <<:(arg1) MagicController (UIViewController) | |
[ 4] <=>:(arg1) MagicController (NSObject) | |
[ 5] |
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
(main)> magic = App.delegate.instance_variable_get('@magic_controller') | |
=> #<MagicController:0xc167ff0> | |
(main)> ap magic.methods | |
[ | |
[ 0] !() MagicController (NSObject) | |
[ 1] !=:(arg1) MagicController (NSObject) | |
[ 2] !~:(arg1) MagicController (NSObject) | |
[ 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
class Foo | |
class << self | |
attr_accessor :bar | |
end | |
def self.current_thing | |
@bar ||= calculate_current_thing | |
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
unless @_mGotData | |
# If the data starts with BOM, we know it is UTF | |
if data[0,3] == "\xEF\xBB\xBF": | |
# EF BB BF UTF-8 with BOM | |
@result = {"encoding"=> "UTF-8", "confidence"=> 1.0} | |
elsif data[0,4] == "\xFF\xFE\x00\x00": | |
# FF FE 00 00 UTF-32, little-endian BOM | |
@result = {"encoding"=> "UTF-32LE", "confidence"=> 1.0} | |
elsif data[0,4] == "\x00\x00\xFE\xFF": | |
# 00 00 FE FF UTF-32, big-endian BOM |
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
lg = log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr)%Creset' --abbrev-commit --date=relative |
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
(gdb) thread apply all bt | |
Thread 5 (process 20277): | |
#0 0x00007fff8df08ce2 in __pthread_kill () | |
#1 0x00007fff915517d2 in pthread_kill () | |
#2 0x0000000100831b46 in abort () at state.cpp:219 | |
#3 0x000000010001ccfb in bert::Decoder<bert::IOReader>::convert_term (this=0x111483b98, term=0x6) at bert.hpp:846 | |
#4 0x000000010001a9d6 in bert::Decoder<bert::IOReader>::next_value () at /Users/james/.rvm/src/rbx-head/vm/util/bert.hpp:1087 | |
#5 0x000000010001a9d6 in rubinius::QueryAgent::process_commands (this=0x11032f230, client=@0x6) at bert.hpp:368 | |
#6 0x000000010001b28a in rubinius::QueryAgent::perform (this=0x111483ef0) at agent.cpp:572 |
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
#0 0x00007fff8df08ce2 in __pthread_kill () | |
#1 0x00007fff915517d2 in pthread_kill () | |
#2 0x0000000100831b46 in abort () at state.cpp:219 | |
#3 0x000000010001ccfb in bert::Decoder<bert::IOReader>::convert_term (this=0x111483b98, term=0x6) at bert.hpp:846 | |
#4 0x000000010001a9d6 in bert::Decoder<bert::IOReader>::next_value () at /Users/james/.rvm/src/rbx-head/vm/util/bert.hpp:1087 | |
#5 0x000000010001a9d6 in rubinius::QueryAgent::process_commands (this=0x11032f230, client=@0x6) at bert.hpp:368 | |
#6 0x000000010001b28a in rubinius::QueryAgent::perform (this=0x111483ef0) at agent.cpp:572 | |
#7 0x0000000100026e95 in thread::Thread::trampoline (arg=0x11032f230) at thread.hpp:76 | |
#8 0x00007fff9154f8bf in _pthread_start () | |
#9 0x00007fff91552b75 in thread_start () |
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
% rbenv install 1.9.3-p194 | |
Downloading http://pyyaml.org/download/libyaml/yaml-0.1.4.tar.gz... | |
Installing yaml-0.1.4... | |
Installed yaml-0.1.4 to /home/deploy/.rbenv/versions/1.9.3-p194 | |
Downloading http://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.3-p194.tar.gz... | |
Installing ruby-1.9.3-p194... | |
Installed ruby-1.9.3-p194 to /home/deploy/.rbenv/versions/1.9.3-p194 | |
ruby: no such file to load -- ubygems (LoadError) |