This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const listeners = (function listAllEventListeners() { | |
let elements = []; | |
const allElements = document.querySelectorAll('*'); | |
const types = []; | |
for (let ev in window) { | |
if (/^on/.test(ev)) types[types.length] = ev; | |
} | |
for (let i = 0; i < allElements.length; i++) { | |
const currentElement = allElements[i]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/////////////////////////////////////////////////////////// | |
// Forge React Boiler Webpack production config | |
// Repo at: | |
// https://github.com/Autodesk-Forge/forge-react-boiler.nodejs | |
// | |
// by Philippe Leefsma, 2016 | |
// https://twitter.com/F3lipek | |
// | |
/////////////////////////////////////////////////////////// | |
const InlineManifestWebpackPlugin = require('inline-manifest-webpack-plugin') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Returns the value at a given percentile in a sorted numeric array. | |
// "Linear interpolation between closest ranks" method | |
function percentile(arr, p) { | |
if (arr.length === 0) return 0; | |
if (typeof p !== 'number') throw new TypeError('p must be a number'); | |
if (p <= 0) return arr[0]; | |
if (p >= 1) return arr[arr.length - 1]; | |
var index = (arr.length - 1) * p, | |
lower = Math.floor(index), |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var stdev = function(arr) { | |
var n = arr.length; | |
var sum = 0; | |
arr.map(function(data) { | |
sum+=data; | |
}); | |
var mean = sum / n; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
rm -rf "${HOME}/Library/Caches/CocoaPods" | |
rm -rf "`pwd`/Pods/" | |
pod update |