This file contains hidden or 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://develobert.blogspot.com/2007/11/automated-lorem-ipsum-generator.html | |
*/ | |
LoremIpsum = { | |
fullstop: '.', /* Character(s) to add to the end of sentences */ | |
min_wps: 10, /* Minimum words per sentence */ | |
max_wps: 25, /* Maximum words per sentence */ | |
min_spp: 2, /* Minimum sentences per paragraph */ | |
max_spp: 8, /* Maximum sentences per paragraph */ |
This file contains hidden or 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
exports.Query = function(seed, params){ | |
if (typeof seed === 'string') | |
return exports.parseQuery(seed, params); | |
var q = new Query(); | |
if (seed && seed.name && seed.args) | |
q.name = seed.name, q.args = seed.args; | |
return q; | |
}; |
This file contains hidden or 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
middleware capable (not true so far :) of gzipping Buffers: | |
======================================= | |
function dir(x){var sys=require('sys');sys.debug(sys.inspect(x));} | |
exports.Compress = function(nextApp){ | |
return function(request){ | |
var encoding = 'gzip'; | |
if ((request.headers['accept-encoding']||'').indexOf(encoding) >= 0) { | |
//dir('gzipping'); | |
// so far only node.js provides compression module | |
var Gzip = require('compress').Gzip; |
This file contains hidden or 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
static void genericHgetallCommand(redisClient *c, int flags) { | |
robj *o, *lenobj, *obj; | |
unsigned long count = 0; | |
hashIterator *hi; | |
lenobj = createObject(REDIS_STRING,NULL); | |
addReply(c,lenobj); | |
decrRefCount(lenobj); | |
for (int i = 1; i < c->argc; ++i) { |
This file contains hidden or 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
Given: | |
===== | |
unconstrained querystring (Q), | |
zero or more chainable slices (S) to be applied on Q, | |
Range: items=A,B (R) | |
Task: | |
===== | |
determine: | |
"skip" (offset from start of Q), |
This file contains hidden or 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
APACHE SIMPLE REDIRECT: | |
====================== | |
Server Hostname: test.archonsoftware.com | |
Server Port: 80 | |
Document Path: /load-test/index.php | |
Document Length: 0 bytes | |
Concurrency Level: 1000 |
This file contains hidden or 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
/** | |
* This is a staring point for an application written on Pintura | |
*/ | |
function dir(){var sys=require('sys');for(var i=0,l=arguments.length;i<l;i++)sys.debug(sys.inspect(arguments[i]));} | |
function apply(o, c, defaults){ | |
if (defaults) { | |
apply(o, defaults); | |
} |
This file contains hidden or 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
# | |
# This is a staring point for an application written on Pintura | |
# | |
# useful helpers | |
h: require('./util') | |
Facet: require 'perstore/facet' | |
#Store: require('perstore/store/persistent-memory').PersistentMemory | |
Store: require('perstore/store/mongodb').MongoDB |
This file contains hidden or 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
publicFacets.root = { | |
hello: function(request, nextApp){ | |
return { | |
status: 200, | |
headers: {'Content-Type': 'text/plain'}, | |
body: ['Hello, world!\n'] | |
}; | |
}, | |
bar: function(){ | |
return 'BAR'; |
This file contains hidden or 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
lang:id [] | |
lang:ID {name,localName,charset} | |
lang:NAME ->lang:ID | |
lang:default ->lang:ID | |
country:id [] | |
country:ID {region:->region:ID,currency->currency:ID,name,iso,iso2,iso3} | |
country:NAME ->country:ID | |
country:ISO ->country:ID ??? |