Skip to content

Instantly share code, notes, and snippets.

View bjoern-r's full-sized avatar

Björn bjoern-r

  • Berlin; Germany
View GitHub Profile
@djhojd
djhojd / setup_cups_lxc.sh
Created March 18, 2026 16:58
Proxmox LXC CUPS Setup script for Samsung USB Printer
#!/usr/bin/env bash
# Proxmox LXC CUPS Print Server Setup Script (Hotplug Resilient)
# Run this script on your Proxmox host as root.
# Gist Description: Automates the creation of an unprivileged Debian LXC container on Proxmox, passing through a USB printer, configuring CUPS + Avahi, and enabling robust hotplug support.
set -e
# ================= Configuration =================
CTID=111
TEMPLATE="local:vztmpl/debian-13-standard_13.1-2_amd64.tar.zst"
@jaminmc
jaminmc / install_openwrt_proxmox.sh
Last active March 7, 2026 17:50
Install OpenWrt in a Container on Proxmox 8+!
#!/bin/bash
# Script to create an OpenWrt LXC container in Proxmox
# Supports stable, release candidates (with prompt if newer), and snapshots
# Robust template handling (reuse / redownload / corruption check)
# Aborts cleanly on Esc/Cancel in dialogs
# Default resource values
DEFAULT_MEMORY="256" # MB
DEFAULT_CORES="2" # CPU cores
@scivision
scivision / CMakeLists.txt
Last active October 20, 2022 10:14
CMake find_library force static search
# CMake find_library() defaults to shared library before static.
# this order can be programatically set as below.
cmake_minimum_required(VERSION 3.1)
project(demo LANGUAGES C)
# arbitrary library to demo search
if(MSVC)
set(libname msvcrt)
else()
@mrlnc
mrlnc / pysim-suci.md
Last active October 23, 2025 19:41
pysim-suci.md
@Jamesits
Jamesits / asa_request_cert.sh
Last active January 16, 2026 18:18
Let's Encrypt cert requesting and signing (using acme.sh) for Cisco ASA / AnyConnect
#!/bin/bash
set -Eeuo pipefail
# Automatic cert requesting and signing for Cisco ASA
#
# Requirements
# - Domain hosted in Aliyun DNS (for other DNS services, adjust the acme.sh arguments)
# - ASA with rest-agent enabled
# - Local computer: openssl, git, ca-certificates
#
#!/bin/bash
set -e
INFILE="rc3-mcr-11512-eng-deu-CIA_vs_Wikileaks_hd.mp4"
OUTDIR="output/"
FRAMES=1000
@yvesh
yvesh / proxmox-zfs-encryption.md
Last active October 14, 2025 06:41
Proxmox 6.1 ZFS native full disk (ZFS root) encryption.

Simple guide for fulldisk encryption with Proxmox and ZFS native encryption

Install normally using the installer, after the setup reboot into recovery mode (from the USB stick). Make sure to install in UEFI mode (you need systemd-boot).

If the USB stick is not working for you, because of the old Kernel version (2.6.x), you can also use an Ubuntu 19.10 / 20.04 boot stick. ZFS suport is enabled there out of the box.

Steps:

@yvesh
yvesh / gist:64ec1f64e3c7c26497282b776348f662
Created December 19, 2019 11:49
Proxmox LXC Arch Linux Container with passed through GPU, KVM, sound, keyboard etc. (Xorg with amdgpu working), Looking Glass Host - Linux Main OS in a container
arch: amd64
cores: 24
features: fuse=1,mount=nfs;cifs,nesting=1
hostname: archxorg
memory: 64000
net0: name=eth0,bridge=vmbr0,firewall=1,hwaddr=XX:XX:XX:XX:XX.XX,ip=dhcp,type=veth
ostype: archlinux
rootfs: local-zfs:subvol-100-disk-0,size=500G
swap: 512
lxc.autodev: 1
@Informatic
Informatic / domain.xml
Last active March 14, 2026 03:54
How to use Windows 10 OEM license in libvirt VM (<smbios mode='host' /> does not work as Windows seems to verify UUID; apparmor/security configuration changes may be needed)
<domain type='kvm' xmlns:qemu='http://libvirt.org/schemas/domain/qemu/1.0'>
<!-- ... -->
<qemu:commandline>
<qemu:arg value='-acpitable'/>
<qemu:arg value='file=/some/path/slic.bin'/>
<qemu:arg value='-acpitable'/>
<qemu:arg value='file=/some/path/msdm.bin'/>
<qemu:arg value='-smbios'/>
<qemu:arg value='file=/some/path/smbios_type_0.bin'/>
<qemu:arg value='-smbios'/>