Skip to content

Instantly share code, notes, and snippets.

View kokospapa8's full-sized avatar
๐Ÿ•
koko

Jinwook Baek kokospapa8

๐Ÿ•
koko
View GitHub Profile
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
@kokospapa8
kokospapa8 / Redshift SQL
Last active June 7, 2020 04:14
Redshift SQL
Compression status
```
ANALYZE COMPRESSION <tablename>;
```
Disk status
```
SELECT
owner AS node,
diskno,
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/*
```
// 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';
# 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
// 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';
# -*- 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)
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
* const vs let vs var
scope
- var : funtion
- const, let : block
mutability
- var, let : mutable
- const : immutable
![Logo of the project](./images/logo.sample.png)
# Name of the project &middot; [![Build Status](https://img.shields.io/travis/npm/npm/latest.svg?style=flat-square)](https://travis-ci.org/npm/npm) [![npm](https://img.shields.io/npm/v/npm.svg?style=flat-square)](https://www.npmjs.com/package/npm) [![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square)](http://makeapullrequest.com) [![GitHub license](https://img.shields.io/badge/license-MIT-blue.svg?style=flat-square)](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 &