Skip to content

Instantly share code, notes, and snippets.

View bengl's full-sized avatar
💭
Set your status

Bryan English bengl

💭
Set your status
View GitHub Profile
#!/usr/bin/env bash
echo "This works!"
  • Create a GitHub account (if you don't already have one)
  • On the command line, in your home directory or a directory you have for projects, run: git clone https://github.com/nodejs/node.git
  • When that is done: cd node
  • Go to https://github.com/nodejs/node and use the "Fork" button to fork your own repo of node
  • On the page for your fork, use the "Clone or download" button and copy the URL for cloning to your clipboard, then run: git remote add mine <paste that URL here!>
  • Follow the instructions at https://github.com/nodejs/node/blob/master/BUILDING.md to build Node.js.
  • Email help@nodetodo.org or tweet at @NodeTodo to get a good first contribution to work on or to get help with any of the above steps.

Keybase proof

I hereby claim:

  • I am bengl on github.
  • I am bengl (https://keybase.io/bengl) on keybase.
  • I have a public key whose fingerprint is 37D2 6669 8039 4F22 43B7 FF45 145D 4E0D 7970 799A

To claim this, I am signing this object:

@bengl
bengl / exportedFunction.js
Created August 10, 2016 18:49
tern annotations?
// tern: const Thing = require('./thing.js')
/**
* @param {Thing} thing
*/
module.exports = function (thing) {
thing.foo();
}
@bengl
bengl / hamgear.md
Last active June 9, 2016 06:00
ham / amateur radio gear list for nodeconf
@bengl
bengl / README.md
Last active December 29, 2015 11:19
Can't use repl inside domain. Or can I? I'm not sure.

It turns out that the node REPL doesn't seem to behave as expected inside a domain. (I'm using node v0.10.22)

Try running repltest.js, which is narrowed down from a much larger REPL-thing I'm working on. You'll get your REPL, but there is some weirdness. If you give it an empty line (i.e. just press Enter/Return), you'll get a syntax error, captured by the domain and ouput via line 6:

> 
SyntaxError: Unexpected token )
    at REPLServer.self.eval (repl.js:112:21)
    at Interface.<anonymous> (repl.js:239:12)
    at Interface.EventEmitter.emit (events.js:95:17)
@bengl
bengl / be.txt
Created November 6, 2013 17:03
I swear it's not the logo for Bugatti.
#################################
###################################
####################################
##### #### ####
##### #### ####
#### ####
#### ####
#### #### ####
##### #### ####
@bengl
bengl / stuff.js
Created September 27, 2013 16:25
var app = express();
app.get('/', function(req, res){
try{
if (someBoolean) {
res.send("all good!")
} else {
throw Error("shit's fucked, yo");
}
} catch (e){
res.send(e.toString(), 500);
@bengl
bengl / test.js
Last active December 10, 2015 23:08
domains don't really catch exceptions?
// node >= 0.8.*
var domain = require('domain');
process.on('uncaughtException', function(error){
console.error('UNCAUGHT!', error);
});
var d = domain.create();
d.on('error', function(error) {