Skip to content

Instantly share code, notes, and snippets.

@tristancollins
tristancollins / radio.sh
Last active April 24, 2022 03:03
A script to populate an MPC playlist with BBC radio stream URLs. Run it as a cron every two hours or so.
#!/bin/bash
# Script to generate an mpc playlist containing up-to-date BBC stream
# locations. This can be run every hour or so as a cronjob to keep
# the non-static BBC streams working. My version differs from the
# ones I've seen online in that each stream is added to a single
# playlist, rather than individual playlist files. This makes it
# easier to use with MPoD and via command line with "mpc play 4" for
# Radio 4.
@tristancollins
tristancollins / dotmuttrc
Created August 3, 2014 09:14
My dotmuttrc file for use with Fastmail
set from = "xxxxxxx"
set realname = "xxxxxxxx"
# Quick Settings
set my_server = mail.messagingengine.com
set my_user = xxxxxxxx
set my_pass = xxxxxxxx
# Account Information
set smtp_url = "smtp://$my_user:$my_pass@$my_server:587"
@tristancollins
tristancollins / Mutt_Launcher.scpt
Created August 3, 2014 08:20
A short script that opens mutt in a new terminal window at a set position and size
tell application "System Events"
if "Terminal" is not in name of processes then launch application "Terminal"
tell process "Terminal"
set frontmost to true
if (count windows) is greater than 0 then keystroke "n" using command down
if (count windows) is 0 then keystroke "n" using command down
end tell
end tell
tell application "Terminal" to tell window 1
set position to {0, 20}
@tristancollins
tristancollins / invoice.tex
Created August 2, 2014 16:42
Latex invoice template or VAT-registered consultants
\doc­u­ment­class[11pt,a4paper]{art­icle}
\usep­ack­age{dat­e­time}
\usep­ack­age{fp}
\usep­ack­age{booktabs}
\usep­ack­age{ragged2e}
\usep­ack­age{longt­able}
\usep­ack­age{hhline}
\newd­ate­format{mydate}{\ordinal{DAY} \month­name[\THEMONTH] \THEYEAR}