Skip to content

Instantly share code, notes, and snippets.

View norganna's full-sized avatar

Ken Allan norganna

View GitHub Profile
@norganna
norganna / gist:3671724
Created September 8, 2012 04:07
Profile of node
ticks parent name
6621823 84.5% /lib/x86_64-linux-gnu/libc-2.15.so
1163611 14.8% /opt/node-0.6.21/bin/node
371121 31.9% Function: ~cb /opt/tf2whx/bundle/server/node_modules/fibers/future.js:88
371121 100.0% Function: Future.return /opt/tf2whx/bundle/server/node_modules/fibers/future.js:152
368973 99.4% Function: ~<anonymous> app/packages/mongo-livedata/mongo_driver.js:346
368973 100.0% Function: ~Cursor.toArray /opt/tf2whx/bundle/server/node_modules/mongodb/lib/mongodb/cursor.js:123
368973 100.0% Function: ~Cursor.each /opt/tf2whx/bundle/server/node_modules/mongodb/lib/mongodb/cursor.js:162
118130 10.2% LazyCompile: *_Mongo.LiveResultsSet._unthrottled_markDirty app/packages/mongo-livedata/mongo_driver.js:458
<html>
<head>
<script>
var id = Math.floor(Math.random() * 100000000);
timer = setInterval(function() {
console.log("Hi, I'm " + id);
}, 1000);
console.log("Starting " + id + " at " + (new Date));
</script>
</head>
@norganna
norganna / time.js
Created September 18, 2011 11:29
time offset
new Date((((~~(((+(new Date()) / 3600000) + 10) / 24)) * 24) - 10) * 3600000)
@norganna
norganna / spamkick.lua
Created September 14, 2011 06:22
Spamkick
-- Copyright 2011, Norganna's AddOns Pty Ltd. All rights reserved.
-- Made by Worfox, modified by kevinsweijen.
local lib = register("spamkick")
local spamdata = {}
lib:hook("loggedin", nil, function (perform)
local player = lib.detail.username
spamdata['t' .. player] = os.clock()