Skip to content

Instantly share code, notes, and snippets.

View steveww's full-sized avatar

Steve Waterworth steveww

  • England
View GitHub Profile
@steveww
steveww / trace.sh
Created July 7, 2020 15:59
Shell script tracing
#!/bin/sh
# set -x
while true
do
# strip out dashes
# cut it down to 64 bits aka 8 bytes aka 16 chars
SPAN_ID=$(uuid | tr -d '-' | cut -c1-16)
TRACE_ID=$(uuid | tr -d '-' | cut -c1-16)
# require milliseconds
@steveww
steveww / switch.c
Created February 4, 2018 09:53
ESP8266 / Arduino momentry switch debounce
/*
* Code snippet for momentry switch processing
* with debounce
*/
// debouce period in millis
#define DELAY 200
bool switched;
unsigned long delay;
@steveww
steveww / inject.js
Last active October 15, 2018 08:32
Injection script for Tampermonkey
// ==UserScript==
// @name Instana EUM Injector
// @namespace http://instana.com/
// @version 0.1
// @description Add EUM to any site
// @author Steve Waterworth
// @include http://www.acme.com/*
// @include https://www.acme.com/*
// @run-at document-start
// @grant none