Skip to content

Instantly share code, notes, and snippets.

View natevw's full-sized avatar

Nathan Vander Wilt natevw

View GitHub Profile
natevw /
Created November 27, 2023 23:26
MSP430 in aarch VM notes
natevw / Politer.mjs
Created July 4, 2022 22:32
Promise Limiter, somewhat similar to or but with async Promises instead of callbacks
import Politer from "./this_gist.mjs";
let q = Politer(2),
politelyFetch = q.wrap(fetch);
natevw / Dockerfile
Created September 15, 2021 04:32
UPduino 3.0 programming failures
FROM alpine:3.14
ADD fpga-toolchain.tar.xz /opt/
ENV PATH="/opt/fpga-toolchain/bin:${PATH}"
natevw / prince_svg_js_namespace.html
Last active January 21, 2020 02:59
Repro for Prince XML issue rendering SVG `<use />` elements from JavaScript/React ("warning: svg: use: @xLink:href required")
<!doctype html>
<meta charset="utf-8">
<title>Testing SVG rendering issue of Prince 13.1</title>
#! /usr/bin/python
import re
import sys
callsign_fmt = sys.argv[1] if len(sys.argv) > 1 else '2x2'
normal_tally = 0
vanity_tally = 0
with open("l_amat/HD.dat", 'r') as file:
natevw / multi_id_test.html
Created June 20, 2019 23:09
Testing whether querySelectorAll finds multiple elements with #non_unique id.
<!doctype html>
<meta charset="utf-8">
<title>Testing multiple ids</title>
<p id="one">
<span id="not_unique">One</span>
<p id="two">
<span id="not_unique">Two</span>
natevw /
Last active March 26, 2024 09:51
A list of Morse code supported by GBoard Android Keyboard

Morse code supported by GBoard Android Keyboard

Google's GBoard software keyboard has a Morse code mode.

Here's what characters it currently supports:

  • .-a
  • -...b
  • -.-.c
  • -..d
natevw / shell_log.txt
Created June 17, 2017 00:06
Get CouchDB 2.0.0 working on Amazon Linux
## 2017 June 16 — build CouchDB
# via
# and
# and <------ mostly this, without yum java etc…
# also:
sudo yum --enablerepo=epel update
sudo yum groupinstall "Development Tools"
natevw / spi_http_example.js
Created June 15, 2016 17:23
A quick little script showing someone a general outline of bridging a hardware SPI device to an HTTP api via node.js. It's fairly terse, but I tried to provide a few documentation and project links for further exploration.
var SPI_DEV = "/dev/spidev0.0", // hardware will be connected to pins matching a certain Linux SPI device
HTTP_PORT = 0, // if you leave 0, a port gets randomly assigned
POLL_INTERVAL = 1e3; // equivalent to 1 second, set to `20` for 20 milliseconds
// this global variable will store the values
var most_recent_value = null;
var spiInstance = require('pi-spi').initialize(SPI_DEV); // this sets up the SPI device for use in node.js
// then we register a timeout that will get called repeatedly at an approximate interval