Skip to content

Instantly share code, notes, and snippets.

View consentfactory's full-sized avatar

Jimmy Taylor consentfactory

View GitHub Profile
@whiskerz007
whiskerz007 / gist:53c6aa5d624154bacbbc54880e1e3b2a
Last active November 10, 2024 02:39
How to setup a community version of Proxmox VE 5.x-6.x
# Disable Commercial Repo
sed -i "s/^deb/\#deb/" /etc/apt/sources.list.d/pve-enterprise.list
apt-get update
# Add PVE Community Repo
echo "deb http://download.proxmox.com/debian/pve $(grep "VERSION=" /etc/os-release | sed -n 's/.*(\(.*\)).*/\1/p') pve-no-subscription" > /etc/apt/sources.list.d/pve-no-enterprise.list
apt-get update
# Remove nag
echo "DPkg::Post-Invoke { \"dpkg -V proxmox-widget-toolkit | grep -q '/proxmoxlib\.js$'; if [ \$? -eq 1 ]; then { echo 'Removing subscription nag from UI...'; sed -i '/data.status/{s/\!//;s/Active/NoMoreNagging/}' /usr/share/javascript/proxmox-widget-toolkit/proxmoxlib.js; }; fi\"; };" > /etc/apt/apt.conf.d/no-nag-script
@ejpcmac
ejpcmac / zfs-clean-snapshot
Last active February 19, 2023 13:45
Clean old ZFS auto-snapshots on backup destinations
#!/bin/sh
filter_snapshots() {
echo "$1" | grep $2 | tac | tail -n +$(($3 + 1)) | sed 's/.*@//' | sed -z 's/\n/,/g'
}
if [ $# -ne 6 ]; then
echo "usage: $0 <dataset> <frequent> <hourly> <daily> <weekly> <monthly>"
exit 1
fi