Skip to content

Instantly share code, notes, and snippets.

@granbom
granbom / certbot
Last active June 14, 2018 02:47
certbot
certbot certonly --webroot -w /var/www/example/ -d www.example.com -d example.com
certbot certonly --webroot -w /var/www/example/ -d example.com -d www.example.com --post-hook="service nginx reload"
certbot certificates
# windows
certbot certonly --manual --preferred-challenges http -d example.com -d www.example.com
openssl pkcs12 -inkey privkey.pem -in cert.pem -in fullchain.pem -export -out example.pfx
server {
listen 80;
server_name example.com www.example.com;
access_log off;
return 301 https://example.com$request_uri;
}
server {
listen 443 ssl;
@granbom
granbom / rsync
Last active January 19, 2018 23:16
rsync -r -e "ssh" --progress ~/repos/granbom.se/_site/ cloud:/var/www/granbom/_site
/etc/sudoers.d/90-init-users
pg ALL=(ALL) NOPASSWD:ALL
sudo apt install build-essential
sudo apt install git
git config --global user.name "John Doe"
git config --global user.email johndoe@example.com
* ruby and gem
https://github.com/rvm/ubuntu_rvm
[user]
name = granbom
email = pg@pgconsulting.se
[credential]
helper = cache --timeout=3600
[push]
default = simple