It's now here, in The Programmer's Compendium. The content is the same as before, but being part of the compendium means that it's actively maintained.
// Just before switching jobs: | |
// Add one of these. | |
// Preferably into the same commit where you do a large merge. | |
// | |
// This started as a tweet with a joke of "C++ pro-tip: #define private public", | |
// and then it quickly escalated into more and more evil suggestions. | |
// I've tried to capture interesting suggestions here. | |
// | |
// Contributors: @r2d2rigo, @joeldevahl, @msinilo, @_Humus_, | |
// @YuriyODonnell, @rygorous, @cmuratori, @mike_acton, @grumpygiant, |
ror, scala, jetty, erlang, thrift, mongrel, comet server, my-sql, memchached, varnish, kestrel(mq), starling, gizzard, cassandra, hadoop, vertica, munin, nagios, awstats
from __future__ import print_function | |
from collections import OrderedDict | |
from prepareable import Prepareable | |
from six import with_metaclass, iteritems | |
class FooMeta(with_metaclass(Prepareable, type)): | |
def __new__(cls, name, bases, attributes): |
#!/usr/bin/env ruby | |
require 'optparse' | |
require 'fileutils' | |
class Lunchy | |
VERSION = '0.7.0' | |
def start(params) | |
raise ArgumentError, "start [-wF] [name]" if params.empty? |
/* a macro that defines a context variable that is stored in thread local | |
storage. It's implemented as a module that exports a `get`, `set` and | |
`set_to` function. `set_to` acts as a stack. */ | |
macro_rules! context_var (($name:ident : $t:ty) => ( | |
mod $name { | |
/* internal tls key helper */ | |
fn key(_x: @$t) {} | |
/* checks if the variable is set */ | |
pub fn is_set() -> bool { unsafe { |
function curry(f) { | |
return function(x) { | |
var g = f.bind(this, x); | |
if(g.length == 0) return g(); | |
if(arguments.length > 1) return curry(g).apply(this, [].slice.call(arguments, 1)); | |
return curry(g); | |
}; | |
} | |
var sum = curry(function(x, y) { |
This document lays out some baseline expectations between conference speakers and conference presenters. The general goal is to maximize the value the conference provides to its attendees and community and to let speakers know what they might reasonably expect from a conference.
We believe that all speakers should reasonably expect these things, not just speakers who are known to draw large crowds, because no one is a rockstar but more people should have the chance to be one. We believe that conferences are better -- and, dare we say, more diverse -- when the people speaking are not just the people who can afford to get themselves there, either because their company paid or they foot the bill themselves. Basically, this isn't a rock show rider, it's some ideas that should help get the voices of lesser known folks heard.
These expectations should serve as a starting point for discussion between speaker and organizer. They are not a list of demands; they are a list of rea
var parser = document.createElement('a'); | |
parser.href = "http://example.com:3000/pathname/?search=test#hash"; | |
parser.protocol; // => "http:" | |
parser.hostname; // => "example.com" | |
parser.port; // => "3000" | |
parser.pathname; // => "/pathname/" | |
parser.search; // => "?search=test" | |
parser.hash; // => "#hash" | |
parser.host; // => "example.com:3000" |
/* See: http://0x10c.com/doc/dcpu-16.txt */ | |
function hex(n) { | |
return '0x' + n.toString(16); | |
} | |
function disassemble (code) { | |
var PC = 0; | |
var operand = function (bits) { |