Skip to content

Instantly share code, notes, and snippets.

BenjaminLawson / m3u-absolutify
Last active Jun 6, 2018
Bash script to generate absolute m3u files
View m3u-absolutify
#!/usr/bin/env bash
# Usage: m3u-absolutify playlists_dir output_dir /absolute/path/to/music
# Description: generates absolute path versions of all m3u files in a directory
# Author: Ben Lawson
BenjaminLawson / press1.xml
Last active Jun 6, 2018
Twilio script to automate Duo 2 Factor Authentication
View press1.xml
<?xml version="1.0" encoding="UTF-8"?>
<Play digits="wwww1"></Play>
BenjaminLawson / bmpc
Last active Apr 4, 2018
Shell script to replace mpd's playlist with the results of a Beets query
View bmpc
#!/usr/bin/env bash
# Replace the mpd playlist with the results of a Beets query
# Usage: 'bmpc QUERY'
# change BEETS_DIR to the name of your beets music directory
RESULTS=$(beet ls -f '$path' "$@" | sed "s/.*\/$BEETS_DIR\///")
printf "$RESULTS\n\n"

Keybase proof

I hereby claim:

  • I am BenjaminLawson on github.
  • I am benlawson ( on keybase.
  • I have a public key whose fingerprint is CB98 289F 0226 23E0 F36C F70C F3E6 B480 FA35 1CE0

To claim this, I am signing this object: