Tech Notes
key repeat on Mac
To enable key repeat on mac for VSCode + Vim, run the following commands in the Terminal:
1# For VSCode:
2defaults write com.microsoft.VSCode ApplePressAndHoldEnabled -bool false
3
4# To enable global key-repeat
5defaults write -g ApplePressAndHoldEnabled -bool false
Certificate
self-signed:
https://www.linode.com/docs/guides/create-a-self-signed-tls-certificate/
1su - root
2mkdir /root/certs && cd /root/certs
3openssl req -new -newkey rsa:4096 -x509 -sha256 -days 365 -nodes -out MyCertificate.crt -keyout MyKey.key
4chmod 400 /root/certs/MyKey.key
Via certbot:
https://www.linode.com/docs/guides/enabling-https-using-certbot-with-nginx-on-ubuntu/
1sudo certbot --nginx
View the coentent of a certificat (Base64 coded):
1openssl x509 -in certificate.pem -text -noout
wireguard on mac
Read this somewhere earlier about using wireguard-go and cli to activate/deactivate wireguard working perfectly on Ventura while the Appstore wireguard app was not working properly.
- Install wireguard-go and wireguard-tools with brew in terminal:
brew install wireguard-go wireguard-tools
- Create the wireguard config directory and move your config file (exported from the Appstore wireguard app) to that directory:
sudo mkdir /usr/local/etc/wireguard
sudo mv your-config.conf /usr/local/etc/wireguard/wg0.conf
- Activate wireguard with your config:
sudo wg-quick up wg0
-
Check your IP on whatsmyip.com see if its the IP of the wireguard VPN server.
-
To disconnect from wireguard do:
sudo wg-quick down wg0