Skip to content

Instantly share code, notes, and snippets.

@slmingol

slmingol/cool.sh

Forked from orhun/cool.sh
Created Jul 7, 2020
Embed
What would you like to do?
Random MOD player
#!/bin/bash
# Plays a random MOD file from https://modarchive.org
# Depends on XMP (http://xmp.sourceforge.net/)
rand=$(shuf -i 1-189573 -n 1)
tmp=$(mktemp /tmp/${rand}.XXXXXXXX.mod)
curl https://modarchive.org/jsplayer.php?moduleid=${rand} > ${tmp}
xmp ${tmp}
rm ${tmp}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment