Welcome - 2017-07-20 00:47:34

This site is mostly notes, to store useful information. Its easier to find something using browser and have centralized storage and hosting by github.

Base usefull commands - 2017-07-21 07:35:01

Docker Mount portworx volume to the empty container docker run -it --rm --volume-driver pxd -v name=hublndstaging:/data alpine sh Unix Filesystem Remove files that is older than 7 days with specified file mask find /data/ -mtime +7 -name "*.gz" -exec rm {} \; Git base workflow Push updatest from one remote repository to another, very helpful in case of work with github forked repositories git push vp origin/master:refs/heads/master Counting objects: 9, done.

Server optimisation for nginx - 2017-07-21 07:35:01

Optimisation to use nginx node Use the full range of ports. net.ipv4.ip_local_port_range = 1024 65535 net.ipv4.tcp_max_syn_backlog=4096 net.core.netdev_max_backlog=4096 net.core.somaxconn=1024 net.ipv4.tcp_keepalive_time=300 net.core.somaxconn=250000 net.ipv4.tcp_max_syn_backlog=2500 net.core.netdev_max_backlog=2500 net.ipv4.tcp_tw_reuse = 1 Bash resource initialisation echo "10152 65535" > /proc/sys/net/ipv4/ip_local_port_range sysctl -w fs.file-max=128000 sysctl -w net.ipv4.tcp_keepalive_time=300 sysctl -w net.core.somaxconn=250000 sysctl -w net.ipv4.tcp_max_syn_backlog=2500 sysctl -w net.core.netdev_max_backlog=2500 ulimit -n 10240

Git Gpg Verification - 2017-08-12 19:20:06

GPG and git on MacOS Setup Install https://gpgtools.org Create or import a key – see below for https://keybase.io Run gpg -K to see all private keys in current machine, use the key ID for the next step (each gpg key has subkeys with different capabilities, its better to choose subkey with sign S) Configure git to use GPG – replace the key with the one from gpg --K

Query Planner - 2017-08-12 19:20:06

Types of index scans Indexes Sequential Scan: Read every row in the table No reading of index. Reading from indexes is also expensive. Best way to access small tables, that fits in a single disk block. There is no point in this case to use the index. Block size in pg is 8K. Also the best way to read access all rows in a table. Index Scan: Index Scan or Bitmap Index Scan: Read the index, hoping that we won’t have to go to disk.