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
mySignaller.signalMessage({ | |
"ice": iceGathr.getLocalParameters(), | |
"dtls": dtlsTr.getLocalParameters(), | |
"recvAudioCaps": recvAudioCaps, | |
"recvVideoCaps": recvVideoCaps, | |
"sendAudioCaps": sendAudioCaps, | |
"sendVideoCaps": sendVideoCaps | |
}); |
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
navigator.mediaDevices.getUserMedia ({ | |
"audio": true, | |
"video": { | |
width: 640, | |
height: 360, | |
facingMode: "user" | |
} | |
}).then( | |
gotStream | |
).catch( |
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
#include<stdio.h> | |
main() | |
{ | |
printf("Hello World"); | |
} |
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 Collection = function () { | |
return { | |
db: [], | |
add: function (o) { | |
if (typeof(o.uid) === 'undefined') { | |
throw 'error: object has no uid'; | |
} | |
if (this.get(o.uid) === false) { | |
this.db.push(o); | |
} |
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 http = require("http"), | |
url = require("url"), | |
path = require("path"), | |
fs = require("fs") | |
port = process.argv[2] || 8976, | |
throttle = 2000; // ms | |
http.createServer(function(request, response) { |
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 food = ["kiwi","bananas"], | |
poo = [], | |
eat = function(fruit) { | |
var transformed = (function(fruit) { | |
return fruit + " shit"; | |
})(fruit); | |
return transformed; | |
}; | |
for (var i = food.length - 1; i >= 0; i--) { |
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
<!-- | |
RATP or RAPT ? | |
--> | |
<osm-script output="json" timeout="25"> | |
<!-- gather results --> | |
<union> | |
<!-- query part for: “operator=rapt” --> | |
<query type="node"> | |
<has-kv k="operator" v="RAPT"/> | |
<bbox-query s="48.8326901185081" w="2.325925827026367" n="48.86477122456225" e="2.379741668701172"/> |
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
// | |
// images summary | |
// output all images in the page | |
// quick check on mobile version the images ratios | |
// (only for images that are included into the dom) | |
// | |
(function($,window,document){ | |
var r = { | |
onepix : [], | |
dropped: [], |
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
"use strict"; | |
var WebSocketServer = require('ws').Server; | |
var serve = function(options) { | |
var port = options.port || 9802; | |
var wss = new WebSocketServer({port: port}); | |
console.log('serving socket on http://localhost:'+port) | |
var users = []; |
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
(function (c) { | |
'use strict'; | |
var prop, method, | |
empty = {}, | |
dummy = function() {}, | |
properties = 'memory'.split(','), | |
methods = ('assert,clear,constructor,count,debug,dir,dirxml,error,exception,group,groupCollapsed,groupEnd,' | |
+ 'info,log,markTimeline,profile,profileEnd,time,timeEnd,trace,warn').split(','); | |
while (prop = properties.pop()) c[prop] = c[prop] || empty; | |
while (method = methods.pop()) c[method] = c[method] || dummy; |