Skip to content

Instantly share code, notes, and snippets.

@kenrmayfield
kenrmayfield / newfile.md
Created September 30, 2025 13:29 — forked from Cordtus/newfile.md
Enabling GPU access by LXC containers

NVIDIA GPU Access in LXC/LXD Containers

This guide explains how to properly configure NVIDIA GPU access for your Telegram Sticker Bot running in an LXC/LXD container.

🎯 Prerequisites

Host System Requirements

  • NVIDIA GPU with drivers installed
  • LXD/LXC properly installed
  • NVIDIA Container Runtime
@kenrmayfield
kenrmayfield / Copy-GPU-Drivers-VM.ps1 - PowerShell script to copy GPU drivers to Hyper-V Virtual Machine for passthrough.
Last active September 6, 2025 12:01 — forked from ThioJoe/Copy-GPU-Drivers-VM.ps1
PowerShell script to copy GPU drivers to Hyper-V Virtual Machine for passthrough.
# Description: This script will automatically copy the necessary GPU drivers from your current host machine into a Hyper-V Virtual Machine
# so you can pass through the GPU to the VM. You should run this whenever you update your graphics drivers on the host.
#
# Author: ThioJoe -- https://github.com/ThioJoe
#
# Note: Currently this only works for Nvidia GPUs. But it does support if you have multiple GPUs.
#
# OPTIONAL ARGUMENTS:
# -debug | Enables debug messages that pause the script for each step (No additional string required, just add -debug)
# -name | Sets the virtual machine name so it doesn't need to ask

Proxmox VE nag removal, manually - Proxmox PVE 8.4.2+, PBS 3.4.3+

TL;DR Brief look at what exactly brings up the dreaded notice regarding no valid subscription. Eliminate bad UX that no user of free software should need to endure.

Turning a cluster member into a standalone node

TL;DR Making a node that was once part of a cluster standalone again can be counter-intuitive compared to simply removing nodes from list of cluster members.


ORIGINAL POST Turning a cluster member into a standalone node

Hey guys, me again. After a day of testing and fucking with VMware/Proxmox/The VM itself, i finially got it working!!!!

I just wanted to come back and make another post to firstly thank everyone who helped me figure this out. So many awesome suggestions. Moment of silence for those awesome people and the sheer amount of people at that! Glad to be a part of this community. Couldn't have done it without you guys!

Now, on to the second part. As i promissed, i am going to walk through all the steps i took to go from a VMware Player 12 VM to a glorious Proxmox VM.

Does it boot (AKA, bricked from the get-go)? Lets find out!

1.0. I first shutdown the VM in VMware Player 12 and copied all .vmdk files to an external HDD so i can start the prod server up again since player didn't have a export function. Technically there is a [ovf exporter tool](https://developer.broadcom.com/tools/open-virtualization-format-ovf-too

@kenrmayfield
kenrmayfield / proxmox-vm-gpu-nvidia-automated-developer-setup.sh
Last active May 26, 2025 00:46 — forked from erdaltoprak/proxmox-vm-gpu-nvidia-automated-developer-setup.sh
proxmox-vm-gpu-nvidia-automated-developer-setup.sh - AI Setup
#!/bin/bash
# Configuration parameters
PYTHON_VERSION="3.11.11"
CUDA_VERSION="12.6.3"
CUDA_DRIVER="560.35.05"
SCRIPT_VERSION="1.0.0"
GITHUB_URL="https://gist.github.com/erdaltoprak/cdc1ec4056b81a9da540229dcde3aa0b"
CLEANUP_CUDA="no" # Set to "no" to keep the CUDA installer and "yes" to remove it

ZFSBootMenu setup for Proxmox VE

TL;DR A complete feature-set bootloader for ZFS on root install. It allows booting off multiple datasets, selecting kernels, creating snapshots and clones, rollbacks and much more - as much as a rescue system would.


ORIGINAL POST ZFSBootMenu setup for Proxmox VE

@kenrmayfield
kenrmayfield / prevent-idle.ps1
Created April 17, 2025 00:57 — forked from Chinoman10/prevent-idle.ps1
Prevent your computer from showing the screensaver/locking
<# This PowerShell script can simply be copied over to a "PowerShell IDE" window, and then ran for as long as you want.
The time this script remains active (sending mouse events to Windows so it things you're "still there", is the number
of iterations on line 6 (default: 200) multiplied by the number of seconds on line 11 (default: 290).
If your computer locks/marks as Away on Skype/Teams only after 10 minutes for example, change 290 seconds to 590.
#>
<# If you get a "File cannot be loaded because running scripts is disabled on this system.", then type in the PowerShell ISE console:
powershell -ExecutionPolicy ByPass -File filename-here.ps1
#>
param($iterations = 200)
@kenrmayfield
kenrmayfield / startup apps.vbs
Created April 17, 2025 00:55 — forked from Chinoman10/startup apps.vbs
PowerShell+VBScript to startup any Windows App or Program by it's name (without having to hardcode folder locations)
' Just put this file inside the folder: %AppData%\Microsoft\Windows\Start Menu\Programs\Startup
' And replace the names of the programs to your liking
apps = Array("WhatsApp Desktop", "Stream Deck")
Set WshShell = CreateObject("WScript.Shell" )
For each app in apps
command = "Start Shell:AppsFolder\\\""$(Get-StartApps -Name \"""&app&"\"" | foreach {$_.AppID})\"""
pscmd = "powershell -command " & command
WshShell.Run pscmd,0
Next
@kenrmayfield
kenrmayfield / centos8.md
Created February 13, 2025 00:11 — forked from hkneptune/centos8.md
Upgrade CentOS Linux 8 to CentOS Stream 8

Fix the AppStream Issue

[root@centos8 ~]# yum update
CentOS-8 - AppStream 71 B/s | 38 B 00:00
Error: Failed to download metadata for repo 'AppStream': Cannot prepare internal mirrorlist: No URLs in mirrorlist

As CentOS Linux 8 had reached the End Of Life (EOL) on December 31st, 2021. It means that CentOS 8 will no longer receive development resources from the official CentOS project. To keep your CentOS updated, you may update the mirrors or upgrade to CentOS Stream.