Skip to content

Instantly share code, notes, and snippets.

View robinsmidsrod's full-sized avatar

Robin Smidsrød robinsmidsrod

View GitHub Profile
@Aergonus
Aergonus / cleanup-cert-manager-secrets.sh
Last active May 22, 2026 11:57 — forked from lisawolderiksen/secrets_without_certificates.sh
Script to detect "orphaned" TLS secrets when Cert manager (cainjector) complains about "unable to fetch certificate that owns the secret", because deleting a Certificate will not (default) delete the Secret. (Ref. https://cert-manager.io/docs/usage/certificate/#cleaning-up-secrets-when-certificates-are-deleted)
#!/bin/bash
# inspired by https://gist.github.com/lisawolderiksen/8c6026ef55f04e4f5d6a288b5e53214b
# Apache 2.0 License
usage() {
cat << EOF
This script detects TLS secrets which refer to certificates that don't exist (anymore).
This is the case when error "unable to fetch certificate that owns the secret" occurs in cert-manager (cainjector) logs.
@NiKiZe
NiKiZe / dnsmasq.conf
Last active September 17, 2025 16:38
Trying to chainload iPXE with full feature set from a lesser featured one. dnsmasq ProxyDHCP edition
# Known working dnsmasq version 2.85 config for iPXE proxydhcp usage
# things to replace:
# * 10.1.1.0 - your subnet
# * eth0 - interface to listen on, or switch to bind-dynamic
# * 10.1.1.2 - your tftp server ip
# * http://gentoo.ipxe.se/boot.ipxe - script to run once inside iPXE
# Debug logging
log-debug
hass:account
hass:alert
hass:alert-circle
hass:altimeter
hass:apple-safari
hass:apps
hass:arrow-bottom-left
hass:arrow-down
hass:arrow-left
hass:arrow-right
@CalvinHartwell
CalvinHartwell / ubuntu-18.04-lts-preseed.cfg
Last active December 10, 2021 19:48
ubuntu-18.04-lts-preseed.cfg
### Preseed for Ubuntu 18.04
# Derived from: https://help.ubuntu.com/lts/installation-guide/example-preseed.txt
### Usage
# We recommend to use the build-iso.sh script to build an image with embedded
# preseed and other required files. In that case the preseed file gets loaded
# automatically and all additional files are available to the installer.
### Unattended Installation
d-i auto-install/enable boolean true
@AdamNaj
AdamNaj / about.md
Last active March 12, 2025 21:47
Z Wave Graph for Home Assistant
@mikejoh
mikejoh / docker-dhcpd.md
Last active January 3, 2026 00:48
Short guide on how to set up a Docker container as a DHCP server

Setting up a Docker container as a DHCP server

In this guide I’ve tested a number of different commands and configurations using Docker to run a container with dhcpd (+macvlan driver) to serve my clients in my home network. In the end i’ll migrate from my Windows 2012 R2 Server running DHCP to a much more lightweight Docker container (7.42 MB in total). Wow.

My home environment:

  • Firewall (Juniper)
    • I’m running IP helper for bootp which in this case means that i relay DHCP requests from various VLANs into one where i've placed my Windows 2012 R2 server. This is also where my container will live. See the FW configuration below:
@robinsmidsrod
robinsmidsrod / elive.ipxe
Created July 7, 2016 11:17
Booting Elive 2.6.18 beta using iPXE and NFS
:elive
echo Starting Elive ${elive-version} for ${initiator-iqn}
# Get the ISO from http://www.elivecd.org/download/beta/
set base-url elive-${elive-version}
set kernel-args \
boot=live swap=off \
ip=dhcp root=/dev/nfs nfsroot=${nfs-server}:${nfs-root}${base-url} \
config username=eliveuser
kernel ${base-url}/live/vmlinuz1 ${kernel-args}
initrd ${base-url}/live/initrd1.img
@robinsmidsrod
robinsmidsrod / nic-menu.ipxe
Created April 7, 2016 10:46
iPXE embedded menu that tries to boot each network adapter in turn
#!ipxe
set timeout 1000
:menu
menu Network boot options for ${uuid}
item --key a default Try to boot (a)ll network adapters in turn
item
item --gap -- --- Detected network adapters ---
set i:int8 0
@robinsmidsrod
robinsmidsrod / signjar.cmd
Last active March 1, 2016 15:26
Batch file for cmd.exe for signing an existing Java archive (.jar file)
@echo off
set startdir=%cd%
set tmpdir="C:\Temp\signjar.tmp"
set notepadpp="C:\Program Files (x86)\Notepad++\notepad++.exe"
set veracrypt="C:\Program Files\VeraCrypt\VeraCrypt.exe"
set vc_volume="\\nas\company\kunder\Fagbokforlaget V&B AS\code-signing\FVB.hc"
set vc_drive="K"
@robinsmidsrod
robinsmidsrod / sysrcd.ipxe
Last active May 1, 2026 12:35
SystemRescueCD iPXE menu script and monkeypatch for preloading sysrcd.dat with iPXE instead of loading from local storage
#!ipxe
set sysrcd-version 4.7.1
echo Booting SystemRescueCD ${sysrcd-version} x86 for ${initiator-iqn}
# Kernel command-line options are documented here:
# http://www.system-rescue-cd.org/Sysresccd-manual-en_Booting_the_CD-ROM#Network_boot_using_PXE
set base-url sysrcd-${sysrcd-version}-x86/
kernel ${base-url}isolinux/altker${archs} setkmap=no net.ifnames=0 backstore=off
initrd ${base-url}isolinux/initram.igz
initrd ${base-url}sysrcd.dat /sysrcd.dat
# Load the ramdisk again as a file inside the ramdisk, so our custom init script