Skip to content

Instantly share code, notes, and snippets.

View Zambonilli's full-sized avatar

Mike Lohmeier Zambonilli

View GitHub Profile
'use strict'
const time = require('time');
const moment = require('moment');
const tz = require('moment-timezone');
const async = require('async');
const bunyan = require('bunyan');
var log = bunyan.createLogger({name: "time error"});
var fs = require('fs');
var timezones = moment.tz.names();
@Zambonilli
Zambonilli / joins.js
Created May 30, 2016 21:20
object join performance in node.js
'use strict'
var Measured = require('measured');
var Random = require('random-js');
// set the number of elements in the arrays
const elementCount = 1; // the array.find and loop joins will not complete quickly on higher numbers
const sampleCount = 100;
console.log('!!! ' + elementCount + ' elements with ' + sampleCount +' samples !!!');
let r = new Random();
@Zambonilli
Zambonilli / gist:9610278
Created March 17, 2014 23:11
IE7 & IE8 redraw escape
ft.redraw = function () {
if ($('html').is('.lt-ie9')){
ft.raise(evt.redrawn);
return;
}
//add the toggler to each row
ft.addRowToggle();
@Zambonilli
Zambonilli / gist:9608773
Created March 17, 2014 21:29
redraw perf w/short circuits
ft.redraw = function () {
var start = new Date();
//add the toggler to each row
ft.addRowToggle();
//bind the toggle selector click events
ft.bindToggleSelectors();
//set any cell classes defined for the columns
@Zambonilli
Zambonilli / gist:6262224
Created August 18, 2013 15:31
Jenkins build events integrated into Show Slow
URL_PREFIX=http://www.example.com/
RESOURCE_URL=http://www.example.com/
SHOW_SLOW_URL=http://192.168.154.130/showslow_1.2/beacon/events/
wget "$SHOW_SLOW_URL?type=JenkinsJob&url_prefix=$URL_PREFIX&title=${JOB_NAME}_${BUILD_NUMBER}&resource_url=$RESOURCE_URL&start=$(date +'%F %T')&end=$(date +'%F %T')"