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
| #Add this to /etc/fstab | |
| /dev/sda1 /Windows ntfs-3g defaults,uid=1000,gid=1000,dmask=027,fmask=137 0 0 |
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
| java -Dhttp.proxyHost=YourProxyIpOrUrl.com -Dhttp.proxyPort=8080 -Dhttps.proxyHost=YourProxyIpOrUrl.com -Dhttps.proxyPort=8080 -Xmx800m -jar minecraft.jar |
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
| LOCAL_LISTENING_PORT=12345 | |
| REMOTE_USER="zipizap" | |
| REMOTE_SERVER="my.server.com" | |
| ssh -N -D $SOCKS_LISTENING_PORT $REMOTE_USER@$REMOTE_SERVER sleep 60 |
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
| source $BYOBU_PREFIX/share/byobu/keybindings/common | |
| source $BYOBU_PREFIX/share/byobu/keybindings/f-keys.screen.disable | |
| escape "^Aa" | |
| register x "^A" | |
| bindkey "^A" |
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
| # The text | |
| # | |
| $ echo 'the lazy dog jumped the impossible river' | |
| the lazy dog jumped the impossible river | |
| # The text dumped in hexadecimal | |
| # | |
| $ echo 'the lazy dog jumped the impossible river' | od -ct x1 | |
| 0000000 t h e l a z y d o g j u m | |
| 74 68 65 20 6c 61 7a 79 20 64 6f 67 20 6a 75 6d |
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
| ####################################### | |
| ## Add these lines into ~/.tmux.conf | |
| ####################################### | |
| # set correct term | |
| set -g default-terminal "screen-256color" | |
| # and add an alias into ~/.bashrc | |
| # alias 'tmux'='TERM=xterm-256color tmux' | |
| # see http://unix.stackexchange.com/questions/1045/getting-256-colors-to-work-in-tmux | |
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
| $env | grep VAR | |
| # nothing | |
| $ VAR1="my_v1" VAR2="my_v2" bash -c 'env | grep VAR' | |
| VAR1=my_v1 | |
| VAR2=my_v2 | |
| # the command after VAR1 and VAR2 has those vars defined in its environment | |
| # but the vars only exist in the environment of that command, and not in the | |
| # "outside" environment, as can be seen: |
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
| zipizap@lnxp:/tmp/depth0$ tree --charset ascii | |
| . | |
| |-- A_depth1 | |
| | `-- A_depth2 | |
| | `-- A_depth3 | |
| |-- B_depth1 | |
| | `-- B_depth2 | |
| | `-- B_depth3 | |
| `-- C_depth1 | |
| `-- C_depth2 |
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
| zipizap@lnxp:/tmp$ ./a.sh | |
| Handler for CTRL-C is defined - press CTRL-C or wait 5 seconds to continue | |
| ^C------- handler_CtrlC ------- | |
| >> Control-C was pressed. Exiting | |
| zipizap@lnxp:/tmp$ | |
| zipizap@lnxp:/tmp$ | |
| zipizap@lnxp:/tmp$ | |
| zipizap@lnxp:/tmp$ | |
| zipizap@lnxp:/tmp$ | |
| zipizap@lnxp:/tmp$ ./a.sh |
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
| #!/bin/bash | |
| # capture SIGINT (emitted when CTRL-C) | |
| function handler__CtrlC { | |
| echo "------- handler_CtrlC -------" | |
| echo ">> Control-C was pressed. Exiting" | |
| exit 1 | |
| } | |
| trap handler__CtrlC SIGINT | |
| echo "Handler for CTRL-C is defined - press CTRL-C or wait 5 seconds to continue" |