Requires a patched powerline font (see https://gist.github.com/baopham/1838072 or https://github.com/Lokaltog/powerline-fonts).
Screenshot using the smyck theme.
const BUCKETS = 120 // multiple of 3 for correct split on 3-variant experiments | |
const seed = '8fc40cab' // random seed, change to reallocate users | |
function hashFNV(s, h = 0x811c9dc5) { | |
for (let i = 0; i < s.length; i++) { | |
h ^= s.charCodeAt(i); | |
h += (h << 1) + (h << 4) + (h << 7) + (h << 8) + (h << 24); | |
} | |
return h >>> 0; | |
} |
function sequentialTest(control, treatment, sample) { | |
if (treatment - control >= 2.25 * Math.sqrt(sample)) { | |
return 'treatment wins' | |
} else if (control - treatment >= 2.25 * Math.sqrt(sample)) { | |
return 'control wins' | |
} else if (treatment + control >= sample) { | |
return 'stop test. no winner' | |
} | |
return 'continue testing' |
{ | |
AC: [ -8.77, -70.55] | |
, AL: [ -9.71, -35.73] | |
, AM: [ -3.07, -61.66] | |
, AP: [ 1.41, -51.77] | |
, BA: [-12.96, -38.51] | |
, CE: [ -3.71, -38.54] | |
, DF: [-15.83, -47.86] | |
, ES: [-19.19, -40.34] | |
, GO: [-16.64, -49.31] |
// https://github.com/lodash/lodash/blob/4.17.15/lodash.js#L9393C5-L9399C8 | |
var groupBy = createAggregator(function(result, value, key) { | |
if (hasOwnProperty.call(result, key)) { | |
result[key].push(value); | |
} else { | |
baseAssignValue(result, key, [value]); | |
} | |
}); | |
// https://github.com/lodash/lodash/blob/4.17.15/lodash.js#L4818C5-L4825C6 |
git ls-files | grep $1 | sed s%`git rev-parse --show-prefix`%% |
brew 'coreutils' | |
brew 'tmux' | |
brew 'jq' | |
brew 'htop' | |
brew 'wget' | |
brew 'tree' | |
brew 'aria2' | |
brew 'xcbeautify' | |
brew 'git' |
Requires a patched powerline font (see https://gist.github.com/baopham/1838072 or https://github.com/Lokaltog/powerline-fonts).
Screenshot using the smyck theme.
/* | |
Easy way to "transfer" any native objects with the Drag & Drop API | |
@ricardobeat | |
$('.draggable').on('dragstart', function(e){ | |
App.dragData.set(e, { | |
type: 'blablabla' | |
, items: [1,2,3] | |
}) |
# First add a rule for all local traffic to port 80 to go into pipe 1 | |
# 100 is the rule number which will be used for referencing the rule later | |
sudo ipfw add 100 pipe 1 ip from 127.0.0.1 to 127.0.0.1 dst-port http | |
# To display the rule use | |
# sudo ipfw show 100 | |
# configure the settings of the pipe as you please | |
# 50kbit/s bandwidth | |
sudo ipfw pipe 1 config bw 50Kbit |