Skip to content

Instantly share code, notes, and snippets.

View benfry's full-sized avatar

Ben Fry benfry

View GitHub Profile
@benfry
benfry / usb_detect.py
Last active October 3, 2024 01:24
Detect USB speeds and report via browser
#!/usr/bin/env python3
import json
import sys
''' Quick hack to detect the speed of plugged-in USB devices on macOS,
then write a simple HTML page with the info and open it in a browser.
Calls out to the command line system_profiler tool to retrieve the information.
@benfry
benfry / install-rsync-macosx.sh
Last active April 30, 2021 22:05
How to compile and install rsync on macOS
# Compile rsync 3.2.3
Follow these instructions in Terminal on both the client and server to download and compile rsync on macOS
# Download and unarchive rsync and its patches
cd ~/Desktop
curl -O https://rsync.samba.org/ftp/rsync/src/rsync-3.2.3.tar.gz
curl -O https://rsync.samba.org/ftp/rsync/src/rsync-patches-3.2.3.tar.gz
tar xvfz rsync-3.2.3.tar.gz

Getting Started

Start with the example sketch, and only make changes in the left-most tab.

For anything we do with the weather, your sketch will have this format:

// this will store all the weather data
let w;