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
plot(x,y1,type="l",col="red") | |
lines(x,y2,col="green") | |
# With different axis: | |
plot( x, y1, type="l", col="red" ) | |
par(new=TRUE) | |
plot( x, y2, type="l", col="green" ) | |
# http://stackoverflow.com/questions/2564258/plot-2-graphs-in-same-plot-in-r |
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
plot(t,heading,'l') | |
> Error in (function (display = "", width, height, pointsize, gamma, bg, : | |
> X11 module cannot be loaded | |
quartz() | |
plot(t,heading,'l') | |
> worked |
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
MyClass.any_instance.stub(:method).and_return(NewContent) |
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 class?(class_name) | |
Kernel.const_defined?(class_name) && class_name.constantize.is_a?(Class) | |
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
y then o Archive and next | |
e Archive Archive your conversation from any view. | |
m Mute Archives the conversation, and all future messages skip the Inbox unless sent or cc'd directly to you. Learn more. | |
# https://support.google.com/mail/answer/6594?hl=en |
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
gv | |
# http://superuser.com/questions/220666/how-do-you-reuse-a-visual-mode-selection |
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
rake db:mongoid:create_indexes |
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
convert +append a.png b.png c.png | |
# http://apple.stackexchange.com/questions/52879/how-to-combine-two-images-into-one-on-a-mac |
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
# spec_helper.rb | |
def json | |
parse_json(response.body) | |
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
Step 1. Install homebrew from here: http://brew.sh | |
Step 1.1. Run export PATH=/usr/local/bin:$PATH | |
Step 2. Run brew update | |
Step 3. Run brew install vim && brew install macvim | |
Step 4. Run brew link macvim | |
# http://stackoverflow.com/questions/21012203/gvim-or-macvim-in-mac-os-x/21012284#21012284 | |
Adv: | |
- copy & paste between tabs |