Skip to content

Instantly share code, notes, and snippets.

import time;
import hmac;
import hashlib;
import os;
import math;
import base64;
import struct;
def get_hotp(secret, counter):
# get and decode shared secret
@stephen
stephen / gist:5def6c44cac8caa82692
Created May 19, 2014 16:55
4 letter twitter handles available
testing 456976 handles
ZKYL
XETY
WFLW
VEMR
SESL
PEEP
NWZY
ILSB
@stephen
stephen / handles
Last active August 29, 2015 14:01
Twitter handles available from /usr/share/dict/words
testing 254164 handles
zythem
zymotoxic
zymotize
zymotically
zymotechnic
zymotechny
zymotechnical
zymosterol
zymosimeter
@stephen
stephen / Dump.xml
Last active August 29, 2015 14:01
Sonos event output (zone topology)
<?xml version="1.0"?>
<e:propertyset xmlns:e="urn:schemas-upnp-org:event-1-0">
<e:property>
<ZoneGroupState>&lt;ZoneGroups&gt;&lt;ZoneGroup Coordinator="RINCON_000E581CD93201400" ID="RINCON_000E581CD93201400:0"&gt;&lt;ZoneGroupMember UUID="RINCON_000E581CD93201400" Location="http://192.168.1.119:1400/xml/device_description.xml" ZoneName="BRIDGE" Icon="x-rincon-roomicon:viper" Configuration="1" Invisible="1" IsZoneBridge="1" SoftwareVersion="26.1-76230" MinCompatibleVersion="24.0-00000" LegacyCompatibleVersion="24.0-0000" BootSeq="25"/&gt;&lt;/ZoneGroup&gt;&lt;ZoneGroup Coordinator="RINCON_000E58F3878001400" ID="RINCON_000E58F3878001400:9"&gt;&lt;ZoneGroupMember UUID="RINCON_B8E9375433D201400" Location="http://192.168.1.120:1400/xml/device_description.xml" ZoneName="Portable" Icon="x-rincon-roomicon:living" Configuration="1" SoftwareVersion="26.1-76230" MinCompatibleVersion="24.0-00000" LegacyCompatibleVersion="24.0-0000" BootSeq="36"/&gt;&lt;ZoneGroupMember UUID="RINCON_000E58F3878001400" Location
@stephen
stephen / eventTester.js
Created May 11, 2014 19:31
node-sonos eventing framework
var Sonos = require('../index').Sonos;
var Listener = require('../lib/events/listener');
var x = new Listener(new Sonos(process.env.SONOS_HOST || '192.168.2.11'));
x.listen('/ZoneGroupTopology/Event', function(err, sid) {
console.log(sid);
});
@stephen
stephen / gist:3ad33ad4d02307b76ce8
Last active August 29, 2015 14:01
AirSonos Diagnostics - Bridge, {Play:3, Play:1}
AirSonos Diagnostics
node version v0.10.22
operating sys darwin (x64)
Searching for Sonos devices on network...
Device {"host":"172.17.106.37","port":1400} (BR100)
`- attrs: {"CurrentZoneName":"BRIDGE",
"CurrentIcon":"x-rincon-roomicon:viper",
"CurrentConfiguration":"1"}
# This file is used with the GYP meta build system.
# http://code.google.com/p/gyp
# To build try this:
# svn co http://gyp.googlecode.com/svn/trunk gyp
# ./gyp/gyp -f make --depth=. mpg123.gyp
# make
# ./out/Debug/test
{
'variables': {
- [ ] one month's rent as deposit
- [ ] pricing, payment method + schedule
- [ ] included vs. not included - utilities (internet, water, electricity, ...)
- [ ] duration
- [ ] location
- [ ] # of people
- [ ] rental rules (verbatim)
- [ ] insurance (not included)
@stephen
stephen / dump.xml
Created May 1, 2014 08:59
airsonos play dump
<?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:SetAVTransportURI xmlns:u="urn:schemas-upnp-org:service:AVTransport:1">
<InstanceID>0</InstanceID>
<CurrentURI>x-rincon-mp3radio://172.17.104.77:8000/listen.m3u</CurrentURI>
<CurrentURIMetaData/>
</u:SetAVTransportURI>
</s:Body>
</s:Envelope>
@stephen
stephen / dump.xml
Created May 1, 2014 08:56
sonos play radio (from controller)
<?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:SetAVTransportURI xmlns:u="urn:schemas-upnp-org:service:AVTransport:1">
<InstanceID>0</InstanceID>
<CurrentURI>x-rincon-mp3radio://172.17.107.111:8004/listen.m3u</CurrentURI>
<CurrentURIMetaData>&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="R:0/0/49" parentID="R:0/0" restricted="true"&gt;&lt;dc:title&gt;Local&lt;/dc:title&gt;&lt;upnp:class&gt;object.item.audioItem.audioBroadcast&lt;/upnp:class&gt;&lt;desc id="cdudn" nameSpace="urn:schemas-rinconnetworks-com:metadata-1-0/"&gt;SA_RINCON65031_&lt;/desc&gt;&lt;/item&gt;&lt;/DIDL-Lite&gt;</CurrentURIMetaData>
</u:SetAVTransportURI>
</s:Body>
</s:Envelope>