Skip to content

Instantly share code, notes, and snippets.

Jonathan Barber jbarber

View GitHub Profile
View GoogleChrome.plist
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "">
<plist version="1.0">
jbarber / agent.js
Created Aug 28, 2012 — forked from atimb/agent.js
Real keep-alive HTTP agent for node.js
View agent.js
* Real keep-alive HTTP agent
* The http module's agent implementation only keeps the underlying TCP
* connection alive, if there are pending requests towards that endpoint in the agent
* queue. (Not bug, but "feature":
* You might be in a situation, where you send requests one-by-one, so closing
* the connection every time simply does not make sense, since you know you will
* send the next one in a matter of milliseconds.
touch /tmp/stdout
touch /tmp/stderr
gdb -p $!
# In GDB
p dup2(open("/tmp/stdout", 1), 1)
p dup2(open("/tmp/stderr", 1), 2)
You can’t perform that action at this time.