Skip to content

Instantly share code, notes, and snippets.

@jwieringa
jwieringa / bike_security.md
Last active September 2, 2023 18:39
Bike Security Opinions by Jason Wieringa

Bike Security Opinions by Jason Wieringa

The recommendations here start with the assumption, there is no way to keep a bike from being stolen, only ways to make it harder to steal. I think about where I’m locking up the bike and how long it will be there. At first, bike security can feel overwhelming. In practice we tend to re-use the same spots for locking up a bike frequently. There is some up front thought and then it turns into habit.

Products in order of importance to me:

  1. ABUS Folding Lock
  2. Secondary Ottolock or U-Lock (used when I’m worried)
  3. HEXLOX part locks
  4. Scout Tracker and Alarm
@jwieringa
jwieringa / main.vcl
Last active February 25, 2022 17:11
Fastly Service VCL Custom Template - February 2022
sub vcl_recv {
#FASTLY recv
# Normally, you should consider requests other than GET and HEAD to be uncacheable
# (to this we add the special FASTLYPURGE method)
if (req.method != "HEAD" && req.method != "GET" && req.method != "FASTLYPURGE") {
return(pass);
}
return(lookup);
[Unit]
Description=AutoSSH service to remotely access signald's unix socket for weechat's signal.py (/smsg +145789323231)
After=network-online.target
# Use this instead if autossh will interact with the local SSH server
# After=network-online.target sshd.service
[Service]
Environment="AUTOSSH_GATETIME=30"
Environment="AUTOSSH_POLL=30"
Environment="AUTOSSH_FIRST_POLL=30"
@jwieringa
jwieringa / blackbox-config.yml
Created September 1, 2021 19:12
otel, prometheus blackbox exporter, honeycomb
modules:
http_2xx:
prober: http
http:
preferred_ip_protocol: "ip4"
@jwieringa
jwieringa / _INSTALL.md
Created March 5, 2020 19:51 — forked from robinsmidsrod/_INSTALL.md
Bootstrapping full iPXE native menu with customizable default option with timeout (also includes working Ubuntu 12.04 preseed install)

Add the following chunk to your existing ISC dhcpd.conf file.

if exists user-class and ( option user-class = "iPXE" ) {
    filename "http://boot.smidsrod.lan/boot.ipxe";
}
else {
    filename "undionly.kpxe";
}

(or see https://gist.github.com/4008017 for a more elaborate setup

@jwieringa
jwieringa / ipxe.sh
Created March 5, 2020 17:06 — forked from robinsmidsrod/ipxe.sh
Bash functions for building iPXE in different ways
#!/bin/bash
make_ipxe() {
pushd "$HOME/src/forked/ipxe/src" >/dev/null &&
make CONFIG=chain bin/undionly.kpxe bin/ipxe.lkrn bin/ipxe.pxe bin/ipxe.usb &&
sudo install -v -m 0644 -g root -o root bin/undionly.kpxe /srv/salt/tftpd/files/undionly.kpxe &&
sudo install -v -m 0644 -g root -o root bin/ipxe.lkrn /srv/salt/tftpd/files/ipxe.lkrn &&
sudo install -v -m 0644 -g root -o root bin/ipxe.pxe /srv/salt/tftpd/files/ipxe.pxe &&
sudo salt-call -l quiet state.single file.recurse name=/srv/tftp source=salt://tftpd/files dir_mode=755 file_mode=644 &&
popd >/dev/null
@jwieringa
jwieringa / ubuntu_1804.ipxe
Created March 5, 2020 16:26 — forked from robinsmidsrod/ubuntu_1804.ipxe
iPXE script entries for booting Ubuntu 18.04 in different ways
# boot-url points to an nfs URL
# sanboot-url points to an http URL
# ubuntu-version contains 18.04.3
# ubuntu-release contains bionic
:ubuntu
echo Booting Ubuntu from iSCSI for ${initiator-iqn}
set root-path ${base-iscsi}:${hostname}.boot.ubuntu
sanboot ${root-path} || goto failed
goto start
@jwieringa
jwieringa / gonum.md
Created May 6, 2019 18:53
Learning why gonum is bumped to latest

Working off from LDA project on RadiusNetworks/lda#7

What I expect:

  • The go get command sets gonum version in go.mod to gonum revision
  • Running the tests succeed

What I observe:

  • The @revision of go get is ignored
  • The latest version is fetched setting the revision to the last commit on master
  • go test fails