Starting Vim
vim [file1] [file2] ...
| # to generate your dhparam.pem file, run in the terminal | |
| openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048 |
The default formula use by AWS RDS to calculate the max_connections parameter is: LEAST({DBInstanceClassMemory/9531392},5000)
But It's hard to find the exact value of DBInstanceClassMemory.
So, here are the values I got when I ran the SQL commmand: show max_connections; in some RDS instances:
| Instance type | RAM (GB) | max_connections |
|---|---|---|
| db.t2.small | 2 | 198 |
| db.t2.medium | 4 | 413 |
| kubectl get services # List all services | |
| kubectl get pods # List all pods | |
| kubectl get nodes -w # Watch nodes continuously | |
| kubectl version # Get version information | |
| kubectl cluster-info # Get cluster information | |
| kubectl config view # Get the configuration | |
| kubectl describe node <node> # Output information about a node | |
| kubectl get pods # List the current pods | |
| kubectl describe pod <name> # Describe pod <name> | |
| kubectl get rc # List the replication controllers |
| ; Sample supervisor config file. | |
| [unix_http_server] | |
| file=/tmp/supervisor.sock ; (the path to the socket file) | |
| ;chmod=0700 ; sockef file mode (default 0700) | |
| ;chown=nobody:nogroup ; socket file uid:gid owner | |
| ;username=user ; (default is no username (open server)) | |
| ;password=123 ; (default is no password (open server)) | |
| ;[inet_http_server] ; inet (TCP) server disabled by default |
| #!/bin/bash | |
| target_branch="production" | |
| working_tree="PATH_TO_DEPLOY" | |
| while read oldrev newrev refname | |
| do | |
| branch=$(git rev-parse --symbolic --abbrev-ref $refname) | |
| if [ -n "$branch" ] && [ "$target_branch" == "$branch" ]; then | |
| #!/bin/sh | |
| # Check to see if we are on master branch. Stop accidental commits | |
| if [ $(git symbolic-ref HEAD 2>/dev/null) == "refs/heads/master" ] | |
| then | |
| echo "Cannot commit to master branch" | |
| exit 1 | |
| fi | |
| exit 0 |
| #!/bin/bash | |
| set -eux | |
| create_commit() { | |
| git checkout "$1" | |
| echo "$2" > src.txt | |
| git commit -am "$2" | |
| git log --graph --pretty=format:'%s %C(yellow)%d%Creset' | |
| sleep 2 # make the commits distinctive in time |