Skip to content

Instantly share code, notes, and snippets.

node.js:201
throw e; // process.nextTick error, or 'error' event on first tick
^
Error: write EPIPE
at errnoException (net.js:632:11)
at Object.afterWrite [as oncomplete] (net.js:470:18)
@bpaf
bpaf / app.js
Created November 8, 2011 11:11
require bug? (globals)
require('./boop')
console.log(boop)
@bpaf
bpaf / gist:1307996
Created October 23, 2011 22:36
node 0.4.12 build error
$ ./configure
Traceback (most recent call last):
File "/home/edi/src/node/tools/waf-light", line 157, in <module>
import Scripting
File "/home/edi/src/node/tools/wafadmin/Scripting.py", line 146
except Utils.WafError, e:
^
SyntaxError: invalid syntax
@bpaf
bpaf / runModalSession
Created February 18, 2011 18:39
doesn't check for visibility before centering
- (void)runModalSession:(CPModalSession)aModalSession
{
aModalSession._previous = _currentSession;
_currentSession = aModalSession;
var theWindow = aModalSession._window;
[theWindow center];
[theWindow makeKeyWindow];
[theWindow orderFront:self];
@bpaf
bpaf / weird
Created February 18, 2011 11:26
class method
var theWindow = [[CPWindow alloc] initWithContentRect:CGRectMakeZero() styleMask:CPBorderlessBridgeWindowMask],
contentView = [theWindow contentView];
var bounds = [contentView bounds],
width = CPRectGetWidth(bounds),
height = CPRectGetHeight(bounds);
var buttonBar = [[CPButtonBar alloc] initWithFrame:CGRectMake(0, height - 25, width, 25)];
[buttonBar setAutoresizingMask:CPViewWidthSizable];