🤖 Useful commands

Lists of commands I use often, but also forget often.

🔐

Security & privacy

Make a password encrypted backup of a directory
Decrypt an encrypted directory
🐧

Linux

Add user to www-data
set www-data to owner of folder
Change folder permissions
Change file permissions
Create symbolic link between sites-available and sites-enabled
Setup new SSL/TLS Certificate with Let's Encrypt
WARN: Might cause issues on servers with 512MB of RAM or less
Renew domain for example.com
If you don't specify domain, default domain will be run.
Check /usr/local/etc/le-renew-webroot.ini for default settings
Go to /usr/local/etc/ to add more domains. Add file le-cli-example.com.ini
Renew all certificates
Backup folder to AWS S3 using the AWS cli
Cron job schedule for backups
👨‍💻

Web dev & DevOps

Create self-signed certificate for local use
Port forward a remote port to a local one
Very handy for using local software with remote data
MySQL example: ssh user@server -L 3307:localhost:3306
localhost:3307 now works locally as localhost:3306 works on the server
XMLHttpRequest for formdata
🪟

Windows

Create a self-signed certificate
NOTE: Requires admin
Install Chocolatey
NOTE: Requires admin