Skip to content

Instantly share code, notes, and snippets.

@willscott
willscott / Makefile
Created June 11, 2019 14:39
Wasm source map compilation
.PHONY: all
all: rot13.wasm
%.wasm.full: %.c
clang $< -g -o $@
%.wasm.dwarf: %.wasm.full
llvm-dwarfdump $< > $@
%.wasm: %.wasm.full %.wasm.dwarf
Verifying my Blockstack ID is secured with the address 1FEBoNfDBqChBKzF8osLAnY1GXZqxMnnAM https://explorer.blockstack.org/address/1FEBoNfDBqChBKzF8osLAnY1GXZqxMnnAM
@willscott
willscott / 0001-patch-for-osx-compilation.patch
Created July 5, 2017 18:53
Mac compilation for gcr @ 27b2703
From 742873d484f31716c7282fbab7496597624392f6 Mon Sep 17 00:00:00 2001
From: Will Scott
Date: Wed, 5 Jul 2017 11:43:32 -0700
Subject: [PATCH] patch for osx compilation
---
configure.ac | 2 +-
docs/reference/gck/Makefile.am | 2 +-
docs/reference/gcr/Makefile.am | 6 ++--
ui/frob-prompt.c | 10 +++---
@willscott
willscott / analytics.conf
Created November 12, 2016 18:49
Google Analytics Proxy
location = /analytics.js {
proxy_hide_header Alt-Svc;
resolver 8.8.8.8 ipv6=off;
proxy_pass https://www.google-analytics.com/analytics.js;
break;
}
location = /analytics {
access_by_lua_block {
ngx.req.read_body()
local body = ngx.req.get_body_data()
@willscott
willscott / install.sh
Last active August 29, 2015 14:25
openVPN Setup
#https://github.com/Nyr/openvpn-install/blob/master/openvpn-install.sh
apt-get install -y openvpn easy-rsa
# generate certs
cp -r /usr/share/easy-rsa /etc/openvpn
cd /etc/openvpn/easy-rsa
echo "export KEY_CONFIG=/etc/openvpn/easy-rsa/openssl-1.0.0.cnf" >> vars
chmod 755 *
source ./vars
Verifying that +willscott is my Bitcoin username. You can send me #bitcoin here: https://onename.io/willscott

Keybase proof

I hereby claim:

  • I am willscott on github.
  • I am willscott (https://keybase.io/willscott) on keybase.
  • I have a public key whose fingerprint is 9215 DB8E 4807 C46D B59F E094 2F3E 886D C036 9345

To claim this, I am signing this object:

@willscott
willscott / MotionSensor.ino
Last active December 10, 2015 13:29
USB reporting for a MotionSensor'ed DigiSpark
#define USB_CFG_DEVICE_NAME 'M','o','t','i','o','n','S','e','n'
#define USB_CFG_DEVICE_NAME_LEN 9
#include <DigiUSB.h>
const int timer = 500;
short time = 2000;
const int ledPin = 0;
const int alarmPin = 2;
int alarmValue = 0;
@willscott
willscott / stat2disruptions.py
Created October 22, 2012 16:46
Tor Disruption Extractor
"""Stat 2 Disruptions"""
"""Converts country per-day stats into interruption periods"""
import datetime
import os
import sys
import pickle
from numpy import std
days = {}
@willscott
willscott / js1k.js
Created August 7, 2012 06:30
Tweetable syntax highlighter
b[t='innerHTML']='<hr id=y><p id=z contenteditable>';f='y[t]=z[t]';for(p in b)f+='.replace(/'+p+'/ig,"<b>$&</b>")';z.onkeyup=eval.bind(b,f)