Skip to content

Instantly share code, notes, and snippets.

View bsstoner's full-sized avatar

Brian Stoner bsstoner

View GitHub Profile
{
creator: {
fbId: 12345,
name: "Brian Stoner"
},
friend_queue: [
'http://a6.sphotos.ak.fbcdn.net/hphotos-ak-snc4/46327_751529381931_32471_40134857_189347_n.jpg',
'http://a1.sphotos.ak.fbcdn.net/hphotos-ak-ash2/60009_758235258301_32471_40319103_1596769_n.jpg',
'http://a3.sphotos.ak.fbcdn.net/hphotos-ak-snc4/38320_741291478771_32471_39785387_5405113_n.jpg'
def search
bing = RBing.new('1F2DDCE3F2B8077381B1CD1A5FF9B34B37F3C173')
@rsp1 = bing.image(params[:thing1], :style => 'photo')
@rsp2 = bing.image(params[:thing2], :style => 'photo')
@thing1 = params[:thing1]
@thing2 = params[:thing2]
end
@bsstoner
bsstoner / Node.js OpenTokSDK
Created November 20, 2010 04:28
Node.js implementation of Tokbox's OpenTokSDK
/**
* Node.js implementation of Tokbox's OpenTokSDK
*
* by Brian Stoner
*
* var tokbox = require('./tokbox')
*
* var t = new tokbox.OpenTokSDK(API_KEY,API_SECRET)
*
* t.createSession('127.0.0.1', {}, function(session){
cd /path/to/files/
for fl in *.js; do
mv $fl $fl.old
sed -e 's/find_string/replace_string/' $fl.old > $fl
rm -f $fl.old
done
/**
* SocketManager - Singleton to manage multi-channel socket 'routing', need a way to merge with socket.io so client sessions aren't stored twice in memory,
*
* Requires Socket.IO-node and Socket.IO client libraries.
*
* Usage:
* in your main app.js file (or whereever you create the server)
*
* var io = require('socket.io'),
* sm = require('socketmanager');
###########################################################################
## Playing around with the awesome Echonest Remix API.
##
## http://code.google.com/p/echo-nest-remix/
##
## This is a script that will loop 4 beats from track 1 and mix them
## behind track 2., also syncing the track tempos
##
## Change the variables below.
###########################################################################