Skip to content

Instantly share code, notes, and snippets.

View debuggingfuture's full-sized avatar

debuggingfuture (Vincent LCY) debuggingfuture

View GitHub Profile

key|desc ---|---|--- Ctrl-2, l | Assign to local variable

@debuggingfuture
debuggingfuture / type-a.sh
Last active December 16, 2015 23:50
Check how a command will be interpreted in BASH
//Check a command is built in / alias / external
~ $ type ls
ls is hashed (/bin/ls)
//external
~ $ type cdcd is a function
//function
@debuggingfuture
debuggingfuture / lsof-i.sh
Last active December 16, 2015 23:58
List process
//List all process with open network connection
sudo lsof -i
//print only first column from space separated file using awk
cat input.ssv | awk '{print $1}'
@debuggingfuture
debuggingfuture / gist:5548010
Last active December 17, 2015 04:08
test case for cheeatz
document.write('Hello World!');
@debuggingfuture
debuggingfuture / gist:5652575
Last active March 10, 2016 22:01
In Sublime Text 2 to use `Cmd-Shift-F` to reindent javascript with jsFormat without affecting other format, put this in the Key Bindings :
{
"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"}
]
}
@debuggingfuture
debuggingfuture / gist:5792413
Created June 16, 2013 15:41
Use gist Tag to render Gist
Hello World!
@debuggingfuture
debuggingfuture / rightShift.groovy
Last active December 19, 2015 06:28
From mrhaki/Groovy-Goodness
// 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()
@debuggingfuture
debuggingfuture / cssselector.css
Created July 3, 2013 15:39
jQuery(CSS) selectors - Select Element with Id myId and also of class myClass
div#myId.myClass
@debuggingfuture
debuggingfuture / gist:5919522
Last active December 19, 2015 07:29
select element with class myClass and is descendants of element with id myID
div#myId .myClass