Skip to content

Instantly share code, notes, and snippets.

View samshull's full-sized avatar
🎯
Focusing

Sam Shull samshull

🎯
Focusing
View GitHub Profile
@samshull
samshull / stack-trace.js
Created July 18, 2011 02:13
Cross Browser javascript stack trace
function printStackTrace() {
var callstack = [];
var isCallstackPopulated = false;
try {
i.dont.exist+=0; //doesn't exist- that's the point
} catch(e) {
if (e.stack) { //Firefox
var lines = e.stack.split('\n');
for (var i=0, len=lines.length; i<len; i++) {
if (lines[i].match(/^\s*[A-Za-z0-9\-_\$]+\(/)) {
@samshull
samshull / proxy_memleak.js
Created June 24, 2011 18:37 — forked from richardms/proxy_memleak.js
Possible memory leak in node-proxy
// Run with:
// node --trace-gc proxy_memleak.js
var Proxy = require("/Users/brickysam26/Projects/node-proxy/lib/node-proxy"),
// fs = require('fs'),
util = require("util") ;
var count = 100000 ;
function encode_users(data) {
var string = '';
$.each(data, function(index, info) {
string += '&users[' + index + '][onlineid]=' + encodeURIComponent(info.onlineid);
string += '&users[' + index + '][comment]=' + encodeURIComponent(info.comment);
});
return string;
}
$.ajax({
<?php
$_Retreived = array(
"website1.com" => array(
array('60" BRAVIA LX900 Series 3D HDTV', 'website1.com', 5299.99),
array('52" BRAVIA LX900 Series 3D HDTV', 'website1.com', 4499.99),
array('46" BRAVIA LX900 Series 3D HDTV', 'website1.com', 3699.99),
array('40" BRAVIA LX900 Series 3D HDTV', 'website1.com', 2999.99)
),
"website2.com" => array(
array('Sony 3D 60" LX900 HDTV BRAVIA', 'website2.com', 5400.99),
From ba387e2b80e4ea02652d66c2d0e689d172907719 Mon Sep 17 00:00:00 2001
From: Samuel Shull <[email protected]>
Date: Wed, 4 Aug 2010 01:25:17 -0400
Subject: [PATCH] Add node_version.h to install
---
wscript | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/wscript b/wscript
From b26787bc203f0318161d014baea93894ca881244 Mon Sep 17 00:00:00 2001
From: Sam Shull <[email protected]>
Date: Tue, 20 Jul 2010 14:09:09 -0400
Subject: [PATCH] Add parenthesis to NODE_VERSION_AT_LEAST
---
src/node_version.h | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/src/node_version.h b/src/node_version.h