Skip to content

Instantly share code, notes, and snippets.

View dch's full-sized avatar
🛋️

Dave Cottlehuber dch

🛋️
View GitHub Profile
@dch
dch / pot-stickers.md
Last active January 7, 2024 22:12
Asian Dumplings or Piryogi
@dch
dch / chilli.md
Created January 7, 2024 21:47
chilli beans

ingredients

  • 2 red peppers, diced
  • 4 onions, sliced
  • 4 cloves garlic, chopped
  • 3 carrots, grated
  • 2 tins red beans, washed & drained
  • 1 tin white beans, washed & drained
  • 1 tin corn kernels, washed & drained
  • 2 tins peeled or diced tomatoes
@dch
dch / lentils.md
Last active January 7, 2024 21:37
Syrian shorbit adas lentil soup
@dch
dch / http_proxy.go
Created December 7, 2023 18:47 — forked from jim3ma/http_proxy.go
Register Dialer Type for HTTP&HTTPS Proxy in golang
package main
import (
"bufio"
"fmt"
"net"
"net/http"
"net/url"
"crypto/tls"
@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