- Volume of data
- Scaling
- Structure strictness (data schemas)
- Query complexity
- Type of data
- Depth levels of data
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 map = f => step => (a, c) => step(a, f(c)); | |
const filter = predicate => step => (a, c) => predicate(c) ? step(a, c) : a; | |
const compose = (...fns) => x => fns.reduceRight((y, f) => f(y), x); | |
const curry = (f, arr = []) => (...args) => ( | |
a => a.length === f.length ? f(...a) : curry(f, a) | |
)([...arr, ...args]); |
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
#!/bin/bash | |
# file: ttfb.sh | |
# curl command to check the time to first byte | |
# ** usage ** | |
# 1. ./ttfb.sh "https://google.com" | |
# 2. seq 10 | xargs -Iz ./ttfb.sh "https://google.com" | |
curl -o /dev/null \ | |
-H 'Cache-Control: no-cache' \ | |
-s \ |
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 sumArrayValues = (values) => { | |
return values.reduce((p, c) => p + c, 0) | |
} | |
const weightedMean = (factorsArray, weightsArray) => { | |
return sumArrayValues(factorsArray.map((factor, index) => factor * weightsArray[index])) / sumArrayValues(weightsArray) | |
} | |
weightedMean([251, 360, 210], [0.1, 0.5, 0.7]); | |
// => 270.8461538461539 |
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
class VPAIDContainer { | |
constructor () { | |
// The slot is the div element on the main page that the ad is supposed to occupy | |
this._slot = null | |
// The video slot is the video object that the creative can use to render and video element it might have. | |
this._videoSlot = null | |
} | |
initAd (width, height, viewMode, desiredBitrate, creativeData, environmentVars) { | |
// slot and videoSlot are passed as part of the environmentVars | |
this._slot = environmentVars.slot |
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
// this is the background code... | |
// listen for our browerAction to be clicked | |
chrome.browserAction.onClicked.addListener(function (tab) { | |
// for the current tab, inject the "inject.js" file & execute it | |
chrome.tabs.executeScript(tab.ib, { | |
file: 'inject.js' | |
}); | |
}); |
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
// This class is meant to be part of the video player that interacts with the Ad. | |
// It takes the VPAID creative as a parameter in its contructor. | |
var VPAIDWrapper = function (VPAIDCreative) { | |
this._creative = VPAIDCreative | |
if (!this.checkVPAIDInterface(VPAIDCreative)) { | |
//The VPAIDCreative doesn't conform to the VPAID spec | |
console.error('VPAIDCreative doesn\'t conform to the VPAID spec') | |
return | |
} | |
this.setCallbacksForCreative() |
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
/*! | |
* https://github.com/es-shims/es5-shim | |
* @license es5-shim Copyright 2009-2015 by contributors, MIT License | |
* see https://github.com/es-shims/es5-shim/blob/master/LICENSE | |
*/ | |
// vim: ts=4 sts=4 sw=4 expandtab | |
// Add semicolon to prevent IIFE from being passed as argument to concatenated code. | |
; |
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
#!/bin/sh | |
# Install GIT | |
sudo yum install git-all | |
# Install NODE | |
yum install -y gcc-c++ make | |
curl -sL https://rpm.nodesource.com/setup_6.x | sudo -E bash - | |
yum install -y nodejs |
NewerOlder