Skip to content

Instantly share code, notes, and snippets.

View beenotung's full-sized avatar

Beeno Tung beenotung

View GitHub Profile
wget \
--recursive \
--level=inf \
--waitretry=10 \
--retry-connrefused \
--page-requisites \
--convert-links \
--html-extension \
--adjust-extension \
--span-hosts \
@beenotung
beenotung / certbot-renew-crontab.txt
Last active March 23, 2024 11:18
crontab to auto renew https cert with certbot and nginx
# 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
@beenotung
beenotung / add-ssh-key.md
Created May 23, 2024 11:21
steps to add new public key to ssh server

Step 1: Login to the ssh server

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

Step 2: add the public key to .ssh/authorized_keys

For easier reference, you can add comment to describe the key.

@beenotung
beenotung / install-rsync.sh
Last active December 20, 2024 07:09
Install rsync inside Git for Windows
#!/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"