Skip to content

Instantly share code, notes, and snippets.

View QNimbus's full-sized avatar
🎯
Focusing

Bas QNimbus

🎯
Focusing
  • The Netherlands
View GitHub Profile
@QNimbus
QNimbus / proxmox.lib.sh
Last active June 27, 2025 12:16
VM Creation script #proxmox
#!/usr/bin/env bash
# LibVersion: 1.1.4
#
# Proxmox VM management functions for Talos/Kubernetes.
# Relies on:
# - Logging functions (log_info, log_error, etc.) from the main script.
# - VERBOSE_FLAG from the main script.
# - run_* utility functions (run_quiet, etc.) from utils.lib.sh.
# - Default configuration variables (DEFAULT_VM_NAME_PREFIX, CORES, RAM_MB, etc.) from main script.
# - Option variables (CORES_OPT, RAM_MB_OPT, etc.) from main script argument parsing.
@QNimbus
QNimbus / watchdog.md
Last active June 18, 2025 09:27
Proxmox pveproxy watchdog #proxmox

pveproxy Watchdog & FD-Limit Setup

  1. Upgrade & reboot

    apt update && apt full-upgrade
    reboot

    Why: pull in latest PVE fixes and kernel.

@QNimbus
QNimbus / talos_download.sh
Last active June 19, 2025 10:45
Proxmox Talos download script #proxmox
#!/usr/bin/env bash
# To download: `curl -O https://gist.githubusercontent.com/QNimbus/12b7b0651e196f1a80f1a7f6de66811e/raw/talos_download.sh`
# To run: `chmod +x talos_download.sh && ./talos_download.sh --id <your-schematic-id>`
# ====================================================
# Talos Linux ISO Download Script
# ====================================================
#
# Author: B. van Wetten <[email protected]>
@QNimbus
QNimbus / create_vms.sh
Last active June 16, 2025 12:26
Proxmox k3s create script #proxmox #shell #scripts
#!/usr/bin/env bash
# ====================================================
# K3S VM Provisioning Script
# ====================================================
#
# This script automates the provisioning of K3s VMs on Proxmox VE cluster.
# It performs the following operations:
# 1. Creates server, worker, and storage VMs by cloning a template VM
# 2. Configures resources (RAM, CPU, disk) for each VM type
@QNimbus
QNimbus / destroy_vms.sh
Last active June 14, 2025 09:23
Proxmox k3s destroy script #proxmox #shell #scripts
#!/usr/bin/env bash
# To download: `curl -O https://gist.githubusercontent.com/QNimbus/f6f3253e66b9747034be12d0e79d8afe/raw/destroy_vms.sh`
# To run: `curl -s https://gist.githubusercontent.com/QNimbus/f6f3253e66b9747034be12d0e79d8afe/raw/destroy_vms.sh > destroy_vms.sh && chmod +x destroy_vms.sh && ./destroy_vms.sh`
# ====================================================
# K3S VM Destruction Script
# ====================================================
#
# This script automates the destruction of K3s VMs on Proxmox VE cluster.
@QNimbus
QNimbus / .bash_aliases
Last active May 27, 2025 14:04
Bash aliases #shell #bash #linux
# Safe replacement for 'rm'
function rm() {
# Check if trash-put is available
if ! command -v trash-put >/dev/null 2>&1; then
echo -e "❌ 'trash-put' not found! Nothing was deleted."
echo -e "💡 You can install it with:\n\n sudo apt-get update && sudo apt-get install trash-cli\n"
return 1
fi
local args=()
@QNimbus
QNimbus / interfaces.pve1
Last active June 25, 2025 06:50
Proxmox #proxmox
# network interface settings; autogenerated
# Please do NOT modify this file directly, unless you know what
# you're doing.
#
# If you want to manage parts of the network configuration manually,
# please utilize the 'source' or 'source-directory' directives to do
# so.
# PVE will preserve these directives, but will NOT read its network
# configuration from sourced files, so do not attempt to move any of
# the PVE managed interfaces into external files!
@QNimbus
QNimbus / Caddyfile
Last active January 28, 2025 10:00
Caddy welcome page
caddy.apps.vwn.io {
root * /srv
file_server
encode gzip zstd
log {
output stdout
format console
}
tls {
@QNimbus
QNimbus / certificate_import.py
Last active January 13, 2025 12:11
Certificate import #truenas #ssl
import requests
import json
import time
import os
import sys
import argparse
from datetime import datetime
import logging
from urllib.parse import urlparse
import urllib3
import requests
import json
import time
import os
import sys
import argparse
from datetime import datetime
import logging
from urllib.parse import urlparse
import urllib3