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
| docker build -t [image_name] . | |
| aws ecr create-repository --repository-name [repo] | |
| aws ecr describe-repositories --query 'repositories[].[repositoryName, repositoryUri]' --output table | |
| aws ecr get-login --no-include-email | /bin/bash | |
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
| Compression status | |
| ``` | |
| ANALYZE COMPRESSION <tablename>; | |
| ``` | |
| Disk status | |
| ``` | |
| SELECT | |
| owner AS node, | |
| diskno, |
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
| https://github.com/docker/for-mac/issues/371 | |
| ``` | |
| docker rm $(docker ps -a -q) | |
| docker rmi $(docker images -q) | |
| docker volume rm $(docker volume ls |awk '{print $2}') | |
| rm -rf ~/Library/Containers/com.docker.docker/Data/* | |
| ``` |
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
| // Adding to end of array | |
| // Bad | |
| this.state.arr.push('foo'); | |
| // Good | |
| this.setState({ | |
| arr: [...this.state.arr, 'foo'] | |
| }) | |
| // Adding to middle of an array | |
| // Bad | |
| this.state.arr[3] = 'foo'; |
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
| # node, nvm | |
| https://github.com/nvm-sh/nvm | |
| ``` | |
| > curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.3/install.sh | bash | |
| # ~/.bash_profile | |
| export NVM_DIR="$([ -z "${XDG_CONFIG_HOME-}" ] && printf %s "${HOME}/.nvm" || printf %s "${XDG_CONFIG_HOME}/nvm")" | |
| [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm | |
| > source ~/.bash_profile |
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
| // Includes functions for exporting active sheet or all sheets as JSON object (also Python object syntax compatible). | |
| // Tweak the makePrettyJSON_ function to customize what kind of JSON to export. | |
| var FORMAT_ONELINE = 'One-line'; | |
| var FORMAT_MULTILINE = 'Multi-line'; | |
| var FORMAT_PRETTY = 'Pretty'; | |
| var LANGUAGE_JS = 'JavaScript'; | |
| var LANGUAGE_PYTHON = 'Python'; |
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
| # -*- coding: utf-8 -*- | |
| from random import choice as randchoice | |
| ADJECTIVES = ["TEST1"] | |
| NOUNS = ["TEST2"] | |
| def get_random_username(min_size: int, max_size: int, underscores: bool): | |
| # choose base words and strip | |
| adjective = randchoice(ADJECTIVES) | |
| noun = randchoice(NOUNS) |
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
| grep -i | |
| grep -R <dir> | |
| grep -RL <dir> : out files | |
| SED - stream editor | |
| sed 's/snow/rain/' <file> - 's' for substitution replace snow to rain | |
| awk | |
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 vs let vs var | |
| scope | |
| - var : funtion | |
| - const, let : block | |
| mutability | |
| - var, let : mutable | |
| - const : immutable |
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
|  | |
| # Name of the project · [](https://travis-ci.org/npm/npm) [](https://www.npmjs.com/package/npm) [](http://makeapullrequest.com) [](https://github.com/your/your-project/blob/master/LICENSE) | |
| > Additional information or tag line | |
| A brief description of your project, what it is used for. | |
| ## Installing / Getting started | |
| A quick introduction of the minimal setup you need to get a hello world up & |