Skip to content

Instantly share code, notes, and snippets.

View diversario's full-sized avatar
🏳️‍🌈

Ilya Shaisultanov diversario

🏳️‍🌈
View GitHub Profile
@diversario
diversario / app.js
Created September 28, 2011 14:19
connect-formaline example 2
#!/usr/bin/env node
var express = require('express'),
app = express.createServer(), // actual application
UPLOAD_LIMIT = 20 * 1024 * 1024,
form = require('./connect-formaline'),
formaline_config = ({"uploadRootDir": '/tmp/', "emitProgress": true, "requestTimeOut": 600000, "resumeRequestOnError": false, "maxFileSize": UPLOAD_LIMIT, "checkContentLength": true, "holdFilesExtensions": true, "removeIncompleteFiles": true, "logging": 'debug:on,1:on,2:on,3:off,4:off,console:on,file:off,record:off'});
app
.use(express.cookieParser())
@diversario
diversario / app.js
Created September 27, 2011 17:56
connect-formaline example
var connect = require('connect'),
UPLOAD_LIMIT = 1000000,
flconf = {"uploadRootDir": '/tmp/', "requestTimeOut": 600000, "resumeRequestOnError": false, "maxFileSize": UPLOAD_LIMIT, "checkContentLength": true, "holdFilesExtensions": true, "removeIncompleteFiles": true, "logging": 'debug:off,1:on,2:off,3:off,4:off,console:on,file:off,record:off'},
formaline = require('connect-formaline');
connect(
connect.cookieParser(),
connect.session({ secret: 'keyboard cat' }),
formaline(flconf),
function(req, res){
➜ lcthw make all
cc -Wall -g ex1.c -o ex1
cc -Wall -g ex3.c -o ex3
cc -Wall -g ex4.c -o ex4
ex4.c:9:17: warning: more '%' conversions than data arguments [-Wformat]
printf("I am %d years old.\n");
~^
ex4.c:10:17: warning: more '%' conversions than data arguments [-Wformat]
printf("I am %d inches tall.\n");
~^
@diversario
diversario / app.js
Created June 14, 2014 21:26
cm replset test
var replicaSet = {
"collection" : "express_sessions",
"stringify": false,
"db": {
"name" : "sessions",
"replicaSetOptions": {
rs_name: 'default',
w: 2
},
"servers" : [