Skip to content

Instantly share code, notes, and snippets.

Tom Robinson tlrobinson

Block or report user

Report or block tlrobinson

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
tlrobinson / ttgo_oled_example.ino
Last active Jan 5, 2020
Using the OLED display on TTGO LoRa32 development boards and "ESP8266 and ESP32 OLED driver for SSD1306 displays" library
View ttgo_oled_example.ino
#include <Wire.h> // Only needed for Arduino 1.6.5 and earlier
#include "SSD1306Wire.h" // legacy: #include "SSD1306.h"
// TTGO LoRa32-OLED V1
// #define OLED_SDA 4
// #define OLED_SCL 15
// #define OLED_RST 16
// TTGO LoRa32-OLED v2.0 and V2.1
tlrobinson /
Last active Sep 30, 2019
Metabase immutable wrapper classes


  • "Base" base class
  • copies properties
  • also includes "_plainObject"
  • external logic sets up references, lame: "metabase/selectors/metadata"


  • "Dimension" base class, encode each clause as a different subclass
  • also includes optional "_parent" (actually a child in the tree, i.e. ["field-id", 1] is a _parent in ["datetime-field", ["field-id", 1], "month"]) and "_args" which are rest of clause args (month the datetime-field or 1 in the field-id)
  • also includes "_metadata" and "_query" properties
tlrobinson / geiger.ino
Last active Sep 12, 2019
MightyOhm Geiger Counter Kit + ESP8266 (WEMOS D1 mini)
View geiger.ino
// get config.h from Adafruit IO example sketch and fill in your details
#include "config.h"
#include <Pins_Arduino.h>
#include <SoftwareSerial.h>
#include <Regexp.h>
AdafruitIO_Feed *cpm_feed = io.feed("Geiger CPM");
AdafruitIO_Feed *cps_feed = io.feed("Geiger CPS");
AdafruitIO_Feed *usv_feed = io.feed("Geiger uSv/hr");
tlrobinson /
Last active Aug 13, 2019
ham radio / amateur radio setup notes for mac and raspberry pi
# hackrf
brew install dfu-util hackrf
# gqrx
brew cask upgrade gqrx
# misc sdr
brew cask install cubicsdr
brew cask install SdrDX
brew cask install cutesdr
tlrobinson /
Last active Mar 6, 2019
Polished Single Page Web Application Concerns
  • loading and error states
  • form validation/errors + dirty/invalid states
  • empty states
  • pagination and/or virtualization/windowing of large lists
  • normalizing state to ensure consistency
  • caching requests / cache invalidation
  • immediate feedback: optimistic updates and/or loading states
  • blocking duplicate actions (loading/dirty states for SPA, POST/redirect/GET for non-SPA)
  • cancelling pending requests when making an updated request (e.x. typeahead), or when navigating away from the screen that depends on it
  • keyboard/mouse events:
tlrobinson /
Created Jan 21, 2019
Script for listing the Docker build context of the current directory
#!/usr/bin/env bash
set -eu
docker build --no-cache -t $tag -f - . <<EOD
FROM busybox
RUN mkdir /_/
View gist:ab0ab25a17793427410552923ea546aa
Devices {
devices {
AirDataLatest(uuid: "awair-...") {
airDataSeq {
View docker-machine-push
#!/usr/bin/env bash
set -eu
MONITOR=$(command -v pv || echo cat)
docker save $IMAGE | bzip2 | $MONITOR | docker-machine ssh $MACHINE 'bunzip2 | docker load'
tlrobinson / log-loader.js
Last active Aug 6, 2018
webpack logging loader
View log-loader.js
module.exports = function(source) {
return (
`console.log("Loading: " + ${JSON.stringify(this._module.userRequest)});\n` +
source +
`\nconsole.log("Loaded: " + ${JSON.stringify(this._module.userRequest)});`
You can’t perform that action at this time.