Real unit test (isolation, no children render)
Calls:
- constructor
- render
| /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" | |
| brew update | |
| brew doctor | |
| # oh my zsh with some plugins and themes | |
| sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" | |
| sed -i '' 's/^ZSH_THEME=.*/ZSH_THEME="agnoster"/g' ~/.zshrc | |
| sed -i '' 's/^plugins=.*/plugins=(colored-man-pages colorize nvm)/g' ~/.zshrc | 
| import { DateTime } from "luxon"; | |
| function ordinal(n) { | |
| const s = ["th", "st", "nd", "rd"]; | |
| const v = n % 100; | |
| return n + (s[(v - 20) % 10] || s[v] || s[0]); | |
| } | |
| const linkExpiryDate = DateTime.now().plus({ days: 1 }); | 
| const rewire = require('rewire'); | |
| const defaults = rewire('react-scripts/scripts/build.js'); | |
| const { RetryChunkLoadPlugin } = require('webpack-retry-chunk-load-plugin'); | |
| const config = defaults.__get__('config'); | |
| /** | |
| * Do not mangle component names in production, for a better learning experience | |
| * @link https://kentcdodds.com/blog/profile-a-react-app-for-performance#disable-function-name-mangling | |
| */ | 
| `ssh-keygen` or if key was generated on aws console `ssh-keygen -y -f ~/Downloads/private-key.pem` to get the public key | |
| copy public key to `.ssh/authorized_keys` | |
| `sudo reboot` | |
| `ssh server1` | 
| // ref: https://www.typescriptlang.org/docs/handbook/release-notes/typescript-3-4.html | |
| const status = ['on', 'off'] as const; | |
| type status = typeof status[number]; | 
| #!/bin/bash | |
| ############################################### | |
| # To use: | |
| # chmod +x install-redis.sh | |
| # ./install-redis.sh | |
| ############################################### | |
| version=6.2.7 | 
| set number | 
| export TF_REGISTRY_CLIENT_TIMEOUT=20 | 
| parse_git_branch() { | |
| git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ (\1)/' | |
| } | |
| setopt PROMPT_SUBST | |
| PROMPT='%9c%{%F{green}%}$(parse_git_branch)%{%F{none}%} $ ' |