start new:
tmux
start new with session name:
tmux new -s myname
| # If you work with git, you've probably had that nagging sensation of not knowing what branch you are on. Worry no longer! | |
| export PS1="\\w:\$(git branch 2>/dev/null | grep '^*' | colrm 1 2)\$ " | |
| # This will change your prompt to display not only your working directory but also your current git branch, if you have one. Pretty nifty! | |
| # ~/code/web:beta_directory$ git checkout master | |
| # Switched to branch "master" | |
| # ~/code/web:master$ git checkout beta_directory | |
| # Switched to branch "beta_directory" |
| # users generic .zshrc file for zsh(1) | |
| autoload colors | |
| colors | |
| autoload -U compinit | |
| compinit | |
| export LSCOLORS=ExFxCxdxBxxxxxBxBxExEx | |
| export LS_COLORS='di=01;34:ln=35:so=32:pi=33:ex=31:bd=46;34:cd=43;34:su=41;30:sg=46;30:tw=42;30:ow=43;30' | |
| zstyle ':completion:*' list-colors 'di=01;34' 'ln=35' 'so=32' 'ex=31' 'bd=46;34' 'cd=43;34' 'su=41;30' 'sg=46;30' 'tw=42;30' 'ow=43;30' menu select=1 |
| # .zshrc | |
| # (copyleft) 2012 by Felix Ruess | |
| # | |
| # ---[ System settings ]------------------------------------------------ | |
| limit -s coredumpsize 0 | |
| umask 0027 | |
| --sort-files | |
| --color | |
| --context=1 | |
| --follow | |
| --group | |
| --ignore-dir=vendor | |
| --ignore-dir=db/server | |
| --ignore-dir=log | |
| --ignore-dir=tmp |
| this is a sample of output: | |
| root@percona-db-2:~# iperf -s -u -B 226.94.1.1 -i 1 | |
| ------------------------------------------------------------ | |
| Server listening on UDP port 5001 | |
| Binding to local address 226.94.1.1 | |
| Joining multicast group 226.94.1.1 | |
| Receiving 1470 byte datagrams | |
| UDP buffer size: 122 KByte (default) | |
| ------------------------------------------------------------ |
| # | |
| # Sets completion options. | |
| # | |
| # Load and initialize the completion system ignoring insecure directories. | |
| zmodload zsh/complist | |
| autoload -Uz compinit && compinit -i | |
| autoload -U colors ; colors | |
| zle -C complete-menu menu-select _generic |
| { | |
| "always_show_minimap_viewport": true, | |
| "bold_folder_labels": true, | |
| "caret_style": "solid", | |
| "color_scheme": "Packages/Monokai Extended/Monokai Extended.tmTheme", | |
| "draw_minimap_border": true, | |
| "enable_telemetry": false, | |
| "ensure_newline_at_eof_on_save": true, | |
| "folder_exclude_patterns": | |
| [ |
| # taken from http://www.piware.de/2011/01/creating-an-https-server-in-python/ | |
| # generate server.xml with the following command: | |
| # openssl req -new -x509 -keyout server.pem -out server.pem -days 365 -nodes | |
| # run as follows: | |
| # python simple-https-server.py | |
| # then in your browser, visit: | |
| # https://localhost:4443 | |
| import BaseHTTPServer, SimpleHTTPServer | |
| import ssl |
| Key/Command | Description |
|---|---|
| Tab | Auto-complete files and folder names |
| Ctrl + A | Go to the beginning of the line you are currently typing on |
| Ctrl + E | Go to the end of the line you are currently typing on |
| Ctrl + U | Clear the line before the cursor |
| Ctrl + K | Clear the line after the cursor |
| Ctrl + W | Delete the word before the cursor |
| Ctrl + T | Swap the last two characters before the cursor |