Skip to content

Instantly share code, notes, and snippets.

View hno's full-sized avatar

Henrik Nordström hno

View GitHub Profile
@hno
hno / delayed_job_control.sh
Created July 24, 2023 22:18
Delayed job control
#!/bin/bash
do_suspend=
handle_suspend() {
do_suspend=1
}
trap handle_suspend SIGTSTP
process_suspend() {
if ! [ $do_suspend ]; then
@hno
hno / pump.ino
Last active June 28, 2022 14:49
Arduino pump controller
const int SWITCH_1 = 2;
const int PUMP_1 = 12;
const int SWITCH_2 = 3;
const int PUMP_2 = 11;
const int SWITCH_3 = 4;
const int PUMP_3 = 10;
const int PUMP_OFF = 0;
@hno
hno / brokendelegation.hno.se.zonemasterdata
Created July 20, 2018 11:06
zonemaster data showing a broken delegation that should be flagged as a error no common ip
y.ns.se 185.159.197.150 {}
j.root-servers.net 192.58.128.30 {}
j.root-servers.net 2001:0503:0c27:0000:0000:0000:0002:0030 {}
k.root-servers.net 193.0.14.129 {}
k.root-servers.net 2001:07fd:0000:0000:0000:0000:0000:0001 {}
b.root-servers.net 192.228.79.201 {}
m.root-servers.net 202.12.27.33 {"hno.se":{"SOA":{"IN":{"0":{"0":{"0":{"0":{"Zonemaster::Engine::Packet":{"Zonemaster::LDNS::Packet":{"querytime":177,"data":"lsaAAAABAAAACgAPA2hubwJzZQAABgABwBAAAgABAAKjAAAHAWoCbnPAEMAQAAIAAQACowAABAFjwCbAEAACAAEAAqMAAAQBYcAmwBAAAgABAAKjAAAEAWnAJsAQAAIAAQACowAABAF4wCbAEAACAAEAAqMAAAQBYsAmwBAAAgABAAKjAAAEAWfAJsAQAAIAAQACowAABAF5wCbAEAACAAEAAqMAAAQBZsAmwBAAAgABAAKjAAAEAXrAJsBHAAEAAQACowAABMAkkGvAdwABAAEAAqMAAATAJIVrwDcAAQABAAKjAAAEwCSHa8CnAAEAAQACowAABMBHNTXAhwABAAEAAqMAAASC7wVywFcAAQABAAKjAAAEwpJqFsAkAAEAAQACowAABMf+PwHAZwABAAEAAqMAAATVbBkEwJcAAQABAAKjAAAEuZ/FlsC3AAEAAQACowAABLmfxpbARwAcAAEAAqMAABAqAQPwAAADAQAAAAAAAABTwHcAHAABAAKjAAAQIAEGfCVMAwEAAAAAAAAAU8A3ABwAAQACowAAECABBnwlVAMBAAAAAAAAAFPApwAcAAEAAqMAABAqAQPwAAADBQAAAAA
@hno
hno / jasonfriday2.c
Last active January 17, 2017 00:38 — forked from russross/jasonfriday2.s
C & ARM Assembly solution to a math puzzle
/* C version loosely based on jasonfriday2.s
*
* Compile on almost any computer using
* gcc -O3 -std=c99 -o jasonfriday jasonfriday2.c
*
* Henrik Nordstrom <henrik@henriknordstrom.net> (github user hno)
* January 17, 2017
*/
#include <stdio.h>
#include <stdlib.h>
@hno
hno / dummy_auth.sh
Created October 28, 2014 20:57
Dummy squid auth
#!/bin/sh
while read user password; do
echo OK
done
@hno
hno / mksunxichecksum.c
Created October 22, 2014 20:55
sunxi boot header checksum calculation
/*
* (C) Copyright 2014 Henrik Nordstrom
*
* Based on mksunxiboot
*
* (C) Copyright 2007-2011
* Allwinner Technology Co., Ltd. <www.allwinnertech.com>
*
* SPDX-License-Identifier: GPL-2.0+
*/