Skip to content

Instantly share code, notes, and snippets.

View W-Floyd's full-sized avatar

William Floyd W-Floyd

View GitHub Profile

Keybase proof

I hereby claim:

  • I am w-floyd on github.
  • I am w_floyd (https://keybase.io/w_floyd) on keybase.
  • I have a public key ASCaZdm18QVkuY7ad9hZ8k9aX9X7DSXxH9svYuUrMGw_3go

To claim this, I am signing this object:

// Include the library
#include <Control_Surface.h>
// Instantiate a MIDI Interface to use
USBMIDI_Interface midi;
// Instantiate an analog multiplexer
CD74HC4051 mux = {
A0, // Analog input pin
{ 2,3, 4} // Address pins S0, S1, S2
#!/bin/bash
# split-pdf.sh <INPUT.pdf> <END_PAGE>
if [ -d "${1%.*}" ]; then
rm -r "${1%.*}"
fi
mkdir "${1%.*}"
class StrategyDashboardDemo {
static async generate(config, hass) {
// Query all data we need. We will make it available to views by storing it in strategy options.
const [areas, devices, entities] = await Promise.all([
hass.callWS({ type: "config/area_registry/list" }),
hass.callWS({ type: "config/device_registry/list" }),
hass.callWS({ type: "config/entity_registry/list" }),
]);
// Each view is based on a strategy so we delay rendering until it's opened
@W-Floyd
W-Floyd / mtu-finder.sh
Last active February 17, 2025 15:57
Find the largest usable MTU and output OpenVPN lines required, useful if your ISP/router blocks ICMP messages
#!/bin/bash
PS4='\033[0;33m+(${BASH_SOURCE}:${LINENO}):\033[0m ${FUNCNAME[0]:+${FUNCNAME[0]}(): }'
set -e
# set -xE -o functrace
# Internal parameters
__mtu_largest_success=0
__mtu_smallest_fail=0
__ping_mtu_byte_offset=-24