Skip to content

Instantly share code, notes, and snippets.

View tupton's full-sized avatar

Thomas Upton tupton

View GitHub Profile
@tupton
tupton / z2mtxR24
Created May 24, 2012 00:54 — forked from anonymous/z2mtxR24
a guest on May 23rd, 2012 - pastebin.com/z2mtxR24
if (type == 'node-down' || type == 'cluster-balance') {
this['thresholdNode'].set('disabled', true);
this['comparatorNode'].set('disabled', true);
}
@tupton
tupton / scrobbular curl
Last active September 24, 2015 17:17
An example curl script to post song information to Scrobbular
curl -X POST \
--data-urlencode "[email protected]" \
--data-urlencode "s=secret" \
--data-urlencode "track=Red Sky" \
--data-urlencode "artist=Thrice" \
--data-urlencode "album=Vheissu" \
--data-urlencode "duration=258" \
http://scrobbular.appspot.com/scrobble
@tupton
tupton / eventcmd
Created January 16, 2011 21:33
An example eventcmd script for posting pianobar events to Last.fm with Scrobbular.
#!/bin/bash
# create variables
while read L; do
k="`echo "$L" | cut -d '=' -f 1`"
v="`echo "$L" | cut -d '=' -f 2`"
export "$k=$v"
done < <(grep -e '^\(title\|artist\|album\|stationName\|pRet\|pRetStr\|wRet\|wRetStr\|songDuration\|songPlayed\|rating\)=' /dev/stdin) # don't overwrite $1...
username='<YOUR GOOGLE USERNAME>';