- C-a == Ctrl-a
- M-a == Alt-a
:q close
:w write/saves
:wa[!] write/save all windows [force]
:wq write/save and close
| #!/usr/bin/env bash | |
| # Runs all .json or .js files through pythons json lint tool before commiting, | |
| # to make sure that you don't commit broken json objects. | |
| git_dir=$(git rev-parse --show-toplevel) | |
| for file in $(git diff-index --name-only --diff-filter=ACM --cached HEAD -- \ | |
| | grep -P '\.((js)|(json))$'); do | |
| python -mjson.tool $file 2> /dev/null | |
| if [ $? -ne 0 ] ; then |
| -- show running queries (pre 9.2) | |
| SELECT procpid, age(clock_timestamp(), query_start), usename, current_query | |
| FROM pg_stat_activity | |
| WHERE current_query != '<IDLE>' AND current_query NOT ILIKE '%pg_stat_activity%' | |
| ORDER BY query_start desc; | |
| -- show running queries (9.2) | |
| SELECT pid, age(clock_timestamp(), query_start), usename, query | |
| FROM pg_stat_activity | |
| WHERE query != '<IDLE>' AND query NOT ILIKE '%pg_stat_activity%' |
As configured in my dotfiles.
start new:
tmux
start new with session name: