One liners, snippets & short code stuff that I’m always forgetting:
Passwordless SSH login:
Generate a key:
ssh-keygen -t rsa
Send the key to remote server
ssh-copy-id -i ~/.ssh/id_rsa.pub YOUR_USER_NAME@IP_ADDRESS_OF_THE_SERVER
Finding iCloud Documents from Terminal
(doing a ln -s in Home Dir is helpful, wrap paths in quotes though because of spaces)
~/Library/Mobile\ Documents/com~apple~CloudDocs
Create a static copy of a dynamic website:
wget -k -K -E -r -l 10 -p -N -F --restrict-file-names=windows -nH http://website.com/
Renew a let’s encrypt certificate
sudo certbot [either --nginx or --apache] renew
//if you're blocking port 80 at your firewall, you need to temporarily enable it in order for the certbot verification process:
e.g.
Performing the following challenges:
http-01 challenge for
// to work, then you can disable it again.
How to install python on a new Mac: https://www.jimwillis.org/2024/02/14/installing-python-on-new-mac/