Skip to content

Instantly share code, notes, and snippets.

View indutny's full-sized avatar
🐋
Thanks for the fish!

Fedor Indutny indutny

🐋
Thanks for the fish!
View GitHub Profile
@indutny
indutny / benchmarks
Last active August 29, 2015 14:00
bn.js benchmarks
Benchmarking: create-10
bn.js#create-10 x 98,920 ops/sec ±0.69% (99 runs sampled)
bignum#create-10 x 282,502 ops/sec ±3.52% (86 runs sampled)
browserify-bignum#create-10 x 153,830 ops/sec ±1.03% (94 runs sampled)
------------------------
Fastest is bignum#create-10
========================
Benchmarking: create-hex
bn.js#create-hex x 604,436 ops/sec ±0.73% (97 runs sampled)
bignum#create-hex x 270,627 ops/sec ±3.67% (84 runs sampled)
diff --git a/lib/child_process.js b/lib/child_process.js
index c8e9e37..390f435 100644
--- a/lib/child_process.js
+++ b/lib/child_process.js
@@ -140,6 +140,11 @@ var handleConversion = {
handle.onread = function() {};
socket._handle = null;
+ // Kill happy eyeball
+ if (socket._eyeball)

Keybase proof

I hereby claim:

  • I am indutny on github.
  • I am indutny (https://keybase.io/indutny) on keybase.
  • I have a public key whose fingerprint is 0C07 263A A07C D36C D122 C09C FB0E 1095 B179 7999

To claim this, I am signing this object:

CFLAGS ?=
CFLAGS += -g -Wall
all: main
%.o: %.c
$(CC) $(CFLAGS) -c $< -o $@
main: main.o
$(CC) $(CFLAGS) $< -o $@
@indutny
indutny / jit.js
Last active December 27, 2015 02:49
var jit = require('jit.js'),
esprima = require('esprima'),
assert = require('assert');
var ast = esprima.parse(process.argv[2]);
// Compile
var fn = jit.compile(function() {
// This will generate default entry boilerplate
this.Proc(functon() {
commit b8e3d3701ac07d9304aee7cde1f0ebb5e17a8db8
Author: Fedor Indutny <fedor.indutny@gmail.com>
Date: Mon Oct 28 20:43:03 2013 +0400
darwin: avoid calling pGetCurrentProcess
Use some black-magic from Apple to change process name without getting
a "Not responding" tag from Activity Manager.
fix #966
<?xml version="1.0"?>
<!DOCTYPE service_bundle SYSTEM '/usr/share/lib/xml/dtd/service_bundle.dtd.1'>
<service_bundle type="manifest" name="minecraft">
<service name="minecraft" type="service" version="1">
<create_default_instance enabled="true"/>
<single_instance/>
<dependency name="milestone" grouping="require_all" restart_on="none" type="service">
<service_fmri value="svc:/milestone/multi-user"/>
commit 461f784d01a071172ab9a993313db3c00b3a6b5c
Author: Fedor Indutny <fedor.indutny@gmail.com>
Date: Wed Aug 14 17:14:35 2013 +0400
fsevents: FSEvents is most likely not thread-safe
Perform all operation with FSEventStream in the same thread, where it'll
be used.
Conflicts:
commit bda00b93bed86610319f73cc6e857bd6ae05bff7
Author: Fedor Indutny <fedor.indutny@gmail.com>
Date: Thu Jun 20 23:32:26 2013 +0200
couch_users_db: introduce public_users option
When `couchdb.public_users` is set to `true`, getting `/_users/id` will
return user document with sensitive information stripped.
diff --git a/etc/couchdb/default.ini.tpl.in b/etc/couchdb/default.ini.tpl.in
@indutny
indutny / https.js
Last active December 18, 2015 07:00
var cluster = require('cluster');
var os = require('os');
var fs = require('fs');
var https = require('https');
if (cluster.isMaster) {
for (var i = 0; i < os.cpus().length; i++) {
cluster.fork();
}
return;