Skip to content

Instantly share code, notes, and snippets.

@dbrans
dbrans / on-time-protocol.md
Last active October 13, 2015 04:29
on-time-protocol - Ensures that two or more people meet at a given time.

on-time-protocol

v1.0.0

What is on-time-protocol?

on-time-protocol ensures that two or more people meet at a given time.

The basic steps of on-time-protocol are:

  1. Agree on a time and a location.
  2. State clearly that you are using on-time-protocol and the version of the protocol.
  3. Arrive on time at that location
@dbrans
dbrans / gist:4199503
Created December 4, 2012 00:56
What Chrome is actually sending
sudo nc -lk 80
GET /user_data/segments/3?pubid=44c1a380-770f-11df-93f2-0800200c9a66&technographics=1&callback=Krux.ns._default.kxjsonp_userData HTTP/1.1
Host: apiservices.krxd.net
Connection: keep-alive
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_2) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.95 Safari/537.11
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Encoding: gzip,deflate,sdch
Accept-Language: en-US,en;q=0.8
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.3
Cookie: __qca=P0-2081608527-1351101294599; ib.mookie1.com/ibkukiuno=s=b06b9c53-8be9-49ad-a253-d8abaa8b0fe2&h=&v=0&l=-8588505055827266980&op=0&m=0; ib.mookie1.com/ibkukinet=1796589311=-8588505055827266980; .247realmedia.com/OAX=axXG/1CIK3cAAn6z; .doubleclick.net/id=c5ef7634a00008c||t=1351101302|et=730|cs=002213fd48566ff377b2b261b6; afy11.net/a=tlRLC2IHeUWA7m-h1iVAug; afy11.net/t=1,50*50882b7a*6ZAHeNiZ5d*jw==*,b4*50882b7a*cNQ2d6WW0k*vg==*,17c*50882b7a*d73lKk4aHf*MA==*; .criteo.com/uid=da722401-1fd6-4
@dbrans
dbrans / gist:4199462
Created December 4, 2012 00:45
What chrome thinks it is sending and what it gets back
Request
GET /user_data/segments/3?pubid=44c1a380-770f-11df-93f2-0800200c9a66&technographics=1&callback=Krux.ns._default.kxjsonp_userData HTTP/1.1
Host: apiservices.krxd.net
Connection: keep-alive
Cache-Control: no-cache
Pragma: no-cache
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_2) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.95 Safari/537.11
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Encoding: gzip,deflate,sdch
@dbrans
dbrans / chainPrototypes.js
Created September 19, 2012 20:22
Javascript: Chain the prototypes of Parent and Child functions
// Chain the prototypes of Parent and Child functions.
function chainPrototypes (Parent, Child) {
// Create the link to Parent's prototype
var ChildPrototype = function(){};
ChildPrototype.prototype = Parent.prototype;
Child.prototype = new ChildPrototype();
// Setup the proper constructor for 'instances' of Child.
Child.prototype.constructor = Child;
@dbrans
dbrans / gist:1020293
Created June 11, 2011 05:42
This code yields a compile error
checkReserved (names) ->
throw 'Reserved' for n in names when n in RESERVED
@dbrans
dbrans / gist:985195
Created May 22, 2011 05:04
object literal with function call with function
a: b c, -> d
PARSE ERROR ON LINE 1: UNEXPECTED ','
@dbrans
dbrans / gist:973880
Created May 16, 2011 03:23
CoffeeScript Bug: binding class methods with reserved names
class Test
export: =>
The js compilation I get is this (note the ' this."export" ')
var Test;
var __bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; };
Test = (function() {
function Test() {