Skip to content

Instantly share code, notes, and snippets.

@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
},
[
@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 / 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

<?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
// }
# -*- 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
@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
@thequux
thequux / btsync.conf
Created November 27, 2014 01:53
POC||GTFO Quick Setup
{
"device_name": insert_your_hostname_here,
"listening_port" : 0, // 0 - randomize port
/* storage_path dir contains auxilliary app files
if no storage_path field: .sync dir created in the directory
where binary is located.
otherwise user-defined directory will be used
*/
//"storage_path" : "",
@thequux
thequux / Makefile
Created October 28, 2014 14:01
Make-based scanning frontend
# Usage: make name=<document name> t<arget>
# Start with the init target, then use "scan" to run the scan. Finally, run "pdf" to get a compressed PDF file.
# Parameters that can be set in a Makefile.defs include:
# papersize: Provides defaults for papersize_width and papersize_height; defaults to a4
# papersize_{width,height}: Width and height of page in px
# resolution: resolution of scan in dpi
# rotate: Rotation angle (0,90,180,270). Applied during compression.
@thequux
thequux / micro.py
Created September 1, 2014 23:21
KS10 microcode assembler
#!/usr/bin/python
# A microcode assembler
import os
import os.path
import re
import collections
import IPython.Shell
@thequux
thequux / namedop.cpp
Created July 24, 2014 05:27
Named operators! In C++!
template<class Self, typename L, typename R, typename Ret>
class Op {
public:
typedef L left_arg_type;
typedef R right_arg_type;
typedef Ret return_type;
//Ret operator() (L left, R right);
};