Skip to content

Instantly share code, notes, and snippets.

@thequux
thequux / spritz.c
Created April 2, 2015 18:20
Spritz in C
// This file was written by TQ Hirsch <[email protected]>.
// It may be used under any of the following licenses, at your
// discretion:
// - Public Domain
// - WTFPLv2
// - CC-0
// - MIT
// - ISC
# -*- Makefile -*- vim: ft=Makefile
# This expects to be built with make -f
H Ha Hb Hc:
echo halted
define Nr
$(foreach post,a b c,$(eval $(call Nr0,$(1),$(2),$(post))))
endef
<?php
// This is designed to be used with the IP list from
// https://rules.emergingthreats.net/fwrules/emerging-Block-IPs.txt
//
// To use:
// $ipset = new IPSet("emerging-Block-IPs.txt");
// if ($ipset->check_ip($_SERVER['REMOTE_ADDR'])) {
// // Block the request
// }
@thequux
thequux / README.md
Last active May 31, 2016 22:35
Multirust-compatible racer wrapper

This wrapper automatically sets the RUST_SRC_DIRECTORY environment variable for whatever rust compiler is currently active, automatically creating a new checkout whenever necessary. This should be compatible with all of the multirust-alike tools, but it has only been tested with rustup.rs

Installation

Simply place this somewhere on your path before the main racer binary and set the execute bit.

Uninstallation

@thequux
thequux / pll.c
Created December 4, 2018 00:33
A PLL designed to manage time on an ESP8266
#include <stdint.h>
#include <stdio.h>
#include <math.h>
#include <unistd.h>
#include <stdlib.h>
#include <string.h>
// We model a local clock with a small but consistent inaccuracy and a
// large initial error. i.e., the local clock is
//
@thequux
thequux / quuxboard.kbd.json
Last active January 17, 2023 20:54
quuxboard
[
{
"backcolor": "#ffffff",
"name": "quuxboard",
"author": "TQ Hirsch",
"switchMount": "cherry",
"plate": true,
"pcb": false
},
[