Skip to content

Instantly share code, notes, and snippets.

View marcoskirsch's full-sized avatar

Marcos marcoskirsch

View GitHub Profile
@marcoskirsch
marcoskirsch / networkQuality-graph.md
Last active December 30, 2022 20:42
How to capture speed test / network quality data over time and graph it on macOS

I'm testing out a new ISP and I've observed very inconsistent speed test results. I decided I want to run it periodically and graph them. This is how I do it:

  1. Use the built-in command networkQuality. Run it with the -c flag so that the output is in JSON format which makes post-processing easier.
  2. Schedule the command to run every hour using launchd.
  3. Use a small Python script to process the JSON and output a graph.

Schedule the job

-- Send an IFTT Maker Webhooks Trigger from NodeMCU.
-- Requires http module.
-- Author: Marcos Kirsch
-- key: Your key associated to your user, looks like a long random string of characters.
-- Find it by clicking Documentation on https://ifttt.com/maker_webhooks
-- event: Your named event. You configure this when creating the IFTTT applet.
-- value1, value2, value3: Optional values you can include.
@marcoskirsch
marcoskirsch / b64decode.lua
Created December 26, 2016 19:54
Compact and low memory-using Base64 decoding function implemented in Lua.
#!/usr/local/bin/lua
-- b64decode.lua
-- Formerly part of nodemcu-httpserver (https://github.com/marcoskirsch/nodemcu-httpserver)
-- Contains compact and low memory using Base64 decoding function.
-- Based on http://lua-users.org/wiki/BaseSixtyFour by Alex Kloss
-- compatible with lua 5.1
-- http://www.it-rfc.de
-- Author: Marcos Kirsch
-- bitshift functions (<<, >> equivalent)