Skip to content

Instantly share code, notes, and snippets.

{
"maxConcurrentManipulations": 2,
"maxConcurrentProxyStreams": 2,
"port": 3000,
"buckets": {
"default": {
"originalsS3Bucket": "com-athlete-ezimg",
"manipulationsS3Bucket": "com-athlete-ezimg",
"allowWrite": true,
"originalKeyFormat": "{bucket}/originals/{imgId}",
@dmcquay
dmcquay / authentication.py
Created May 9, 2012 18:37
Tastypie MultiAuthentication configurable to require all to pass or just one to pass
from tastypie.http import HttpUnauthorized
class MultiAuthentication(object):
"""
An authentication backend that tries a number of backends in order. You may specify using the and_ kwarg
whether or not all backends must authenticate the user or if authentication should stop after the first success.
It defaults to False, meaning that only one authentication backend must return True.
For example, let's say you have three classes:
MyAuth1
@dmcquay
dmcquay / npm-view
Created March 16, 2011 01:56
programatically execute npm view command
var npm = require('npm'),
stream = require('stream');
cmdOutStream = new stream.WriteableStream();
cmdOutStream.on('data', function(data) {
console.log('found some data: ' + data);
});
cmdOutStream.on('end', function() {
console.log('found end');
});