I hereby claim:
- I am zeusdeux on github.
- I am zeusdeux (https://keybase.io/zeusdeux) on keybase.
- I have a public key whose fingerprint is 1A74 2ABF 90F4 3181 D979 10E0 17E2 4044 6F8F 5CF5
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
# SSL self signed localhost for rails start to finish, no red warnings. | |
# 1) Create your private key (any password will do, we remove it below) | |
$ openssl genrsa -des3 -out server.orig.key 2048 | |
# 2) Remove the password | |
$ openssl rsa -in server.orig.key -out server.key |
#! /usr/bin/env node --harmony_arrow_functions | |
// chmod a+x this file | |
// run this as: ./findTopN <path to input file> <value for n> | |
'use strict'; | |
const path = require('path'); | |
const findTopN = require('./topN'); | |
const args = process.argv.slice(2); |
/* | |
# | |
# Example final output: | |
# | |
# 1000 main | |
# 1000 workLoop | |
# 900 read | |
# 900 __sys_read | |
# 100 parse | |
# 100 strcmp |
// use binary search to return index where given element needs to be inserted in the input array (must be sorted) | |
function binarySearchForInsertionIndex(arr, el, index = 0) { | |
const mid = ~~(arr.length / 2) | |
if (!arr.length || arr[mid] === el) return index | |
if (el < arr[mid]) return binarySearchForInsertionIndex(arr.slice(0, mid), el, mid + index - 1) | |
if (el > arr[mid]) return binarySearchForInsertionIndex(arr.slice(mid + 1), el, mid + index + 1) | |
} |
/* Simple flexbox based grid system */ | |
$columns: 12; | |
@mixin layout-cols($device) { | |
@for $i from 1 through 12 { | |
.l-#{$device}-col-#{$i} { | |
flex: 0 0 $i / $columns * 100%; | |
} | |
} |
/************************************************************** | |
Author: Mudit Ameta | |
Date : 9Aug12 | |
Link : http://experiments.muditameta.com/googleHurdleHack/ | |
***************************************************************/ | |
(function () { | |
var game = document.getElementById('hplogo'); | |
var leftDown = document.createEvent("Event"); | |
leftDown.initEvent("keydown", true, true); | |
leftDown.keyCode = 37; |
{ | |
// The block has begun, we're in a new block scope. The TDZ for the "a" binding has begun | |
var f = function() { | |
// 2. Because f() is evaluated before `a` is actually declared, | |
// an exception will be thrown indicating to the author that | |
// `a` is not yet defined. | |
console.log(a); | |
}; | |
function mapValues(obj, fn) { | |
return Object.keys(obj).reduce((result, key) => { | |
result[key] = fn(obj[key], key); | |
return result; | |
}, {}); | |
} | |
function pick(obj, fn) { | |
return Object.keys(obj).reduce((result, key) => { | |
if (fn(obj[key])) { |