Skip to content

Instantly share code, notes, and snippets.

View piscisaureus's full-sized avatar
🦕

Bert Belder piscisaureus

🦕
View GitHub Profile
From 6bf7d33d9c87670c9455ebfe9187351a4f97926e Mon Sep 17 00:00:00 2001
From: Bert Belder <bertbelder@gmail.com>
Date: Mon, 14 Feb 2011 16:11:46 +0100
Subject: [PATCH 1/1] Trycatch in emit
---
lib/events.js | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/lib/events.js b/lib/events.js
From 66d5f3ef44faa468127d35da8c9f254bb179d154 Mon Sep 17 00:00:00 2001
From: Bert Belder <bertbelder@gmail.com>
Date: Tue, 15 Feb 2011 20:48:05 +0100
Subject: [PATCH 1/1] Improve V8 support for Cygwin
Should re-enable crankshaft; can build w/ snapshot again.
---
deps/v8/SConstruct | 7 +-
deps/v8/src/SConscript | 3 +
deps/v8/src/platform-cygwin.cc | 287 ++++++++++++++++++++--------------------
@piscisaureus
piscisaureus / bug.js
Created March 18, 2011 08:45
node.js bug
var FILENAME = "/some/pretty/big/file",
BSIZE = 1024 * 1024;
var fs = require('fs');
var foo = [];
fs.stat(FILENAME, function(err, stats) {
if (err) throw err;
var size = stats.size;
if (size < BSIZE * 50) {
int simple();
int ping_pong_server();
int ping_pong_client();
TEST_LIST_START
TEST_ENTRY (simple)
TEST_ENTRY2 (pingpong, ping_pong_server)
TEST_ENTRY2 (pingpong, ping_pong_client)
#ifndef OL_H
#define OL_H
#include <stddef.h> /* size_t */
typedef int ol_err; /* FIXME */
typedef struct ol_req_s ol_req;
typedef struct ol_handle_s ol_handle;
#include "test.h"
#include "../oio.h"
#include <stdio.h>
#define BUFSIZE 4096
#define CONNS 10000
#define ACTIVE_CONNECTS 500
int connections = 0;
@piscisaureus
piscisaureus / bench.js
Created April 10, 2011 00:24
bench.js
var PORT = 7890;
var BSIZE = 32767;
var CONNS = 500;
var net = require('net');
var start = +(new Date), bytes_written = 0, bytes_read = 0, conns = 0;
var server = net.createServer();
server.on('bogus', function(){}); // setMaxListeners error
server.setMaxListeners(0);
# Copyright Joyent, Inc. and other Node contributors. All rights reserved.
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to
# deal in the Software without restriction, including without limitation the
# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
# sell copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in
@piscisaureus
piscisaureus / wu.h
Created May 12, 2011 02:07 — forked from ry/wu.h
/* Copyright Joyent, Inc. and other Node contributors. All rights reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to
* deal in the Software without restriction, including without limitation the
* rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
* sell copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
@piscisaureus
piscisaureus / awesome.txt
Created May 18, 2011 02:22
Stuff I want to use
* Waterbear (https://github.com/dethe/waterbear)
Visual programming language toolkit written in javascript.
Need it for my simulation tool project. Also really a novelty in js-land.
* Forge (https://github.com/digitalbazaar/forge)
A javascript implementation of TLS - pretty rad. If this works well I'll never
touch OpenSSL again. But it needs to be put to the test first.
* TermKit (https://github.com/unconed/TermKit)
Finally some sensible innovation in terminal-land. Terminals are incredibly