Skip to content

Instantly share code, notes, and snippets.

#!/bin/bash
# Given a grep expression, create a graph of occurrences of that expression
# in your code's history.
set -e
expr="$1"
datafile=$(mktemp)
# posted partly as an aide-memoire, but more usefully, as a prompt
# for me to make this into a proper stop-start daemon
# hopefully, one that won't have hardcoded machine names...
IPADDR=`ifconfig en0 | grep 'inet ' | awk '{print $2}' | sed 's/addr://'`
ssh house.husk.org -N -f -L *:3698:foil:3689
dns-sd -P "foil" _daap._tcp. local 3698 foil.local. $IPADDR txtvers=1 "Database ID=BC2C8AD5" "Machine ID=BC2C8AD5" &