Delete all branches with names with 'x'2022. 3. 28.
$ git branch | grep x | xargs git branch -D
$ git branch | grep x | xargs git branch -D
nextjs `.env` on Amplify (👎👎👎👎👎)2022. 1. 21.
- next-auth로 auth 를 이케저케한 프로젝트를 앰플리파이에 배포해봤음
signIn
시 서버에러 발생- error message was like this:
https://next-auth.js.org/errors#client_fetch_error Unexpected token < in JSON at position 0 {error: {…}, path: 'providers', message: 'Unexpected token < in JSON at position 0'}
https://next-auth.js.org/errors#client_fetch_error Unexpected token < in JSON at position 0 {error: {…}, path: 'providers', message: 'Unexpected token < in JSON at position 0'}
- 알아보니 amplify web ui에서 입력한 env var가 안먹는 것이었음
- amplify.yml에 아래와 같은 짓을 하는 수 밖에 없었음
- echo "NEXTAUTH_SECRET=$NEXTAUTH_SECRET" >> .env - echo "NEXTAUTH_URL=$NEXTAUTH_URL" >> .env
if vs. when2021. 7. 31.
(if expr "True" nil)
(if expr "True" nil)
(when expr "True")
(when expr "True")
위 둘은 같음.
() vs. '()2021. 7. 28.
(+ 1 2 3 4) ;; <1>
'(+ 1 2 3 4) ;; <2>
(+ 1 2 3 4) ;; <1>
'(+ 1 2 3 4) ;; <2>
- A list that is interpreted as an expression and evaluated
- Prevent evaluation of a list by starting it with a single quote
stash a folder2021. 6. 6.
git stash push [-u] -- <folder>
git stash push [-u] -- <folder>
yarn upgrade-interactive --latest2021. 5. 10.
yarn upgrade-interactive --latest
yarn upgrade-interactive --latest
show diff of a stash2021. 5. 10.
git stash show -p <stash>
git stash show -p <stash>
change current directory in vim2021. 3. 29.
:cd <DIRECTORY>
:cd <DIRECTORY>
kill localhost:PORT2021. 3. 19.
lsof -iTCP:{PORT} -sTCP:LISTEN
lsof -iTCP:{PORT} -sTCP:LISTEN
kill {PID}
kill {PID}
isReactElement2021. 3. 19.
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;