This gist explains how to setup direnv
together with tj/n
. When a node version isn't available at the moment the envrc file gets loaded the node version will be downloaded automatically. Happy coding! ☕
Use Homebrew to install the direnv tool.
#!/usr/bin/env bash | |
# -*- coding: utf-8 -*- | |
# usage: | |
# ./pvc-migrate <forward|backward> <namespace> [<source> [<dest>]] | |
DIRECTION="${1}" | |
NAMESPACE="${2}" |
This gist explains how to setup direnv
together with tj/n
. When a node version isn't available at the moment the envrc file gets loaded the node version will be downloaded automatically. Happy coding! ☕
Use Homebrew to install the direnv tool.
temp() { | |
while true; do | |
printf "\r$(vcgencmd measure_temp)"; | |
sleep 1; | |
done; | |
} |
$ cat path/to/file.png | openssl base64 | tr -d '\n' | pbcopy
(function (window) { | |
var log = window.console.log, fn = function () { return log; }; | |
Object.defineProperty(window.console, 'log', { set: fn, get: fn }); | |
})(window); |
(function (window) { | |
var log = window.console.log, fn = function () { return log; }; | |
Object.defineProperty(window.console, 'log', { set: fn, get: fn }); | |
})(window); |
The v8 update of Angular needs at least Node.js version v12+
but the library fsevents
which will be hoisted in version v1.2.4
from the cli isn't compatible with v12+
yet.
$ yarn why fsevents
yarn why v1.16.0
[1/4] 🤔 Why do we have the module "fsevents"...?
[2/4] 🚚 Initialising dependency graph...
[3/4] 🔍 Finding dependency...
direnv
zsh-direnv
(only with zsh)tj/n
language: node_js | |
node_js: | |
- '11' | |
install: | |
- if [[ "$TRAVIS_PULL_REQUEST_BRANCH" == *"greenkeeper"* ]]; then yarn install; else yarn install --frozen-lockfile; fi | |
script: | |
- echo "Hello World" |
Note: Since macOS High Sierra (10.13) the directory /usr/local/bin
is not modifiable anymore (because of Apple's SIP feature). But using node
and npm
with sudo
is not advisable.
Generally it is best practice to install node using an dedicated version manager like n
or nvm
. This will handle permissions correctly and allows easy upgrading / downgrading the versions.
node
version manager n