Daniel's Weblog
Posts Tags Colophon
About

Tags / Posts



SSH to server via Tailscale if possible: If Tailscale is not running fall back to a different IP

Requirements:

  • Tailscale installed via Mac App Store
  • jq installed via Brew

Replace the following values: {SERVER_NAME}: These configuration options will be used when you type ssh {SERVER_NAME} {SERVER_USERNAME}: The username you use to connect to the server {SERVER_TAILSCALE_IP}: IP Address or DNS name {SERVER_NON_TAILSCALE_IP}: I said “IP” but “hostname” will also work here {SERVER_PRIVATE_KEY_FILENAME}: Private key to log in with

# If Tailscale is running connect via this:
Match originalhost {SERVER_NAME} exec "[ $(/Applications/Tailscale.app/Contents/MacOS/Tailscale status --json | jq -r .BackendState) != Stopped ]"
    HostName {SERVER_TAILSCALE_IP}
    User {SERVER_USERNAME}
    IdentityFile ~/.ssh/{SERVER_PRIVATE_KEY_FILENAME}

# If Tailscale is not running connect via this:
Host {SERVER_NAME} 
    HostName {SERVER_NON_TAILSCALE_IP}
    User {SERVER_USERNAME}
    IdentityFile ~/.ssh/{SERVER_PRIVATE_KEY_FILENAME}


POPS - Lehigh University

1
Salute to Lehigh University
1:29
2
Pride of the 97
2:17
3
Centennial Song
1:36
4
Commando March
3:28
5
Irish Tune From County Derry
3:40
6
Shepherd's Hey
2:10
7
The Sinfonians
5:90
8
March
4:35
9
Song With Words "I'll Love My Love"
2:17
10
Song of the Blacksmith
1:18
11
Fantasia on the "Dargason"
3:60
12
Porgy and Bess
10:54
01
Lehigh University - POPS - Raw audio
43:58
Hosted by the Internet Archive

Pops by the Lehigh University Band Another Lehigh vinyl acquired and now available on Archive.org. From discussion in the Marching 97 alumni band Facebook group we’ve learned the following:

  1. “Pops used to be the spring concert for Wind Ensemble, IIRC”
  2. “Jim Brown was a faculty member at Lehigh from 1973 to 1979. So, this record probably came from mid 70’s”

This is a part of a series where I digitize vinyl records. More Lehigh records / all records!

BeReal Notification Times


My crowd has been enjoying the app BeReal recently. The world is split up geographically in to zones; every user in each zone recieves a notification at the same time which is randomly chosen each day.

I’ve started keeping track of those times. US data is the best but hopefully I can record the others too going forward:

Edit: The BeReal API changed and this is no longer functional. Most of the data I collected is available in other data sets or here on Archive.org.

Supporting Music in Brooklyn (Literally!)


The L Train Brass Band is a community brass band from Brooklyn open to all.

We try to have as much music as possible memorized for parades (it’s more fun that way!) but for some low-key gigs and rehearsals we read music off the page. Many of us like to use our phones to read our music.

Neither I, nor the L Train Brass Band have any association with any of the products linked or mentioned here.

Phones Mounted to Instruments

Lyres and PopSockets

Many band members with smaller phones find that PopSockets fit well in standard lyres.

Closeup of a baritone horn with a phone mounted to it via a PopSocket and lyreA second closeup of a baritone horn with a phone mounted to it via a PopSocket and lyre

This configuration seems to work well for trumpets, clarinets, many horns.

Lyres without PopSockets

This makes me so nervous but people do it.

A phone clamped in a lyre on an alto saxophoneAnother phone clamped in a lyre on an alto saxophone

Lyre with eFlip

Phoe clamped in to an eFlip on a saxophone

Tonal Innovation makes a product called the “eFlip” in several variations—the eFlip holds your phone and the lyre clips on to the bottom of the eFlip. This is what I personally use on my saxophone and I like it a lot!

It’s not perfect, I wish I could buy an eFlip permanently fastened to a lyre and I wish it would hold my phone with springs instead of screws. But those would make it more expensive to produce and mechanically complex! EDIT: After additional time with my eFlip I’ve changed my mind on this—despite moderate movement the eFlip has never slipped out of my lyre.

Clamps

These are less common, here is a brand called “Grip-O-Phone” mounted on a trumpet.

This trumpet player actually modified the original product to add longer threaded rods to hold a small tablet instead of a phone.

Here is a similar product (brand unknown) holding an iPhone on a trombone:

Sousaphones

Sousaphone players seems to like flexible holders. I don’t have much to add about these.

By Hand

Of course some people just hold their phone in their hand. This seems to work for sousaphones and trombones.

Trombone player in a Halloween costume playing while holding their phone in their hand

Tablets on Stands

Here are some observations:

Don’t get the cheapest option

It’s worth paying $10 for a sturdier, higher quality product that will last longer and fold down to be more compact.

More expensive stands will have high quality “jaws” that grip the tablet. Cheap jaws are entirely plastic with a spring system. They’re secure but hard to take on and off.

Better jaws:

Cheap jaws:

Cheaper stands tend to use large screws on the telescoping pole. Once again these work but more expensive options have a lever arm that you fold open and close which is quicker.

The real failing of the cheap stands is the ball joint at the top that allows you to rotate the tablet around. This tends to be the first part to become loose and while it won’t fail catastrophically it is very annoying when you can’t secure your table at just the right angle.

Weather Cal Custom Component


I’ve been using the iOS Scriptable app and the fantastic Weather Cal widget to have an information rich homescreen for a while now. The built-in COVID widget only had data to the country level but I wanted to see the New York Times’ data at the US county level.

OK, so “New York City” isn’t technically a county but the Times makes an exception and groups the boroughs together—call it a hometown bias.

This also serves as a decent example of how to make a custom Weather Cal component that loads, caches, and displays data from a custom API.

The New York Times doesn’t present a REST api but they do publish their data to Github about 3 times a day!

#!/bin/bash
# Live moving averages
curl https://raw.githubusercontent.com/nytimes/covid-19-data/master/rolling-averages/us-counties-recent.csv -o data.csv

# Example of the CSV data:
# date,geoid,county,state,cases,cases_avg,cases_avg_per_100k,deaths,deaths_avg,deaths_avg_per_100k
# 2021-12-21,USA-36998,New York City,New York,17958,10049.14,120.54,33,15.43,0.19

# Data.csv holds the last month of data for every US county sorted in ascending date order.
# I only care about the most recent date so we can search it backwards using tac and grep
tac data.csv | grep -m 1 "New York City" > current_cases_avg.txt

# Grab the 6th column
awk -F "\"*,\"*" '{print $6}' current_cases_avg.txt > current_cases_avg_only.txt

# Copy the text file to my webserver
cp current_cases_avg_only.txt /var/www/FAKE/PATH/current_cases_avg_only.txt

This bash script can live in cron and run every hour.

15 * * * * ~/update.sh >/dev/null 2>&1

In Scriptable, weather-cal.js in the existing custom = {} variable add the following:

  async setupDanielC19() {
    const danielC19Path = code.fm.joinPath(code.fm.libraryDirectory(), "weather-cal-danielC19")
    // getCache(path REQUIRED, minTime OPTIONAL, maxTime OPTIONAL)
    let danielC19Data = code.getCache(danielC19Path, 20, 60)

    if (!danielC19Data || danielC19Data.length == 0 || danielC19Data.cacheExpired) 
      try {

		 //       
      	 // NOTE: Be sure to put in a real URL here!
      	 //
        let rawRequest = new Request("https://danielbeadle.net/FAKE/PATH/current_cases_avg_only.txt")
        let rawData = await rawRequest.loadString()
        if (!rawData || rawData.length == 0) { throw 0 }

        danielC19Data = Number(rawData)

        // Write Data to cache
        code.fm.writeString(danielC19Path, JSON.stringify(danielC19Data, null, 2))

      } catch (err) {
        danielC19Data = code.getCache(danielC19Path, 20, 60)
      }
  
    return danielC19Data
  },
  
  async danielC19(column) {
    if (!this.danielC19Data) {
      danielC19Data = await custom.setupDanielC19()
    }

    // Set up the stack
    let danielC19Stack = code.align(column)
    danielC19Stack.layoutHorizontally()
    danielC19Stack.centerAlignContent()
    danielC19Stack.setPadding(code.padding/2, code.padding*2, code.padding/2, code.padding)
  
    // Round to an integer and add commas
    const c19rkiLine = code.provideText(`NYC 7-Day Avg: ${Number.parseInt(danielC19Data).toLocaleString('en-US')}`, danielC19Stack)
  },

And finally at the top of weather-cal.js add the new component

const layout = `
  row 
    column
      date
      sunset
      battery
      danielC19
      space
      events
`
Wemos D1 Carrier Board


Three years ago I soldered my first custom-designed PCBs, a set of ESP8266-powered temperature sensors for my apartment!

The original design worked with the ESP8266 modules I had at the time but hasn’t with recent modules (I think I forgot to pull the chip-enable wire high?).

Wemos D1 Mini Carrier Board

This is a spinoff project of my dedicated, single-purpose temperature sensor boards. Instead of trying to be as cheap and small as possible it is intended to be an easy way to connect I2C sensors to the Wemos D1 Mini and probably to esphome.

Further documentation on github.com/djbeadle/ESP8266-Temperature-Sensor.

Board

Top

Bottom

Notes

  • Designed in KiCad at NYC Resistor where I first was shown the joy of Esphome (compared to writing your own firmware by!).

  • First PCB order December, 2021.

Pinout Details

  • 4x I2C, two of each arrangment: SDA-SCL-GND-3.3V and SCL-SDA-3.3V-GND (SDA pin D2, SCL pin D1)
  • 2x 1-Wire pinouts arranged as D0-3.3V-GND and 3.3V-D0-GND
  • 1x push-button footprint (3.3V and pin D8)
  • 1x photoresistor & resistor footprint (3.3V, A0, and GND via a resistor footprint, 10k generally works well)
  • 1x footprint for a terminal block connector (Check your specific Wemos D1 Mini information to see what input voltage it is capable of handling on the 5V pin!)
Photo Book Inventory


Photo books I have owned / borrowed in no particular order.

  1. 9780947322120 Dupain’s Sydney by Jill White

  2. 9781884167058 RFK Funeral Train photographs by Paul Fusc

  3. 9780999243008 Just Yannis by Harold Evans and Yannis Behrakis

  4. 9780525560029 Of Love & War by Lynsey Addario

    I also greatly enjoyed her appearance on Radiolab for the episode Sight Unseen.

  5. 9781580931465 Subway Memories by by Camilo José Vergara

  6. 9780714843087 Red Color News Soldier by Li Zhensheng

    Possibily my favorite book on this list so far.

  7. 9781426201981 Photo Nomad by David Douglas Duncan

    This book is a window in to a world that is completly foreign to me, such as this one:

    One hour later—eyes drilling straight into my gizzard—slowly turning my prints—asking had I any snow shots…you know…Santa Claus country…no! How about flying to Boston Monday? I saw that page on Helen and Joe. Have you been in a big plane, TWA’s two-engine job? Take our old company Pontiac - warm clothes - drive through New England shooting whatever you want - BUT - always – remember: leave space for our Merry Christmas to run across the bottom of our next greeting cards.

    Cal Eby was editing my pumpkin story when I went to thank him.

    My snow shots became Hallmark’s first gift box of photographs.

    Many of the captions are completly lost on me but they’re made up for by the photos.

  8. 9781633451049 Dorothea Lange Words and Pictures by Dorothea Lange, Sarah Meister

  9. 9780500292914 Magnum Contact Sheets by Kristen Lubben

Other

  1. 0143128418 It’s What I Do: A Photographer’s Life of Love and War by Lynsey Addario

    My first introduction to Lynsey Addario’s work, I ploughed through this book over a weekend senior year of college.

  2. 1620405555 Group f.64 by Alinder, Mary Street

CLI Tool Diagrams and Notes


A living document of diagrams and notes on various Unix tools.

Tar files and Tarballs Flowchart

A flow chart showing how files are changed with the tar tool.
An Inventory of Annual Mystic Seaport Sea Music Festival Recordings


“Fun isn’t something one considers when balancing the universe collecting sea shanties, but this does put a smile on my face”.

Thanos adds the final Infinity Stone to the Infinity Gauntlet in the movie Avengers Endgame

I will only link downloads of recordings that are not available for sale new (digitally or physically) anywhere.

Info

The List

  1. Wikipedia reports the first as occurring in 1979 but does not provide a source, if assuming one-per-year working backwards from the first recording (#9, 1988), the first should have occurred in 1980.
  2. ✅ 1988, Newly digitized and available on the Internet Archive
  3. Article describing but no audio
  4. 💰 1999, CD available from Mystic Seaport for $14.95
  5. Audio files from CD available for download here
  6. ❌ Description of a CD held in the archive of the San Francisco Maritime Library available here, but no audio files.
  7. Audio files from CD available for download here
  8. 💰 CD available from Mystic Seaport for $14.95
  9. 💰 CD available from Mystic Seaport for $14.95
  10. ❌ Info about at NewEnglandBoating.com including links to two Youtube videos which have been made private.
  11. 💰 CD available from Mystic Seaport for $14.95
  12. 💰 CD available from Mystic Seaport for $14.95
  13. 💰 CD available from Mystic Seaport for $14.95
  14. 💰 CD available from Mystic Seaport for $14.95
  15. 💰 CD available from Mystic Seaport for $14.95
  16. 💰 CD available from Mystic Seaport for $14.95
  17. 💰 CD available from Mystic Seaport for $14.95
  18. 💰 CD available from Mystic Seaport for $14.95

Other Albums that I am Working on Collecting / Digitizing:

  • Stormalong John
    • Any Port In A Storm
    • A Liverpool Packet
    • Through Stormy Seas
      • Acquired digital version (flac), cleaned up metadata, renamed to “Through Stormy Seas” instead of “Through Stormy Weather” because that’s what the album is called on shanty.co.uk/stormalongjohn.html.
      • Embedded the provided album art which is a crop of the painting “On the Dogger Bank, 1846 by Clarkson R.A.”. I don’t know if that was the original cover art or added later. If / when I find a physical copy of my own I will update here.
      • Available for download here
    • Most complete discography seems to be at shanty.co.uk, I haven’t been able to track down a copy of “A Liverpool Packet” anywhere yet, if you have a copy please let me know, my email address is on my homepage.
  • The Shanty Crew
    • Sea Shanties and Sailor Songs
      • Acquired a digital version (mp3).
      • Available for download here
My Job Explained (with Pictures!)


In the beginning there was nothing except a business process (some piece of software that made money) and a database for logs and a few configurable values.

The process developers who built and managed the business process read the logs in the database and occasionally modified the configurable values by hand.

As the business grew subject matter experts were brought onboard. I’m going to call these people who need to make changes to the database but whose job description does not include writing code business users. For a short while they sent their requests to the process developers who made the changes on their behalf.

Of course if a process developer is spending time editing the database by hand they can’t be working on new features. And if the business users understand the business process and know what they want to change why not let them do so directly? So someone whips up a piece of interface software giving the business users a way to access the database without going through the process developers.

Since in this case there are limited advantages to understanding both how the business process functions and how to make a good human interface eventually the development team fractures in to two disparate groups, the existing business process developers and the new interface developers (aka “frontend developers”).

The interface developers spend all day writing software that translates questions and commands from the business users in to something the database can understand. The two ways they add value are by

  1. Allowing business users who do not know how to directly query a database to ask data-driven questions
  2. Providing the same users a safe way to modify the database.

Eventually a business user is hired who says “I’d really like to use SOME VISUALIZATION TOOL” to help analyze this data—this could be Tableau, PowerBI, R, or even Python. This gets plugged in to the database bypassing the interface software and reduces the first way the interface developers create business value (allowing business users to read the database).

This creates an interesting bubble for the interface developers. The business user’s are responsible for the care and feeding of the business process and the process developers have to understand the intricacies of the business process to improve and expand it. But the interface developers are stuck in the middle. Understanding the details of the business process does not make one better at creating a text box that prevents a business user from accidentally entering garbage input.

Afterthought

This section exists to help me explain what my job is to my family (hi mom!).

I’m an interface developer! The interface software is made up of three parts: the backend, an old frontend (AngularJS), and a new frontend (React). The frontends present data in a human-readable format and validates their commands while the backend understands how to communicate with the database.

The old frontend is not going to break tomorrow but is built with aging technology and we can’t keep it around forever. The new frontend runs in parallel and users will bounce back and forth between the two while we slowly migrate the functionality over piecemeal. The most difficult part is ensuring that the switch between frontends is a pleasant, smooth experience. They shouldn’t be the same (the old frontend is indeed old) but they must be similar enough and must load quickly enough to not break a train of thought as the business users navigate between them.