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 / unifi_log_collector.sh
Created July 5, 2025 12:01
Unifi troubleshooting script #unifi
#!/bin/bash
#
# unifi_log_collector.sh
# A script to collect logs and diagnostics from a UniFi device, with options for aggregation and tailing.
#
# Author: B. van Wetten
# Date: 2025-07-05
#
# Usage:
# 1. Make the script executable: chmod +x unifi_log_collector.sh
@QNimbus
QNimbus / kustomization.sh
Created July 2, 2025 17:37
Kubernetes #kubernetes
#!/usr/bin/env bash
################################################################################
# Flux Kustomization Management Script
################################################################################
#
# Description: Generic script for suspending and resuming Flux Kustomizations
# Automatically discovers related kustomizations based on the script path.
#
# Author: Generated for home-ops
@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 July 7, 2025 20:00
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 July 11, 2025 19:58
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 {