- hit
ctrl+v
(visual block mode) - use the down arrow keys to select the lines you want (it won't highlight everything)
Shift+i
(capital I)- insert the text you want, i.e. '% '
- Press
ESC
[taken from stackoverflow] (http://stackoverflow.com/a/15588798)
ctrl+v
(visual block mode)Shift+i
(capital I)ESC
[taken from stackoverflow] (http://stackoverflow.com/a/15588798)
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
Several ways to define a hash in ruby:
hash = {
:key1 => "value1",
:key2 => "value2"
}
or with syntactic sugar:
Error found while inserting a file to Google Drive ruby API client:
Errno::EPIPE: Broken pipe
from /Users/nauval/.rbenv/versions/2.1.2/lib/ruby/2.1.0/openssl/buffering.rb:326:in `syswrite'
Work around: Tell the API client to use HTTPClient as Faraday's default adapter after the require google api
There are two ways to change the default tab size in Sublime Text2:
Go to Preferences -> Setting - Default
and change the value of tab_size
to whatever you want. In my case it was 2
.
Go to Preferences -> Setting - User
and add lines below:
{
"tab_size": 2,
"translate_tabs_to_spaces": true
To be able to use underscore variable inside the Jade's attribute (make it unescaped)
use !=
instead of only =
.
example
img(src!="<%= coverImage %>", height="100px")
taken from pugjs/pug#198
[alias]
bl = branch -l
co = checkout
ec = config --global -e
up = !git pull --rebase --prune $@ && git submodule update --init --recursive
pushm = push origin master
pullm = pull origin master
pusho = !git push origin "$(git rev-parse --abbrev-ref HEAD)"
pullo = !git pull origin "$(git rev-parse --abbrev-ref HEAD)"