Skip to content

Instantly share code, notes, and snippets.

Matt Ranney mranney

Block or report user

Report or block mranney

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View gist:fcdb8938872e340e256a79079a084d74
GNU grep compiled on my MacBook Pro as "ggrep":
mranney-C02N31E1FD57:~$ time ggrep -E '^a(b|c)?' /usr/share/dict/words > /dev/null
real 0m0.020s
user 0m0.016s
sys 0m0.003s
mranney-C02N31E1FD57:~$ time grep -E '^a(b|c)?' /usr/share/dict/words > /dev/null
real 0m0.106s
View redis.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View gist:3893d4488de4d4617dfc
mjr-uber-mbp:~$ npm install -g http_trace
> socketwatcher@0.2.1 install /usr/local/lib/node_modules/http_trace/node_modules/pcap/node_modules/socketwatcher
> node-gyp rebuild
CXX(target) Release/
SOLINK_MODULE(target) Release/socketwatcher.node
SOLINK_MODULE(target) Release/socketwatcher.node: Finished
> pcap@2.0.1 install /usr/local/lib/node_modules/http_trace/node_modules/pcap
View new_test.js
function SomeClass() {
this.version = null;
this.header_length = null;
this.header_bytes = null;
this.diffserv = null;
this.total_length = null;
this.identification = null;
this.flags = {};
this.fragment_offset = null;
this.ttl = null;
View gist:9266110
root@sjc1-srv-03:/usr/ports/sysutils/lsof # make
===> Building for lsof-4.88.e_1,8
--- version.h ---
--- lib/liblsof.a ---
--- dnode2.o ---
--- version.h ---
Constructing version.h
--- lib/liblsof.a ---
--- dnode2.o ---
View gist:8534763
Lately, I've been telling my kids about "yes, and..." and how that's funny.
Tonight, after a long and very drawn-out bedtime procedure, I laid down the law.
"OK guys, time to go to sleep."
"But daddy, we didn't get a bedtime drink."
I'm getting really frustrated at this point.
"Jesus, really?! It's 9:00. Come on.", I blurt out, more profane than I was intending.
View gist:7965397
View gist:7884843
diff --git a/http_server/http_server.js b/http_server/http_server.js
index 505efad..368083c 100644
--- a/http_server/http_server.js
+++ b/http_server/http_server.js
@@ -442,7 +442,7 @@ function HTTP_Server(options) {
if (options.proxy_proto) {
this.server_type = "proxy";
// this.server = http.Server(new_client_wrapper);
- this.server = spdy.createServer(http.Server, { plain: true }, new_client_wrapper);
+ this.server = spdy.createServer(http.Server, { plain: true, timeout: 12 * 60 * 1000 }, new_client_wrapper);
View gist:7882448
mjr@mjr-01:~$ npm install sse4_crc32
npm http GET
npm http 200
npm http GET
npm http 200
npm http GET
npm http GET
npm http 304
npm http 200
npm http GET
View gist:7834026
dtrace -n 'syscall::writev:entry /execname == "node" && arg2 > 16/ { printf("iovcnt: %d", arg2); }' -n 'syscall::writev:return /execname == "node" && arg1 == -1 && errno == 22/ { printf("%s %s %d\\n", curpsinfo->pr_psargs, probefunc, errno); jstack(100, 8000); }'
1 10260 writev:entry iovcnt: 57
1 10261 writev:return node --nouse-idle-notification /voxer/server/node_router/node_router.js /voxer/ writev 22\n`__writev+0x15
<< internal code >>
You can’t perform that action at this time.