Skip to content

Instantly share code, notes, and snippets.

View pagameba's full-sized avatar

Paul Spencer pagameba

View GitHub Profile

Typography

Headings

Headings from h1 through h6 are constructed with a # for each level:

# h1 Heading
## h2 Heading
### h3 Heading
static int EIO_AfterDrawMap(eio_req *req) {
HandleScope scope;
drawmap_request *baton =(drawmap_request *)req->data;
ev_unref(EV_DEFAULT_UC);
baton->map->Unref();
Local<Value> argv[1];
Buffer * buffer = Buffer::New(baton->data, baton->size, FreeImageBuffer, NULL);
argv[0] = buffer;
static int EIO_AfterDrawMap(eio_req *req) {
HandleScope scope;
drawmap_request *drawmap_req =(drawmap_request *)req->data;
ev_unref(EV_DEFAULT_UC);
drawmap_req->map->Unref();
Local<Value> argv[2];
argv[0] = Local<Value>::New(Null());
if (drawmap_req->data != NULL) {
Buffer * buffer = Buffer::New(drawmap_req->data, drawmap_req->size, FreeImageBuffer, NULL);
if (request.method == 'POST') {
var data = '';
request.on('data', function(d) { data += d; });
request.on('end', function() { console.log(data); });
}
import Options
import sys
from os import unlink, symlink, popen
from os.path import exists
srcdir = "."
blddir = "build"
VERSION = "0.0.1"
def set_options(opt):
6 Dec 08:19:27 - Your node instance does not have root privileges. This means that the flash XML policy file will be served inline instead of on port 843. This will slow connection time slightly
6 Dec 08:19:27 - socket.io ready - accepting connections
6 Dec 08:19:56 - Initializing client with transport "websocket"
6 Dec 08:19:56 - Client 15454286127351224 connected
client connection!
client discconect
6 Dec 08:19:56 - Client 15454286127351224 disconnected
var Seq = require('node-seq');
var configFile = require('path').join(__dirname, 'config.json');
Seq()
.seq(checkPath),
.seq(parseConfig),
.seq(connectToDb),
.seq(startServer),
.catch(function(err) {
console.error(err.stack ? err.stack : err);
config.json:
{
"database": {
"connection": "pg://postgres:postgres@127.0.0.1:5432/test"
},
"web": {
"port": 8000
}
}
@pagameba
pagameba / config.json
Created January 27, 2011 19:00
testcase for long-stack-traces
{
"version": "v0.3.1",
"web": {
"port": 8081
},
"database": {
"connection": "pg://postgres:postgres@127.0.0.1:5432/test"
}
}
/*jslint node:true, sloppy: true, indent: 2, nomen: true, white: true */
var util = require('util')
, response = require('cradle/lib/cradle/response')
, mockJSON = {
total_rows: 1,
offset: 0,
rows: [{
id: 'some-id',
key: 'some-key',