This file contains 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
# EditorConfig is awesome: https://EditorConfig.org | |
# top-most EditorConfig file | |
root = true | |
# Space indentation | |
[*] | |
indent_style = space | |
indent_size = 2 | |
trim_trailing_whitespace = true |
This file contains 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
**/node_modules/** | |
dist | |
public |
This file contains 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
curl "https://awscli.amazonaws.com/AWSCLIV2.pkg" -o "AWSCLIV2.pkg" | |
sudo installer -pkg AWSCLIV2.pkg -target / | |
# confirm deployment | |
which aws | |
# returns: /usr/local/bin/aws | |
aws --version | |
# returns: aws-cli/2.2.14 Python/3.8.8 Darwin/20.5.0 exe/x86_64 prompt/off |
This file contains 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
# Display info on existing SSH keys | |
for key in ~/.ssh/*.pub; do ssh-keygen -l -f "${key}"; done | uniq | |
# DSA = Unsafe and even no longer supported since OpenSSH version 7. | |
# RSA = Concerning, see length. 3072 or 4096-bit length is ok. | |
# ECDSA = Trustworthiness concern on the NIST curves. | |
# Ed25519 = Recommended public-key algorithm. |
This file contains 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
# Generate new Ed25519 SSH key | |
ssh-keygen -o -a 100 -t ed25519 -f ~/.ssh/id_ed25519 -C "login@hostname.com" | |
# -o : Save the private-key using the new OpenSSH format rather than the PEM format | |
# -a: Increase resistance to brute-force password cracking if the private-key is stolen. | |
# -t: Type of key to create (Ed25519). | |
# -f: Filename of the generated key file. | |
# -C: Optional comment, often <login>@<hostname> or email. |
This file contains 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
# Generate new 4096 bit RSA SSH key: | |
# --- Only use when ed25519 isnt possible --- | |
ssh-keygen -o -a 100 -t rsa -b 4096 -f ~/.ssh/id_rsa -C "login@hostname.com" | |
# -o : Save the private-key using the new OpenSSH format rather than the PEM format | |
# -a: Increase resistance to brute-force password cracking if the private-key is stolen. | |
# -t: Type of key to create (rsa). | |
# -f: Filename of the generated key file. | |
# -C: Optional comment, often <login>@<hostname> or email. |
This file contains 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
// see: https://twitter.com/diegohaz/status/1526511865291067393 | |
const showDialog = () => console.log('showDialog'); | |
// Usage | |
function onMouseDown(event) { | |
// We want to showDialog asynchronously on mouse down, but before mouse up, | |
// for when the user is "tapping" instead of "clicking". | |
queueBeforeEvent(event.target, 'mouseup', showDialog); | |
} |
This file contains 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
// see: https://twitter.com/diegohaz/status/1530662445240426496 | |
const anotherElement = document.querySelector('#anotherElement'); | |
function onClick() { | |
// BAD - Focus will fire on another element before the | |
// click event finishes bubbling. You may get events | |
// in the wrong order on parent elements. | |
anotherElement.focus(); |
This file contains 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
dist |
This file contains 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
Show hidden characters
{ | |
"compilerOptions": { | |
/* Visit https://aka.ms/tsconfig to read more about this file */ | |
/* Projects */ | |
// "incremental": true, /* Save .tsbuildinfo files to allow for incremental compilation of projects. */ | |
// "composite": true, /* Enable constraints that allow a TypeScript project to be used with project references. */ | |
// "tsBuildInfoFile": "./.tsbuildinfo", /* Specify the path to .tsbuildinfo incremental compilation file. */ | |
// "disableSourceOfProjectReferenceRedirect": true, /* Disable preferring source files instead of declaration files when referencing composite projects. */ | |
// "disableSolutionSearching": true, /* Opt a project out of multi-project reference checking when editing. */ |