Skip to content

Instantly share code, notes, and snippets.

View mikefrey's full-sized avatar

Mike Frey mikefrey

View GitHub Profile
@mikefrey
mikefrey / testcase.js
Last active December 15, 2015 12:19
New Relic node module swallows on uncaught exceptions. Tested on node.js v0.8.22.
var newrelic = require('newrelic')
var http = require('http')
function handleRequest(req, res) {
console.log('Handling request')
// Swallows the exception on the next line.
// Should throw a runtime error instead since DiesHere is undefined.
var x = DiesHere
res.end()
}
@mikefrey
mikefrey / superdeepmodel.js
Created July 9, 2012 15:16
Backbone.js SuperDeepModel
(function() {
function hOPExtend(obj) {
var args = Array.prototype.slice.call(arguments, 1)
for (var i = 0; i < args.length; i++) {
source = args[i]
for (var prop in source) if (source.hasOwnProperty(prop)) {
obj[prop] = source[prop];
}
}