Skip to content

Instantly share code, notes, and snippets.

@slmingol
Forked from orhun/cool.sh
Created July 7, 2020 05:16
Show Gist options
  • Save slmingol/12c3c0ee1d03927cffcb95fa3daa6abf to your computer and use it in GitHub Desktop.
Save slmingol/12c3c0ee1d03927cffcb95fa3daa6abf to your computer and use it in GitHub Desktop.
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