Skip to content

Instantly share code, notes, and snippets.

Nathan Vander Wilt natevw

Block or report user

Report or block natevw

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
natevw / prince_svg_js_namespace.html
Last active Jan 21, 2020
Repro for Prince XML issue rendering SVG `<use />` elements from JavaScript/React ("warning: svg: use: @xLink:href required")
View prince_svg_js_namespace.html
<!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 Jun 20, 2019
Testing whether querySelectorAll finds multiple elements with #non_unique id.
View multi_id_test.html
<!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 Jan 16, 2019
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 Jun 17, 2017
Get CouchDB 2.0.0 working on Amazon Linux
View shell_log.txt
## 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 Jun 15, 2016
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.
View spi_http_example.js
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
natevw /
Last active Jun 8, 2016
Helpful Python snippet to drop into code and get an instant "playground" at a breakpoint
# see e.g.
import code
code.interact(local=dict(globals(), **locals()))
natevw / AppDelegate.m
Last active Mar 14, 2016
Hook this up to a coupla text boxes and see NSAnimation only ever do 60fps, picture of sample interface at
View AppDelegate.m
@interface MyAnimation : NSAnimation {}
@property NSUInteger frameCount;
@implementation MyAnimation
- (void)startAnimation {
_frameCount = 0;
[super startAnimation];
natevw /
Last active May 5, 2019
Using Bus Blaster v4 with STM32F4x SWD

Using Bus Blaster v4 with STM32F4x SWD

For SWD (instead of normal JTAG) you need a different CPLD "buffer logic" image on the Bus Blaster, the KT-Link compatible ones seem like the recommended means.

# with buffer logic at
# via from
curl -O
openocd -f board/dp_busblaster_v3.cfg -c "adapter_khz 1000; init; svf /Users/natevw/Downloads/ktlink.svf; shutdown"
You can’t perform that action at this time.