Skip to content

Instantly share code, notes, and snippets.

View dch's full-sized avatar
🛋️

Dave Cottlehuber dch

🛋️
View GitHub Profile
@dch
dch / spicey-rub.md
Last active July 15, 2023 11:49
Dave's magic Spicey Dry Rub

2023 Spicey Rub 2.0

  • measurements don't need to be precise

  • adjust chilli, cayenne & cumin to taste

  • leave your recommendations in the comments!

  • T Tablespoon

  • t teaspoon

  • C metric cup ~ 200mL

This file has been truncated, but you can view the full file.
-- SPDX-License-Identifier: CC0-1.0
-- vim:syntax=lua:set ts=4 sw=4:
-- Refer to manual: https://knot-resolver.readthedocs.org/en/stable/
-- Network interface configuration
net.listen('127.0.0.1', 53, { kind = 'dns' })
net.listen('100.64.0.0', 53, { kind = 'dns' })
net.listen('172.16.1.1', 53, { kind = 'dns' })
net.listen('172.16.2.1', 53, { kind = 'dns' })
net.listen('::1', 53, { kind = 'dns', freebind = true })
@dch
dch / _readme.md
Last active October 3, 2022 21:17
GET haproxy sticky table data as json

HTTP JSON API for haproxy stick tables

intro

A quick sketch of haproxy config with lua to provide an HTTP API to query stick tables in JSON format. Probably has a few rough edges around output as kv_pairs() doesn't really understand its output, just building up strings. A proper table traversal function would be better, and verifying its actually valid JSON would be even better.

@dch
dch / bebuild.sh
Last active April 27, 2025 15:55
#!/bin/sh -eu
# echo 'WITH_CCACHE_BUILD=yes' > /etc/src.conf
# echo 'WITH_META_MODE=yes' > /etc/src-env.conf
# echo 'WITH_DIRDEPS_BUILD=yes' >> /etc/src-env.conf
# hide ports & poudriere's make.conf from src builds
export __MAKE_CONF=/dev/null
umask 0022
cd /usr/src
@dch
dch / arm64_zig_0.8.0.log
Last active June 11, 2021 19:20
poudriere says no
=>> Building lang/zig
build started at Fri Jun 11 19:14:25 UTC 2021
port directory: /usr/ports/lang/zig
package name: zig-0.8.0
building for: FreeBSD pkg.skunkwerks.at 13.0-RELEASE FreeBSD 13.0-RELEASE arm64
maintained by: [email protected]
Makefile datestamp: -rw-r--r-- 1 dch wheel 893 Jun 11 17:36 /usr/local/poudriere/data/.m/13_0_a64-default/01//usr/ports/lang/zig/Makefile
Poudriere version: 3.3.99.20210521
Host OSVERSION: 1400018
Jail OSVERSION: 1300139
commit 1c63e38a8878d24a011f37f4d1f13865f5bb5aa6
Author: Dave Cottlehuber <[email protected]>
Date: Fri Jun 11 08:10:42 2021 +0000
ftp/curl: build with contentious patch from PR#7039
diff --git ftp/curl/Makefile ftp/curl/Makefile
index 0e979ef5a475..89cba3031c7c 100644
--- ftp/curl/Makefile
+++ ftp/curl/Makefile
# debug verbose
[57332] pci0: driver added
[57332] found-> vendor=0x8086, dev=0x1903, revid=0x03
[57332] domain=0, bus=0, slot=4, func=0
[57332] class=11-80-00, hdrtype=0x00, mfdev=0
[57332] cmdreg=0x0002, statreg=0x0090, cachelnsz=0 (dwords)
[57332] lattimer=0x00 (0 ns), mingnt=0x00 (0 ns), maxlat=0x00 (0 ns)
[57332] intpin=a, irq=255
[57332] powerspec 3 supports D0 D3 current D0
@dch
dch / _panic.txt
Last active June 12, 2020 10:23
Stopped at linux_root_RB_INSERT_COLOR+0x40: ldr x11, [x8]
# Pastebin xYWQzmfp
DRAM Initialization: [100%] [ ==================== ]]]] [ =========> ]]]]]]]
Checkpoint 2F
Checkpoint 2E
Checkpoint 31
Checkpoint 32
SMpro FW version: 1.07
PMpro FW version: 1.07
FW date: 20190523
Reading loader env vars from /efi/freebsd/loader.env
@dch
dch / jr.fish
Last active September 27, 2023 17:44
see https://git.sr.ht/~dch/diy-jails/ for some background
function jr
set local
set JAIL $argv[1]
set INSTANCE (jls -j $JAIL path)
pkill -TERM -j $JAIL
sleep 3
doas jail -rv $JAIL
doas umount -f $INSTANCE/tmp
doas umount -f $INSTANCE/dev
end