2021. 5. 10.show diff of a stash
git stash show -p <stash>
git stash show -p <stash>
2021. 3. 29.change current directory in vim
:cd <DIRECTORY>
:cd <DIRECTORY>
2021. 3. 19.kill localhost:PORT
lsof -iTCP:{PORT} -sTCP:LISTEN
lsof -iTCP:{PORT} -sTCP:LISTEN
kill {PID}
kill {PID}
2021. 3. 19.isReactElement
const isReactElement = (element: ReactNode): element is ReactElement =>
element !== null && typeof element === 'object' && 'props' in element;
const isReactElement = (element: ReactNode): element is ReactElement =>
element !== null && typeof element === 'object' && 'props' in element;
2021. 3. 18.backdrop-filter on Safari
make sure your opacity
value is 1.
2021. 3. 17.warning: could not read '.git/rebase-merge/head-name': No such file or directory
git rebase --quit
git rebase --quit
2021. 3. 12.`mix ecto.create` -> `(Postgrex.Error) FATAL 28000 (invalid_authorization_specification) role "postgres" does not exist`
createuser -s postgres
createuser -s postgres
2021. 3. 9.Patch broken node_module with yarn2
yarn patch <module>
- fix the code inside the generated folder and save it.
yarn patch-commit <generated_folder> > <patch_file_name>.diff
- fix
package.json
with"module": "patch:<module>@<version>#<path_to_patch_file>/<patch_file_name>.diff"
yarn install
2021. 1. 21.as const
2021. 1. 11.type predicate
interface Article {
title: string;
body: string;
}
function isArticle(body: unknown): body is Article {
let b = body as Article;
return !!b && typeof b.body === 'string' && typeof b.title === 'string';
}
interface Article {
title: string;
body: string;
}
function isArticle(body: unknown): body is Article {
let b = body as Article;
return !!b && typeof b.body === 'string' && typeof b.title === 'string';
}