start new:
tmux
start new with session name:
tmux new -s myname
| # 0 is too far from ` ;) | |
| set -g base-index 1 | |
| # Automatically set window title | |
| set-window-option -g automatic-rename on | |
| set-option -g set-titles on | |
| #set -g default-terminal screen-256color | |
| set -g status-keys vi | |
| set -g history-limit 10000 |
| -- 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%' |
| rem ------------------------------------------------------------------------------- | |
| rem this file controls the error level returned by the tool robocopy in order to | |
| rem be usable in a custom build step of Visual Studio | |
| rem ------------------------------------------------------------------------------- | |
| robocopy.exe /A-:R /NP /NJH /NJS /NDL /NFL /NS /NC %* | |
| rem if errorlevel 16 echo Robocopy Exit Status: ***FATAL ERROR*** & exit /b 1 | |
| rem if errorlevel 15 echo Robocopy Exit Status: FAIL MISM XTRA COPY & exit /b 1 | |
| rem if errorlevel 14 echo Robocopy Exit Status: FAIL MISM XTRA & exit /b 1 |
| $OutputEncoding = New-Object -typename System.Text.UTF8Encoding | |
| [Console]::OutputEncoding = New-Object -typename System.Text.UTF8Encoding |
adapted from this blog
# YAML
name: Jon# YAML
object:| user www-data; | |
| worker_processes 4; | |
| error_log /var/log/nginx/error.log; | |
| pid /var/run/nginx.pid; | |
| events { | |
| worker_connections 1024; | |
| } |
| user www-data; | |
| worker_processes 4; | |
| error_log /var/log/nginx/error.log; | |
| pid /var/run/nginx.pid; | |
| events { | |
| worker_connections 1024; | |
| } |
| #!/usr/bin/env python | |
| import hashlib | |
| import optparse | |
| import paramiko | |
| from Crypto.PublicKey import RSA | |
| def insert_char_every_n_chars(string, char='\n', every=64): | |
| return char.join( |
For this configuration you can use web server you like, i decided, because i work mostly with it to use nginx.
Generally, properly configured nginx can handle up to 400K to 500K requests per second (clustered), most what i saw is 50K to 80K (non-clustered) requests per second and 30% CPU load, course, this was 2 x Intel Xeon with HyperThreading enabled, but it can work without problem on slower machines.
You must understand that this config is used in testing environment and not in production so you will need to find a way to implement most of those features best possible for your servers.