list branches
git branch [-a to include remote branches]
create branch [from master]
git checkout -b HS-1234 [master]
update master, rebase and push
git checkout master
\
var promises = ['foo', 'bar'].map(id => { | |
return new Promise(resolve => { | |
couchDb.get( | |
id, | |
function (error, data) { | |
// error handling | |
return resolve(data); | |
} | |
) | |
}); |
[483] ./~/object.entries/index.js 316 bytes {0} [built]
[484] ./~/object.entries/implementation.js 430 bytes {0} [built]
[485] ./~/object.entries/polyfill.js 191 bytes {0} [built]
[486] ./~/object.entries/shim.js 300 bytes {0} [built]
WARNING in ./~/highlight.js/lib/languages/autoit.js
Module parse failed: /Users/phil/dev/geek-tennis/node_modules/highlight.js/lib/languages/autoit.js Maximum call stack size exceeded
You may need an appropriate loader to handle this file type.
const RestifyRequest = require('restify/lib/request'); | |
/** | |
* The purpose of this class is to add type-hinting for unresolved properties and functions. | |
* | |
* restify's Request class is an extension of Node's http.IncomingMessage | |
* | |
* @class Request | |
*/ |
const errors = require('restify-errors'); | |
/** | |
* The purpose of this list is to add type-hinting for the restify-errors library. | |
* See https://github.com/restify/errors | |
* | |
* @type {Object} | |
*/ | |
module.exports = Object.freeze({ |
const randomInt = (min, max) => { | |
const diff = max - min; | |
const random = Math.floor(Math.random() * (diff + 1)); | |
return min + random; | |
}; | |
const distribution = {}; | |
[...Array(10000)].forEach(() => { | |
const random = randomInt(1, 10); | |
const current = distribution[random] || 0; |
Based on https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-using-volumes.html
View devices:
lsblk
Check if the volume has a file system:
curl -sL https://deb.nodesource.com/setup_12.x | sudo -E bash -
curl -sL https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
sudo apt-get update && sudo apt-get install -y nodejs yarn
If the Node project requires node-gyp:
1111!!! |