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
" maps substitute command to sub out the current word for quick refactorings | |
nmap <leader>re :%s/<c-r>=expand("<cword>")<cr>/ |
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
ln -s source_file myfile |
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
brew unlink gcc-4.2 # you might not need this step | |
gem uninstall nokogiri | |
xcode-select --install | |
gem install nokogiri |
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
Philosophy: It is better to have 100 functions operate on one data structure | |
than 10 functions on 10 data structures. | |
quoting = use symbol as data structure | |
clojure-noob.core=> names | |
["Larry Potter" "Doreen the Explorer" "The Incredible Bulk"] | |
clojure-noob.core=> (first names) | |
"Larry Potter" | |
clojure-noob.core=> 'names |
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
defaults write com.apple.finder AppleShowAllFiles YES |
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
git branch --merged | grep -v "\*" | xargs -n 1 git branch -d |
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
:!echo -n % | pbcopy |
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> receiver = Object.new | |
=> #<Object:0x007fc4a1939320> | |
irb(main):002:0> original = receiver.method(:to_s) | |
=> #<Method: Object(Kernel)#to_s> | |
irb(main):003:0> original == receiver.method(:to_s) | |
=> true | |
irb(main):004:0> receiver.define_singleton_method(:to_s, original) | |
=> :to_s | |
irb(main):005:0> original == receiver.method(:to_s) | |
=> false |
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
String.instance_eval { self } | |
# => String | |
String.class_eval { self } | |
# => String | |
String.singleton_class | |
# => #<Class:String> | |
string = String.new |
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
watch -n1 io two_dim_list.io |