Skip to content

Instantly share code, notes, and snippets.

var _creditMerchantBankAccount = function() {
var amount = 5000;
var description = 'test';
var bankAccount = '/v1/customers/CU3Fxp3A2qYIJz5XrutOxthu/bank_accounts/BA4R9ts8OYE9ZaLrOUIklvW6';
balanced.Credits.add(bankAccount, 10000, description, function(err, result) {
console.log(err);
console.log(result);
});
};
@stephen
stephen / gist:8203356
Created December 31, 2013 23:37
playing with BLE + Misfit Shine
//
// sandboxAppDelegate.m
// Sandbox
//
// Created by Stephen Wan on 12/31/13.
// Copyright (c) 2013 Stephen Wan. All rights reserved.
//
#import "sandboxAppDelegate.h"
#import <IOBluetooth/IOBluetooth.h>
@stephen
stephen / gist:8487772
Last active January 3, 2016 16:09
txt for airplay working with os x
var mdns = require('mdns2');
var net = require('net');
var rtsp = require('./rtsp');
var txtSetup = {
txtvers: '1', // txt record version?
tx: '1', // ?
ch: '2', // # channels
cn: '0,2', // codec; 0=pcm, 1=alac, 2=aac, 3=aac elc
et: '0,1', // encryption; 0=none, 1=rsa, 3=fairplay, 4=mfisap, 5=fairplay2.5; need rsa for os x
@stephen
stephen / gist:8488120
Last active January 3, 2016 16:18
Log of AirPlay send/received via AirSonos using Spotify (47 seconds of playback) from iPad Air (iOS 7) using AirSonos commit 6f8dd2086b
BEGIN BONJOUR ADVERTISING
INSPECTING HEADER @ 1390036591413
`--: OPTIONS * RTSP/1.0
`--: CSeq: 0
`--: X-Apple-Device-ID: 0xaccf5c73af4b
`--: Apple-Challenge: JWkfiX/5gzeKemPDHyBwww==
`--: DACP-ID: 21A3D7C25BB62248
`--: Active-Remote: 1588769825
`--: User-Agent: AirPlay/190.9
END HEADER
@stephen
stephen / 422C.md
Last active August 29, 2015 13:56
Shortcuts to save time on making code compliant with EE422C's coding standards

Save time on EE422C coding standards

Automatic newline formatting

  1. Download the attached terriblestandards422C.xml
  2. Preferences > Java > Code Style > Formatter > Import > terriblestandards422C.xml
  3. Apply
  4. For each Java file, press Command+Shift+F (Control+Shift+F in lesser operating systems)

Keybase proof

I hereby claim:

  • I am stephen on github.
  • I am swan (https://keybase.io/swan) on keybase.
  • I have a public key whose fingerprint is 5252 D938 83A1 854B 90EF C3A0 6D14 0B75 E045 33C6

To claim this, I am signing this object:

Need from house:

Confirm Beds? Keys? Wifi? Parking? Specific instructions?

<script>
$(document).ready(function() {
$('#slide_container_12_3_2013').append('<iframe></iframe>');
});
</script>
@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