Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
Loads a random mix from sonicrouter

Short for music? try a random sonicrouter mix

  • Stick sonicrouter.rb in your path, or curl https://raw.github.com/gist/2584960/7a8433fc0477ad388fc09af0b5ef6501d595c085/sonicrouter.rb > /somewhere/in/your/path/sonicrouter

  • Rename it sonicrouter (it's named .rb so gist syntax highlights it)

  • Type sonicrouter at a terminal.

  • Or if you are really lazy, just alias this command: curl https://raw.github.com/gist/2584960/7a8433fc0477ad388fc09af0b5ef6501d595c085/sonicrouter.rb | ruby

Bonus feature

If you have dotjs installed (which you should). Stick the below into ~/.js/play.new.official.fm.js and it will even autoplay.

setTimeout(function() {
  location.href="javascript:$player.play()"
}, 5000);
#!/usr/bin/env ruby
mixes = [
"http://www.sonicrouter.com/2012/04/sr-mix-129-stickman-mindset/",
"http://www.sonicrouter.com/2012/04/sr-mix-128-kelpe-svetlana-industries/",
"http://www.sonicrouter.com/2012/04/sr-mix-127-kingthing-infrasonics/",
"http://www.sonicrouter.com/2012/03/sr-mix-126-alex-coulton-idle-hands/",
"http://www.sonicrouter.com/2012/03/sr-mix-125-presk-fourth-wave/",
"http://www.sonicrouter.com/2012/03/sr-mix-124-maulin-diskotopia/",
"http://www.sonicrouter.com/2012/03/sr-mix-123-torus-sonic-router-records/",
"http://www.sonicrouter.com/2012/03/sr-mix-122-darkhouse-fam-earnest-endeavours/",
"http://www.sonicrouter.com/2012/02/sr-mix-121-archie-pelago-car-crash-set/",
"http://www.sonicrouter.com/2012/02/sr-mix-120-zoltan-granholme/",
"http://www.sonicrouter.com/2012/02/sr-mix-119-bobby-champs-pictures-music/",
"http://www.sonicrouter.com/2012/02/sr-mix-118-10-20-broken60/",
"http://www.sonicrouter.com/2012/01/srq024sr-mix-117-spam-chop-wigflexmimm/",
"http://www.sonicrouter.com/2012/01/sr-mix-116-pixelord-hit-hope/",
"http://www.sonicrouter.com/2012/01/sr-mix-115-jim-e-stack-good-years/",
"http://www.sonicrouter.com/2012/01/sr-mix-114-peverelist-punch-drunklivity-sound/",
"http://www.sonicrouter.com/2011/12/sr-mix-113-artifact-deadplate/",
"http://www.sonicrouter.com/2011/12/sr-mix-112-knowing-looks-wncl/",
"http://www.sonicrouter.com/2011/12/sr-mix-111-danny-drive-thru-fat-citymind-on-fire/",
"http://www.sonicrouter.com/2011/12/sr-mix-110-logos-keysound/",
"http://www.sonicrouter.com/2011/11/sr-mix-109-wanda-group-sports-complex-swimming-pool-1996/",
"http://www.sonicrouter.com/2011/11/sr-mix-108-two-inch-punch-pmr/",
"http://www.sonicrouter.com/2011/11/srq023sr-mix-107-hodge-talks-the-future-sound-of-bristol%e2%80%a8%e2%80%a8/",
"http://www.sonicrouter.com/2011/11/sr-mix-106-pedestrian-push-run/",
"http://www.sonicrouter.com/2011/10/sr-mix-105-krampfhaft-rwina/",
"http://www.sonicrouter.com/2011/10/sr-mix-104-t-polar-saigon/",
"http://www.sonicrouter.com/2011/10/sr-mix-103-graphics-granholme/",
"http://www.sonicrouter.com/2011/10/sr-mix-102-djrum-2nd-drop/",
"http://www.sonicrouter.com/2011/09/sr-mix-101-v-c-donky-pitch/",
"http://www.sonicrouter.com/2011/09/sr-mix-100-commodo-deep-medi/",
"http://www.sonicrouter.com/2011/09/srq022sr-mix-99-ifan-dafydd-being-correct-is-boring/",
"http://www.sonicrouter.com/2011/09/sr-mix-98-h-u-d-stillcold/",
"http://www.sonicrouter.com/2011/09/sr-mix-97-nochexxx-ramp-recordings/",
"http://www.sonicrouter.com/2011/08/sr-mix-96-lr-groove-dj-eastwood-deja-vu/",
"http://www.sonicrouter.com/2011/08/sr-mix-95-scratcha-dva-hyperdubdva/",
"http://www.sonicrouter.com/2011/08/sr-mix-94-samoyed-flaskastrodynamics/",
"http://www.sonicrouter.com/2011/07/sr-mix-93-grievous-angel-keysound/",
"http://www.sonicrouter.com/2011/07/sr-mix-92-ralph-ltf-wifey/",
"http://www.sonicrouter.com/2011/07/srq021sr-mix-91-stanislav-sevostyanikhin-puts-things-into-kontext/",
"http://www.sonicrouter.com/2011/06/sr-mix-90-teeth-502noppa/",
"http://www.sonicrouter.com/2011/06/sr-mix-89-dalglish-highpoint-lowlife/",
"http://www.sonicrouter.com/2011/06/sr-mix-88-gang-colours-brownswood/",
"http://www.sonicrouter.com/2011/06/srq020sr-mix-87-lando-kal-takes-things-further/",
"http://www.sonicrouter.com/2011/06/sr-mix-86-rigas-den-andre-flora-fauna/",
"http://www.sonicrouter.com/2011/05/sr-mix-85-nino-donky-pitch/",
"http://www.sonicrouter.com/2011/05/sr-mix-84-cupp-cave-surf-killvlek/",
"http://www.sonicrouter.com/2011/05/sr-mix-83-dropping-gems-dropping-gems/",
"http://www.sonicrouter.com/2011/05/sr-mix-82-eprom-rwina/",
"http://www.sonicrouter.com/2011/05/sr-mix-81-vessel-left_blank/",
"http://www.sonicrouter.com/2011/04/sr-mix-80-kahn-punch-drunksure-skank/",
"http://www.sonicrouter.com/2011/04/sr-mix-79-monky-robox-neotech/",
"http://www.sonicrouter.com/2011/04/sr-mix-78-lapalux-pictures-music/",
"http://www.sonicrouter.com/2011/04/sr-mix-77-george-fitzgerald-hotflush/",
"http://www.sonicrouter.com/2011/04/sr-mix-76-outboxx-immerse/",
"http://www.sonicrouter.com/2011/03/sr-mix-75-konx-om-pax-display-copy/",
"http://www.sonicrouter.com/2011/03/sr-mix-74-zeppy-zep-fortified-audio/",
"http://www.sonicrouter.com/2011/03/sr-mix-73-ossie-lightworks/",
"http://www.sonicrouter.com/2011/03/sr-mix-72-dro-carey-trilogy-tapes/",
"http://www.sonicrouter.com/2011/03/sr-mix-71-light-club-coco-bryce-motem/",
"http://www.sonicrouter.com/2011/03/sr-mix70-morris-cowan-zaubernuss/",
"http://www.sonicrouter.com/2011/02/interview-photomachine-super/",
"http://www.sonicrouter.com/2011/02/interview-contakt-local-action/",
"http://www.sonicrouter.com/2011/02/interview-chairman-kato-pictures-music/",
"http://www.sonicrouter.com/2011/01/interview-kevin-mcphee-nakedlunchidle-hands/",
"http://www.sonicrouter.com/2011/01/interview-royal-t-butterz/",
"http://www.sonicrouter.com/2011/01/interview-randomer-super/",
"http://www.sonicrouter.com/2010/12/interview-the-phantom-senselesstop-billin/",
"http://www.sonicrouter.com/2010/12/interview-mista-men-greenmoney/",
"http://www.sonicrouter.com/2010/11/interview-gerry-read-dark-arx/",
"http://www.sonicrouter.com/2010/11/interview-kaiser-rory-power-live-from-the-hive/",
"http://www.sonicrouter.com/2010/11/read-srq016-distal-embassy-recordings/",
"http://www.sonicrouter.com/2010/11/interview-c-r-s-t-no-hats-no-hoods/",
"http://www.sonicrouter.com/2010/11/interview-desto-rampnoppa/",
"http://www.sonicrouter.com/2010/10/interview-ghost-mutt-donky-pitch/",
"http://www.sonicrouter.com/2010/10/interview-jamie-grind-talks-modulate/",
"http://www.sonicrouter.com/2010/10/interview-sentel-concrete-cut/",
"http://www.sonicrouter.com/2010/09/readdownload-srq015-hypno-ptnramp/",
"http://www.sonicrouter.com/2010/09/interview-crackazat-astrodynamics/",
"http://www.sonicrouter.com/2010/08/interview-icicle-shogun-audio/",
"http://www.sonicrouter.com/2010/08/interview-src-no-hats-no-hoodsnumbers/",
"http://www.sonicrouter.com/2010/08/interview-demokracy-robox-neotech/",
"http://www.sonicrouter.com/2010/07/interview-blawan-hessle-audio/",
"http://www.sonicrouter.com/2010/07/interview-orphan-101-saigondeca/",
"http://www.sonicrouter.com/2010/07/interview-jamie-grind-infrasonics/",
"http://www.sonicrouter.com/2010/06/interview-cloak-and-dagger-immerse/",
"http://www.sonicrouter.com/2010/05/interview-west-norwood-cassette-library-wncl-recordings/",
"http://www.sonicrouter.com/2010/05/readdownload-srq012-eleven-tigers/",
"http://www.sonicrouter.com/2010/05/interview-milyoo-opit/",
"http://www.sonicrouter.com/2010/04/interview-dema-lucky-me/",
"http://www.sonicrouter.com/2010/04/interview-dynooo-mac-flydigsville/",
"http://www.sonicrouter.com/2010/04/interview-simonoff-haunted-audio/",
"http://www.sonicrouter.com/2010/04/interview-clubroot-lo-dubs/",
"http://www.sonicrouter.com/2010/03/read-srq011-boss-kite/",
"http://www.sonicrouter.com/2010/03/interview-djg-pushing-redsurefire-sound/",
"http://www.sonicrouter.com/2010/03/interview-b-bravo-frite-nite/",
"http://www.sonicrouter.com/2010/03/interview-non-person-channel-zero/",
"http://www.sonicrouter.com/2010/03/interview-offshore-stuffbig-dada/",
"http://www.sonicrouter.com/2010/03/readdownload-srq010-f-7even/",
"http://www.sonicrouter.com/2010/02/interview-hxdb-mindsetformant/",
"http://www.sonicrouter.com/2010/02/interview-pariah-rs/",
"http://www.sonicrouter.com/2010/02/interview-the-kelly-twins-ufo/",
"http://www.sonicrouter.com/2010/01/interview-james-fox-take/",
"http://www.sonicrouter.com/2010/01/interview-xi-immerseformant/",
"http://www.sonicrouter.com/2010/01/readdownload-blue-daisy-srq009/",
"http://www.sonicrouter.com/2009/12/interview-xxxy-mindset/",
"http://www.sonicrouter.com/2009/11/download-slugabed-exclusive-srq008-mix/",
"http://www.sonicrouter.com/2009/11/interview-fantastic-mr-fox-black-acre/",
"http://www.sonicrouter.com/2009/11/interview-emptyset-caravan/",
"http://www.sonicrouter.com/2009/11/interview-tokimonsta-rampbrainfeeder/",
"http://www.sonicrouter.com/2009/11/interview-monopoly-brainfeeder/",
"http://www.sonicrouter.com/2009/10/event-infrasonics-warehouse-rave-w-untold/",
"http://www.sonicrouter.com/2009/10/interview-dj-madd-boka/",
"http://www.sonicrouter.com/2009/09/interview-taz-buckfaster-numbersrwinaramp/",
"http://www.sonicrouter.com/2009/09/interview-dfrnt-echodubon-the-edge/",
"http://www.sonicrouter.com/2009/09/interview-hyetal-reductionformant/",
"http://www.sonicrouter.com/2009/08/interview-martin-kemp-blunted-robots/",
"http://www.sonicrouter.com/2009/08/interview-gravious-hotflushhpll/",
"http://www.sonicrouter.com/2009/07/interview-micky-nakedlunch/",
"http://www.sonicrouter.com/2009/07/download-akkachar-sonic-router-mixxx/",
"http://www.sonicrouter.com/2009/07/interview-reecha-dirty-canvas/",
"http://www.sonicrouter.com/2009/07/interview-the-hizatron-wigflex/",
"http://www.sonicrouter.com/2009/07/interview-faltydl-planet-muramp/",
"http://www.sonicrouter.com/2009/06/interview-efa-pollen/",
"http://www.sonicrouter.com/2009/06/pre-order-keaver-brause-the-middle-way-dealmaker/",
"http://www.sonicrouter.com/2009/06/interview-octa-push-iberian/",
"http://www.sonicrouter.com/2009/06/interview-warlock-rag-bone/",
"http://www.sonicrouter.com/2009/06/interview-s-p-a-t-i-a-l/",
"http://www.sonicrouter.com/2009/04/interview-shortstuff-berkane-solramppollen/",
"http://www.sonicrouter.com/2009/04/interview-october-caravan/",
"http://www.sonicrouter.com/2009/04/interview-deville-senseless-records/",
"http://www.sonicrouter.com/2009/03/download-thorsten-sideb0ard-structure-agency-mix/",
"http://www.sonicrouter.com/2009/03/interview-the-village-orchestra-stuff/",
"http://www.sonicrouter.com/2009/03/interview-untold-hemlock/",
"http://www.sonicrouter.com/2009/03/interview-kidkut-immerse/",
"http://www.sonicrouter.com/2009/02/interview-vista-boombap/",
"http://www.sonicrouter.com/2009/02/interview-rekordah-pollen/"
]
require 'open-uri'
open(mixes.shuffle.first) do |f|
f.each do |l|
if /<iframe\s+name="fairplayer"/ =~ l
m = l.match /src\s*=\s*"(.*?)"/
`open #{m[1]}`
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment