Option 1: login with ssh server with "ssh <server_name>" from a device that is already authorized
Option 2: login from the web console if your device is not already authorized
For easier reference, you can add comment to describe the key.
| #!/bin/bash | |
| ## Install rsync inside Git for Windows | |
| ## Check for updates on: https://gist.github.com/beenotung/888af731b7ccf56f9fb429fc4644ea38 | |
| set -e | |
| set -o pipefail | |
| dir="$HOME/local/opt/rsync" |
Option 1: login with ssh server with "ssh <server_name>" from a device that is already authorized
Option 2: login from the web console if your device is not already authorized
For easier reference, you can add comment to describe the key.
| # Launch the editor: sudo crontab -e | |
| # | |
| # For more information see the manual pages of crontab(5) and cron(8) | |
| # | |
| # m h dom mon dow command | |
| M H * * * certbot renew --post-hook "service nginx restart" | |
| # M should be a random number range: 0..59 | |
| # H should be a random number range: 0..23 |
| wget \ | |
| --recursive \ | |
| --level=inf \ | |
| --waitretry=10 \ | |
| --retry-connrefused \ | |
| --page-requisites \ | |
| --convert-links \ | |
| --html-extension \ | |
| --adjust-extension \ | |
| --span-hosts \ |
| let time = 0 | |
| Date.now = () => { | |
| time++ | |
| return time | |
| } | |
| class Cache { | |
| pool = {} | |
| size = 0 |
| #!/bin/bash | |
| set -e | |
| set -o pipefail | |
| FILTER_BRANCH_SQUELCH_WARNING=1 git filter-branch --force --index-filter "git rm --cached --ignore-unmatch $@" --prune-empty --tag-name-filter cat -- --all |
| #!/bin/bash | |
| set -e | |
| set -o pipefail | |
| case "$1" in | |
| -s|--sum) | |
| git rev-list --objects --all \ | |
| | git cat-file --batch-check='%(objecttype) %(objectsize) %(rest)' \ | |
| | sed -n 's/^blob //p' \ | |
| | awk '{x+=$1}END{print x}' \ | |
| | $(command -v gnumfmt || echo numfmt) --field=1 --to=iec-i --suffix=B --round=nearest |
| server { | |
| listen 80; | |
| listen [::]:80; | |
| server_name example.cc; | |
| # client_max_body_size 1M; | |
| location / { | |
| proxy_pass http://localhost:8080; |
| command_not_found_handle() { | |
| # Do not run within a pipe | |
| if test ! -t 1; then | |
| echo "command not found: $1" >&2 | |
| return 127 | |
| fi | |
| # run local npm package if exist | |
| cmd="node_modules/.bin/$1" | |
| if [ -f "$cmd" ]; then |
| #!/bin/bash | |
| set -e | |
| set -o pipefail | |
| echo >&2 original: yarn $@ | |
| if [ "$1" == 'install' ] || [ "$1" == 'add' ] ; then | |
| shift | |
| if [ "$1" == '--silent' ]; then | |
| shift | |
| fi | |
| echo >&2 mapto: pnpm install --prefer-offline $@ |