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 options, req, request; | |
request = require('request'); | |
options = { | |
uri: 'https://p04-fmfmobile.icloud.com/fmipservice/friends/{account_id}/{unique_device_id}/minCallback/selFriend/refreshClient', | |
method: 'POST', | |
headers: { | |
'X-Apple-AuthScheme': 'Forever', | |
'Content-type': 'application/json' |
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
/* | |
A simple new-line delimited JSON protocol with upgrades. | |
Receiving Usage: | |
protocol = require('./frame-protocol'); | |
// parsing data | |
parser = protocol.Parser(); |
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
// Based on http://bit.ly/215MBZ | |
function FailureDetector(ws) { | |
// ws stands for window size. | |
// How many heartbeat intervals we keep track of. | |
this.ws = ws || 100; | |
this.window = []; | |
this.last = null; | |
} | |
exports.FailureDetector = FailureDetector; |
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
/* | |
As of version 1.1.2, Propane will load and execute the contents of | |
~Library/Application Support/Propane/unsupported/caveatPatchor.js | |
immediately following the execution of its own enhancer.js file. | |
You can use this mechanism to add your own customizations to Campfire | |
in Propane. | |
Below you'll find two customization examples. |
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
require.registerExtension('.js', function(js){ | |
return js.replace(/^ *\/\/debug: */gm, ''); | |
}); |
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> | |
<script type="text/javascript"> | |
var simplegeo=(function(b,d){var c=(function(k,g){function e(){return(new Date).getTime()}var m=k.document;var n=e(),i=/=\?(&|$)/,j=/(\?|&)_=.*?(&|$)/,l=/\?/,h=/%20/g,f=Object.prototype.toString,o={isFunction:function(p){return f.call(p)==="[object Function]"},isArray:function(p){return f.call(p)==="[object Array]"},each:function(s,w,r){var q,t=0,u=s.length,p=u===g||o.isFunction(s);if(r){if(p){for(q in s){if(w.apply(s[q],r)===false){break}}}else{for(;t<u;){if(w.apply(s[t++],r)===false){break}}}}else{if(p){for(q in s){if(w.call(s[q],q,s[q])===false){break}}}else{for(var v=s[0];t<u&&w.call(v,t,v)!==false;v=s[++t]){}}}return s},param:function(p){var q=[];if(o.isArray(p)||p.jquery){o.each(p,function(){u(this.name,this.value)})}else{for(var t in p){r(t,p[t])}}return q.join("&").replace(h,"+");function r(s,v){if(o.isArray(v)){o.each(v,function(x,w){if(/\[\]$/.test(s)){u(s,w)}else{r(s+"["+(typeof w==="object"||o.isArray(w)?x:"")+"]",w)}})}else{if(v!=n |
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
# In-memory Cassandra-ish thingy... useful for unit tests. Maybe useful for other | |
# stuff too? No support for SuperColumns, but that should be easy enough to add. | |
import bisect | |
import copy | |
from cassandra.ttypes import NotFoundException, Column, ColumnPath, ColumnOrSuperColumn | |
class SSTable(object): |
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
// HTTP client for testing high connection concurrency | |
// Authors: Richard Jones and Rasmus Andersson | |
// Released in the public domain. No restrictions, no support. | |
#include <sys/types.h> | |
#include <sys/time.h> | |
#include <sys/queue.h> | |
#include <stdlib.h> | |
#include <err.h> | |
#include <event.h> | |
#include <evhttp.h> |
NewerOlder