Skip to content

Instantly share code, notes, and snippets.

@fideloper
fideloper / certbot.sh
Last active April 28, 2024 11:35
Certbot on Ubuntu, wildcard subdomains via CloudFlare DNS challenge
# Used on Ubuntu 18.04 and 20.04
# Find instructions for other OSes here: https://certbot.eff.org/instructions
# Install Certbot via Snaps
sudo snap install core; sudo snap refresh core
sudo snap install --classic certbot
sudo ln -s /snap/bin/certbot /usr/bin/certbot
# Install DNS CloudFlare plugin
sudo snap set certbot trust-plugin-with-root=ok
@kiler129
kiler129 / prevent-host-driver-in-pci-pass.md
Last active April 13, 2024 02:02
Definitely prevent stubborn devices from being bound by the host driver in PCI passthrough scenario

Scenario

You're running a KVM-based virtualization. You want to do PCI/PCIe passthrough of some device. You don't want it to attach to the host OS at all.

Your device looks like that:

00:1f.2 SATA controller [0106]: Intel Corporation 6 Series/C200 Series Chipset Family SATA AHCI Controller [8086:1c02] (rev 05)
	Subsystem: Hewlett-Packard Company 6 Series/C200 Series Chipset Family 6 port Desktop SATA AHCI Controller [103c:330d]
	Kernel driver in use: ahci
	Kernel modules: ahci
@ericbarch
ericbarch / chkraid.sh
Last active February 5, 2024 20:08
Dead simple alerts when your mdadm array degrades without setting up a full blown MTA
#!/bin/bash
# dead simple mdadm alerts via webhook
# by eric barch [v1.0 -- 2018.11.26]
# 1. place this file in ~/chkraid.sh
# chmod +x ~/chkraid.sh
# 2. drop this in your crontab: