This file contains 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
# Add this to your .bashrc or .bash_aliases | |
jdiff() { | |
# Diff json files faster | |
# Uses python json.dump with sort_keys=True to fix ordering, then vimdiff | |
if [[ $# -ne 2 ]]; then | |
echo "syntax: jdiff file1 file2" | |
return | |
fi |
This file contains 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
# model new insance or update | |
# http://stackoverflow.com/a/35647389 | |
self._state.adding == True creating | |
self._state.adding == False updating |
This file contains 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
sudo apt-get update | |
sudo apt-get install -y libevent-dev libncurses-dev make | |
wget https://github.com/tmux/tmux/releases/download/2.2/tmux-2.2.tar.gz | |
tar xvzf tmux-2.2.tar.gz | |
cd tmux-2.2/ | |
./configure && make | |
sudo make install |
This file contains 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
# detach others | |
<prefix> D | |
# resize | |
<prefix> :resize[-pane] -(U|D|R|L) [numCells] |
This file contains 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
1996 sudo hciconfig hci0 up | |
1997 sudo hidd --connect 00:22:48:86:E6:CA |
This file contains 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
## history | |
# Quick substitution. Repeat the last command, replacing string1 with string2. Equivalent to ``!!:s/string1/string2/'' (see Modifiers below). | |
^string1^string2^ | |
# Swap usage | |
vmstat | |
# display in hex | |
echo 'test' | hd |