Skip to content

Instantly share code, notes, and snippets.

View bgulla's full-sized avatar
🦃
fast and loose is still fast.

Brandon bgulla

🦃
fast and loose is still fast.
  • Rancher Federal
  • Virginia
View GitHub Profile
@bgulla
bgulla / Makefile
Created October 23, 2024 19:44
Velero Makefile Helper Outer 5000
# Define some variables
NAMESPACE ?= default
BACKUP_NAME ?= backup-$(shell date +%Y%m%d%H%M%S)
RESTORE_NAME ?= restore-$(shell date +%Y%m%d%H%M%S)
SCHEDULE_NAME ?= daily-backup
BUCKET ?= velero-backup-bucket
POLL_INTERVAL ?= 5 # Check backup status every 5 seconds
# Help message
.PHONY: help
@bgulla
bgulla / pve_delete_vm.sh
Created October 16, 2024 16:57
Proxmox VM & Disk Script
#!/bin/bash
# Script to delete a Proxmox VM and all associated hard disks.
# Usage:
# ./delete_vm_with_disks.sh <vmid> - Deletes the specified VM after user confirmation.
# ./delete_vm_with_disks.sh <vmid> --force - Force deletes the specified VM without confirmation.
#
# Arguments:
# <vmid> : The ID of the Proxmox VM to delete.
# --force : Optional argument to skip the confirmation prompt.
@bgulla
bgulla / tpi-uart.sh
Last active September 6, 2024 17:50
Turing PI UART Helper Script
#!/bin/bash
# Check if an argument was provided
if [[ -z "$1" ]]; then
echo "Usage: $0 <node number (1-4)>"
exit 1
fi
# Map node number to serial device
case "$1" in
@bgulla
bgulla / playbook.yml
Created July 26, 2024 00:32
PiKVM Letsencrypt SSL Playbook (Cloudflare-dns)
---
- name: Setup Let's Encrypt with Cloudflare DNS on PiKVM
hosts: pikvm
become: yes
vars:
cloudflare_email: "[email protected]"
cloudflare_api_key: "your-cloudflare-api-key"
domain: "pikvm.example.com"
auth_file_path: "/var/lib/kvmd/pst/data/certbot/runroot/.cloudflare.auth"
@bgulla
bgulla / create_synology_vm.sh
Created June 24, 2024 14:14
Synology ARC on Proxmox Helper Script
#!/bin/bash
# Standard disclaimer
echo "This script is provided as-is without any warranty. Use it at your own risk. Do not use this script for any illegal activities."
# Default values
DEFAULT_NAME="synology-arc-test"
DEFAULT_MEMORY="4096"
DEFAULT_CORES="4"
DEFAULT_VM_ID="119"
@bgulla
bgulla / gist:550b4b580b0792668b1c898b595aa747
Last active May 15, 2024 22:23
Flashing Dell XR4000 Witness Node (with something other than ESXI)

Flashing the Dell XR4000 Witness Node (Nano Processing Unit) with Harvester

Screenshot 2024-05-15 at 5 01 41 PM

Once you have serial access to the device, reboot the host and boot to either USB or PXE and install Harvester per usual.

What is the Nano Processing Unit

image

Because the small Atom-based witness node operates in a headless capacity, we need to serial into the node. Here's how you do it.

@bgulla
bgulla / proxmox_webvnc_fix.sh
Last active July 7, 2023 12:32
Proxmox script to fix WebVNC after an IP change
#!/bin/bash
## https://forum.proxmox.com/threads/console-failed-to-connect-to-server-host-key-verification-failed.78957/
# Usage: ./proxmox_webvnc_fix.sh <shorthostname>
# Notes: may need to run twice for the fix to take.
set -e
DOMAIN="lark.lol"
if [ $# -eq 0 ]; then
echo "No hostname provided. Exiting..."
@bgulla
bgulla / Makefile
Created April 17, 2023 20:31
RKE2/K3s Nvidia GPU-Operator installation
prep:
helm repo add nvidia https://helm.ngc.nvidia.com/nvidia \
&& helm repo update
install:
helm install --wait nvidiagpu \
-n gpu-operator --create-namespace \
--set toolkit.env[0].name=CONTAINERD_CONFIG \
--set toolkit.env[0].value=/var/lib/rancher/k3s/agent/etc/containerd/config.toml \
--set toolkit.env[1].name=CONTAINERD_SOCKET \
@bgulla
bgulla / webos_tv_root.txt
Last active December 28, 2022 14:29
LG WebOS Root Instructions from #OpenLGTV Discord
##
## shoutout to https://github.com/webosbrew
## I lifted these instructions from the #OpenLGTV discord (under pinned msgs). The instructions are for Windows but just replace Putty with a terminal and you're good to go.
1. Enable Developer Mode: https://webostv.developer.lge.com/develop/getting-started/developer-mode-app
2. Download Software:
a. WebOS-Dev-Manager - https://github.com/webosbrew/dev-manager-desktop/releases
b. PuTTY - https://www.chiark.greenend.org.uk/~sgtatham/putty/latest.html
c. Homebrew Channel 0.5.1 ipk - https://github.com/webosbrew/webos-homebrew-channel/releases
3. In WebOS-Dev-Manager perform these steps:
@bgulla
bgulla / coral-playbook.yml
Created November 24, 2022 02:50
Google Coral GPU Ubuntu playbook
---
- hosts: all
tasks:
# ansible all -i closet.lark.lol -u root coral-playbook.yaml
# deb https://packages.cloud.google.com/apt coral-edgetpu-stable main
# https://packages.cloud.google.com/apt/doc/apt-key.gpg
- name: Add an Apt signing key, uses whichever key is at the URL
ansible.builtin.apt_key:
url: https://packages.cloud.google.com/apt/doc/apt-key.gpg