Skip to content

Instantly share code, notes, and snippets.

Avatar
🍙

Stephen Wan stephen

🍙
View GitHub Profile
View backend-architectures.md
View gist:5996673
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 Dec 31, 2013
playing with BLE + Misfit Shine
View gist:8203356
//
// 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 Jan 3, 2016
txt for airplay working with os x
View gist:8487772
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 Jan 3, 2016
Log of AirPlay send/received via AirSonos using Spotify (47 seconds of playback) from iPad Air (iOS 7) using AirSonos commit 6f8dd2086b
View gist:8488120
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 Aug 29, 2015
Shortcuts to save time on making code compliant with EE422C's coding standards
View 422C.md

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)

View keybase.md

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:

View Housing.md

Need from house:

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

View gist:9625975
<script>
$(document).ready(function() {
$('#slide_container_12_3_2013').append('<iframe></iframe>');
});
</script>
@stephen
stephen / gist:9702390
Created Mar 22, 2014
nicecast listen dump
View gist:9702390
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