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
/** | |
* Wrapper for built-in http.js to emulate the browser XMLHttpRequest object. | |
* | |
* This can be used with JS designed for browsers to improve reuse of code and | |
* allow the use of existing libraries. | |
* | |
* Usage: include("XMLHttpRequest.js") and use XMLHttpRequest per W3C specs. | |
* | |
* @todo SSL Support | |
* @author Dan DeFelippi <dan@driverdan.com> |
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
from django.template import Library | |
register = Library() | |
def chunk(l, n): | |
return (l[i:i+n] for i in range(0, len(l), 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
{ | |
"keyboard": "iris/rev2", | |
"keymap": "eam", | |
"layout": "LAYOUT", | |
"layers": [ | |
[ | |
"KC_ESC", | |
"KC_LGUI", | |
"KC_LCTL", | |
"KC_LSFT", |
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
extern crate failure; | |
#[macro_use] | |
extern crate failure_derive; | |
use std::process; | |
use std::io::{self, Read}; | |
use failure::Error; | |
#[derive(Debug, Fail)] |
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
import logging | |
import riak | |
log = logging.getLogger(__name__) | |
class RiakCounter(object): | |
def __init__(self, bucket, key): | |
self.bucket = bucket | |
self.bucket.set_allow_multiples(True) | |
self.key = key |
I hereby claim:
- I am ericmoritz on github.
- I am ericmoritz (https://keybase.io/ericmoritz) on keybase.
- I have a public key whose fingerprint is F908 1749 3371 74DB 3811 1AA8 D500 8CCC E761 725F
To claim this, I am signing this object:
I hereby claim:
- I am ericmoritz on github.
- I am ericmoritz (https://keybase.io/ericmoritz) on keybase.
- I have a public key ASBTGiXyjPdJuyILRRS9xtR-TiE7BYf0IhotWf_h5LvimAo
To claim this, I am signing this object:
I hereby claim:
- I am ericmoritz on github.
- I am ericmoritz (https://keybase.io/ericmoritz) on keybase.
- I have a public key ASBTGiXyjPdJuyILRRS9xtR-TiE7BYf0IhotWf_h5LvimAo
To claim this, I am signing this 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
var redis = require("redis"); | |
function randrange(stop) { | |
return Math.floor(Math.random() * stop * 1000 % stop) | |
} | |
function Cluster(hosts) { | |
var that = this; | |
var hosts = hosts || []; | |
this.clients = {}; |
NewerOlder