Skip to content

Instantly share code, notes, and snippets.

// in startup.js:
var autoscaling = require('autoscaling');
var Metrics = require('beamly-node-metrics');
Metrics.bindTo(autoscaling.se4.metrics)
// everywhere else
var Metrics = require('beamly-node-metrics');
var taskAMetric = new Metrics.TimingMetric('taskA');
var taskBMetric = new Metrics.FailSequencer('taskB');
@benvan
benvan / slack-hack
Last active March 26, 2016 14:49
Adds an omni-box to slack. Allows you to nav to members/channels/groups. Invoke with CMD-K
// to "install" - right click anywhere slack, select "inspect element"
// click "console" in the box that pops up. Down the bottom there's a wide text box with a little blue arrow in it
// copy all of this code - paste it into that text box, press enter.
// good to go! You can close the inspector window
(function go(){
var isMac = window.navigator.platform.toLowerCase() == 'macintel';
var cmdKey = isMac ? 'cmd' : 'ctrl';
var width = 300;