This file contains 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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Data Channel Demo 1</title> | |
<style> | |
button { | |
font: 18px sans-serif; | |
padding: 8px; | |
} | |
textarea { |
This file contains 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
/*! | |
* Express - router - methods | |
* Copyright(c) 2010 TJ Holowaychuk <tj@vision-media.ca> | |
* MIT Licensed | |
*/ | |
/** | |
* Hypertext Transfer Protocol -- HTTP/1.1 | |
* http://www.ietf.org/rfc/rfc2616.txt | |
*/ |
This file contains 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
{ | |
"name": "bucket-password", | |
"version": "1.0.0", | |
"description": "", | |
"main": "server.js", | |
"dependencies": { | |
"aws-sdk": "^2.2.10", | |
"basic-auth": "^1.0.3" | |
}, | |
"devDependencies": {}, |
This file contains 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
(function() { | |
var | |
// Configuration: | |
hostname = window.CHANNEL_HOST || window.location.hostname || 'localhost', | |
websocketServer = "ws://"+hostname+":8000/", | |
// For browser compatibility: | |
PeerConnection = window.PeerConnection | |
|| window.RTCPeerConnection |
This file contains 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
package main | |
import ( | |
"fmt" | |
"net/http" | |
"code.google.com/p/go.net/websocket" | |
"strings" | |
"time" | |
) |
This file contains 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 redis = require('redis') | |
, client = redis.createClient() | |
, assert = require('assert'); | |
// redis.debug_mode = true; | |
client.on("error", function (err) { | |
console.log("Error " + err); | |
}); |
This file contains 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 express = require('express'); | |
function middleware(req,res,next){ | |
// do real funky stuff here... | |
// add access to funky stuff in routes | |
req.funky = function(){return 'funky stuff'} | |
// add access to funky stuff in views | |
res.locals.funky = function(){return 'funky stuff'} |
This file contains 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
diff --git a/lib/parser.js b/lib/parser.js | |
index ca6fe8d..9673efe 100644 | |
--- a/lib/parser.js | |
+++ b/lib/parser.js | |
@@ -387,7 +387,7 @@ Parser.prototype = { | |
if (!this.filename) | |
throw new Error('the "filename" option is required to extend templates'); | |
- var path = name = this.expect('extends').val.trim() | |
+ var path = this.expect('extends').val.trim() |
This file contains 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
function (doc){ | |
var object = {'resource':'Post'}; | |
var match = function(){ | |
for( var k in object ) | |
if( object[k] !== doc[k] ) | |
return false; | |
return true; | |
}; | |
if( doc.resource === 'Post' && match() ){ | |
emit(doc._id, doc); |
This file contains 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
diff --git a/test/connector/agent-test.js b/test/connector/agent-test.js | |
index 809b121..2bcfd6d 100644 | |
--- a/test/connector/agent-test.js | |
+++ b/test/connector/agent-test.js | |
@@ -183,7 +183,7 @@ function shouldHaveOptions(setOptions) { | |
tests['should have host option'] = function(connector) { | |
var host = options.host || options.url && urlData.hostname || defaultOptions.host; | |
assert.strictEqual(connector.host, host); | |
- if (!options.agent) assert.strictEqual(connector.agent.host, host); | |
+ if (!options.agent) assert.strictEqual(connector.host, host); |