This file contains hidden or 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
| VERSION=v10.15.3 | |
| DIST=linux-x64 | |
| # Step 2: install NodeJS and npm | |
| wget https://nodejs.org/dist/$VERSION/node-$VERSION-$DIST.tar.xz | |
| sudo mkdir -p /usr/local/lib/nodejs | |
| sudo tar -xJvf node-$VERSION-$DIST.tar.xz -C /usr/local/lib/nodejs | |
| sudo mv \ | |
| /usr/local/lib/nodejs/node-$VERSION-$DIST \ | |
| /usr/local/lib/nodejs/node-$VERSION |
This file contains hidden or 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 sleepAsync = (ms) => (new Promise((resolve) => (setTimeout(resolve, ms)))); | |
| const getUniqueTimstampAsync = (function () { | |
| let prev; | |
| return async function () { | |
| let timestamp = +(new Date()); | |
| while (prev === timestamp) { | |
| await sleepAsync(1); | |
| timestamp = +(new Date()); | |
| } |
This file contains hidden or 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 getTypeName = (o) => { | |
| if (o === undefined) return 'undefined'; | |
| if (o === null) return 'null'; | |
| return o.constructor.name; | |
| }; | |
| const isUndefined = (o) => (o === undefined); | |
| const isNull = (o) => (o === null); |
This file contains hidden or 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
| $maxGridWidth: 1280px; | |
| $marginWidth: 8px; | |
| $gutterWidth: 16px; | |
| $numMaxColumns: 16; | |
| $singleColumnWidth: ($maxGridWidth - $marginWidth * 2 - $gutterWidth * ($numMaxColumns - 1)) / $numMaxColumns; | |
| @function calColumnWidth($numColumns) { | |
| @if $numColumns <= 0 { | |
| @return 0px; | |
| } |
OlderNewer