This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * Modified version of TJ's http support file from the Express repo: | |
| * https://github.com/visionmedia/express/blob/master/test/support/http.js | |
| * | |
| * Module dependencies. | |
| */ | |
| var EventEmitter = require('events').EventEmitter | |
| , should = require('should') | |
| , methods = ['get','post','put','delete','head'] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var relativeDate = (function(undefined){ | |
| var SECOND = 1000, | |
| MINUTE = 60 * SECOND, | |
| HOUR = 60 * MINUTE, | |
| DAY = 24 * HOUR, | |
| WEEK = 7 * DAY, | |
| YEAR = DAY * 365, | |
| MONTH = YEAR / 12; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| set nocompatible | |
| set guioptions=aAce | |
| set number | |
| set ruler | |
| syntax on | |
| " Whitespace stuff | |
| set nowrap |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # | |
| # This script installs and configures couchdb on a fresh Amazon Linux AMI instance. | |
| # | |
| # Must be run with root privileges | |
| # Tested with Amazon Linux AMI release 2011.02.1.1 (ami-8c1fece5) | |
| # | |
| export BUILD_DIR="$PWD" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| 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' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * 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){ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * 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'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ########################################################################### | |
| ## 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. | |
| ########################################################################### |
NewerOlder