Skip to content

Instantly share code, notes, and snippets.

@stephen
stephen / dump.xml
Created May 1, 2014 08:25
spotify (other playlist) sonos
<?xml version="1.0"?>
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/" s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<s:Body>
<u:AddURIToQueue xmlns:u="urn:schemas-upnp-org:service:AVTransport:1">
<InstanceID>0</InstanceID>
<EnqueuedURI>x-sonos-spotify:spotify%3atrack%3a7eQUgarLukHLkZaO1mxtab?sid=12&amp;flags=32</EnqueuedURI>
<EnqueuedURIMetaData>&lt;DIDL-Lite xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:upnp="urn:schemas-upnp-org:metadata-1-0/upnp/" xmlns:r="urn:schemas-rinconnetworks-com:metadata-1-0/" xmlns="urn:schemas-upnp-org:metadata-1-0/DIDL-Lite/"&gt;&lt;item id="10030020spotify%3atrack%3a7eQUgarLukHLkZaO1mxtab" parentID="10060a6cspotify%3auser%3astephencwan%3aplaylist%3a2pR3LTIQS0nOng3Oofk6Ef" restricted="true"&gt;&lt;dc:title&gt;The Sound of Silence&lt;/dc:title&gt;&lt;upnp:class&gt;object.item.audioItem.musicTrack&lt;/upnp:class&gt;&lt;desc id="cdudn" nameSpace="urn:schemas-rinconnetworks-com:metadata-1-0/"&gt;SA_RINCON3079_X_#Svc3079-
@stephen
stephen / dump.xml
Last active August 29, 2015 14:00
attempt
<?xml version="1.0" encoding="utf-8"?>
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/" s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<s:Body>
<u:AddURIToQueue xmlns:u="urn:schemas-upnp-org:service:AVTransport:1">
<InstanceID>0</InstanceID>
<EnqueuedURI>x-sonos-spotify:spotify%3atrack%3a6EKQbI0jKua5AehBsicMdD</EnqueuedURI>
<EnqueuedURIMetaData>&lt;DIDL-Lite xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:upnp="urn:schemas-upnp-org:metadata-1-0/upnp/" xmlns:r="urn:schemas-rinconnetworks-com:metadata-1-0/" xmlns="urn:schemas-upnp-org:metadata-1-0/DIDL-Lite/"&gt; &lt;item id="108405684spotify%3atrack%3a6EKQbI0jKua5AehBsicMdD" restricted="true"&gt; &lt;dc:title&gt;&lt;/dc:title&gt; &lt;upnp:class&gt;object.item.audioItem.musicTrack&lt;/upnp:class&gt; &lt;desc id="cdudn" nameSpace="urn:schemas-rinconnetworks-com:metadata-1-0/"&gt;SA_RINCON2311_X_#Svc2311-0-Token&lt;/desc&gt; &lt;/item&gt; &lt;/DIDL-Lite&gt;</EnqueuedURIMetaData>
@stephen
stephen / dump.xml
Last active August 29, 2015 14:00
spotify/sonos wireshark
<?xml version="1.0"?>
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/" s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<s:Body>
<u:AddURIToQueue xmlns:u="urn:schemas-upnp-org:service:AVTransport:1">
<InstanceID>0</InstanceID>
<EnqueuedURI>x-sonos-spotify:spotify%3atrack%3a6ouTGbETM7ZdID1eMXZJde?sid=12&amp;flags=32</EnqueuedURI>
<EnqueuedURIMetaData>&lt;DIDL-Lite xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:upnp="urn:schemas-upnp-org:metadata-1-0/upnp/" xmlns:r="urn:schemas-rinconnetworks-com:metadata-1-0/" xmlns="urn:schemas-upnp-org:metadata-1-0/DIDL-Lite/"&gt;&lt;item id="10030020spotify%3atrack%3a6ouTGbETM7ZdID1eMXZJde" parentID="100a006cstarred" restricted="true"&gt;&lt;dc:title&gt;Day &amp;apos;N&amp;apos; Nite - Crookers Remix&lt;/dc:title&gt;&lt;upnp:class&gt;object.item.audioItem.musicTrack&lt;/upnp:class&gt;&lt;desc id="cdudn" nameSpace="urn:schemas-rinconnetworks-com:metadata-1-0/"&gt;SA_RINCON3079_X_#Svc3079-0-Token&lt;/desc&gt;&lt;/item&
@stephen
stephen / metricstream.md
Created April 25, 2014 03:31
Metric streaming

Quick thought on streaming metrics:

  • bytes/second
  • messages/second
  • replay mode (timestamp writes, playback with saved timing)
@stephen
stephen / gist:11235487
Created April 23, 2014 22:59
AirFoil + AirSonos
Please include the following information when contacting Rogue Amoeba Support.
Domain: SSAirfoilErrorDomain
Code: -1500
NSLocalizedDescription: RTSP Protocol Error
NSLocalizedRecoverySuggestion: Could not parse response from remote speaker
@stephen
stephen / nodetunes.log
Created April 3, 2014 07:53
Nodetunes output log (3 state buffer)
➜ airsonos git:(master) ✗ node index.js
setting up airsonos for { host: '172.17.106.37', port: 1400 }
setting up airsonos for { host: '172.17.105.103', port: 1400 }
requesting retransmit for 65522 to 0 - total: -65522
requesting retransmit for 2 to 65522 - total: 65520
requesting retransmit for 65524 to 2 - total: -65522
requesting retransmit for 12 to 65524 - total: 65512
requesting retransmit for 65526 to 12 - total: -65514
requesting retransmit for 43912 to 65526 - total: 21614
requesting retransmit for 65528 to 43912 - total: -21616

Tell us about a time you built something awesome in code. How did you choose it? Why did you enjoy it?

Prior to college, I built a point of sale system usable on Android devices. The project stemmed from my time as a summer camp teacher - at the time, we sold food and snacks to kids throughout the day, but had no good way of tracking sales (we used an Excel spreadsheet for some time..!). I ended up spending part of the summer building out the product and validating its use cases with the camp owners and a few surrounding small businesses. Over time, I worked in more advanced use cases such as integrating flows for Square and PayPal, and product search/lookup using the Factual API. The process was great in having a small, weekly feedback loop on the needs and functions of the product.

Tell us about what you hope to learn this summer and why is HackNY right for you.

I'm interested in being at a startup that’s already had some success. Much of my experience has been in working on small-scale projects

@stephen
stephen / gist:9709439
Created March 22, 2014 15:59
node output
GET /stream HTTP/1.1
ACCEPT: */*
HOST: 172.17.104.64
User-Agent: Nullsoft Winamp3 version 3.0 (compatible)
Icy-MetaData: 1
HTTP/1.1 200 OK
Content-Type: audio/mpeg
Connection: close
Transfer-Encoding: identity
@stephen
stephen / gist:9702390
Created March 22, 2014 06:53
nicecast listen dump
GET /listen HTTP/1.1
ACCEPT: */*
HOST: 172.17.104.64:8001
User-Agent: Nullsoft Winamp3 version 3.0 (compatible)
Icy-MetaData: 1
HTTP/1.0 200 OK
Content-Type: audio/mpeg
icy-br:128
icy-name:Stephen Wan's Broadcast
<script>
$(document).ready(function() {
$('#slide_container_12_3_2013').append('<iframe></iframe>');
});
</script>