Skip to content

Instantly share code, notes, and snippets.

View paolobasso99's full-sized avatar
👋

Paolo Basso paolobasso99

👋
View GitHub Profile
@paolobasso99
paolobasso99 / home_wg0.conf
Created March 29, 2021 19:41
Wireguard on VPS to expose home
[Interface]
PrivateKey = xxxx
Address = 10.0.0.2/24
[Peer]
# VPS
PublicKey = xxxx
AllowedIPs = 10.0.0.1/32
Endpoint = 35.xxx.xxx.xxx:54321
PersistentKeepalive = 25
@paolobasso99
paolobasso99 / trakt_jackett.css
Last active March 31, 2021 15:17
Inject Jackett links to Trakt
/* For buttons */
#info-wrapper .affiliate-links .section a.appendedFollowShows .icon .fa {
font-size: 22px;
padding-top: 7px;
}
#info-wrapper .affiliate-links .section a.appendedTorrent .icon .fa {
font-size: 22px;
padding-top: 7px;
@paolobasso99
paolobasso99 / cloudflare-ufw.sh
Last active March 11, 2021 02:07
Cloudflare UFW rules
#!/bin/sh
# Automatically whitelist Cloudflare ips with UFW.
# This script should be runned daily with a cron job (place it in /etc/cron.daily).
# Remember to make this script executable.
# Reference: https://github.com/Paul-Reed/cloudflare-ufw/blob/master/cloudflare-ufw.sh
curl -s https://www.cloudflare.com/ips-v4 -o /tmp/cf_ips
curl -s https://www.cloudflare.com/ips-v6 >> /tmp/cf_ips
@paolobasso99
paolobasso99 / restic-backup.sh
Last active March 3, 2024 15:35
Restic backup script
#!/bin/bash
# This script will run a restic backup and remove snapshots according to a policy.
# In order for this script to work two environment vaiables must be set:
# RESTIC_PASSWORD which is the restic repository password (or read https://restic.readthedocs.io/en/latest/faq.html#how-can-i-specify-encryption-passwords-automatically)
# MY_RESTIC_LOGS_PATH which is the path where to save logs. For example: /home/paolo/restic/logs
#
# WARNING: This script prunes ond backups! Be careful not to delete backups that you need.
# Customize the removing policy according to https://restic.readthedocs.io/en/latest/060_forget.html#removing-snapshots-according-to-a-policy
#