key|desc ---|---|--- Ctrl-2, l | Assign to local variable
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
//Check a command is built in / alias / external | |
~ $ type ls | |
ls is hashed (/bin/ls) | |
//external | |
~ $ type cdcd is a function | |
//function | |
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
//List all process with open network connection | |
sudo lsof -i |
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
//print only first column from space separated file using awk | |
cat input.ssv | awk '{print $1}' |
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
document.write('Hello World!'); |
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
{ | |
"keys": ["super+shift+f"], "command": "js_format" | |
}, | |
{ | |
"keys": ["super+shift+f"], "command": "reindent" | |
,"context": | |
[{ "key": "selector", "operator": "not_equal", "operand": "source.js"}, | |
{ "key": "selector", "operator": "not_equal", "operand": "source.json"} | |
] | |
} |
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
Hello World! |
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
// We add the method rightShift to the List class. | |
// The implementation is simply calling the remove method of List with | |
// the provided argument. | |
List.metaClass.rightShift { | |
delegate.remove it | |
} | |
def list = ['one', 'two', 'three', 'four'] | |
assert 4 == list.size() |
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
div#myId.myClass | |
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
div#myId .myClass |
OlderNewer