A scatterplot chart representing the following variables:
- x: longitude (quantitive)
- y: latitude (quantitive)
- area: population (quantitive)
- color: population (quantitive)
A scatterplot chart representing the following variables:
const unordered = { | |
b: "foo", | |
c: "bar", | |
a: "baz", | |
}; | |
console.log(JSON.stringify(unordered)); | |
// → '{"b":"foo","c":"bar","a":"baz"}' | |
const ordered = Object.keys(unordered) |
const CircularDependencyPlugin = require('circular-dependency-plugin'); | |
const CIRC_DEP_MAX = 238; | |
const defaultConfig = { | |
aggregateDirDepth: 2, | |
exclude: /node_modules/, | |
include: /.*/, | |
logWarnings: true, | |
logErrors: true, |
# Pass the env-vars to MYCOMMAND | |
eval $(egrep -v '^#' .env | xargs) MYCOMMAND | |
# … or ... | |
# Export the vars in .env into your shell: | |
export $(egrep -v '^#' .env | xargs) |
function loadScript(url, callback) { | |
var script = document.createElement("script") | |
script.type = "text/javascript"; | |
if (script.readyState) { | |
script.onreadystatechange = function () { | |
if (script.readyState === "loaded" || script.readyState === "complete") { | |
script.onreadystatechange = null; | |
callback(); | |
} | |
}; |
Name things modularly, from a generic to specific. https://webdesign.tutsplus.com/articles/quick-tip-name-your-sass-variables-modularly--webdesign-13364
git filter-branch --env-filter ' | |
OLD_EMAIL="old@email.com" | |
NEW_NAME="New Name" | |
NEW_EMAIL="new@email.com" | |
if [ "$GIT_COMMITTER_EMAIL" = "$OLD_EMAIL" ] | |
then | |
export GIT_COMMITTER_NAME="$NEW_NAME" | |
export GIT_COMMITTER_EMAIL="$NEW_EMAIL" | |
fi |
// Basic verification | |
// Returns the promise from somethingAsync() | |
// The test passes if resolved, fails if rejected | |
it('does something async with promises', function() { | |
return somethingAsync(); | |
}); | |
// Verify a fulfilled promise | |
// Returns the promise from somethingAsync() and runs assertions in the onFulfilled callback |
#!/bin/bash | |
HOOK_NAMES="pre-commit" | |
HOOK_DIR=$(git rev-parse --show-toplevel)/.git/hooks | |
INSTALL_DIR=$(git rev-parse --show-toplevel)/hooks | |
COLOR_GREEN=`tput setaf 2` | |
COLOR_RESET=`tput sgr0` | |
for hook in $HOOK_NAMES; do | |
echo "Installing $hook hook..." |