2020. 8. 25.css grid border collapse (sort of)
parent:
grid-gap: 1px;
grid-gap: 1px;
child:
box-shadow: 0 0 0 1px <color>;
box-shadow: 0 0 0 1px <color>;
2020. 8. 19.delete all branches except current
git branch -D $(git branch)
git branch -D $(git branch)
2020. 8. 19.checkout to prev branch
git checkout @{-1}
git checkout @{-1}
더 짧게는
git checkout -
git checkout -
2020. 8. 16.chmod
chmod +rwx <filename>
to add permissions.chmod -rwx <directoryname>
to remove permissions.chmod +x <filename>
to allow executable permissions.chmod -wx <filename>
to take out write and executable permissions.
2020. 8. 14.chrome devtools device toolbar responsive mode 에서 마우스 포인터 사용하기
Step 1
Step 2
Step 3
Done!
2020. 8. 13.vscode에서 preview mode로 파일 열리지 않게하기
vscode에서 file explorer나 search를 통해 찾은 파일을 클릭하면 탭에서 italic으로 파일명이 표시되면서 preview mode로 열리고, 같은 방식으로 다른 파일을 열면 preview mode였던 파일은 사라진다. 때때로 그래서 귀찮은 일이 생기는데, 이것을 막으려면 settings.json
에 아래를 추가하면 된다.
{
"workbench.editor.enablePreview": false,
}
{
"workbench.editor.enablePreview": false,
}
...근데 이렇게 해놓고 무작정 다 열다 보면 램이 터질 수 있다...
2020. 8. 12.Unexpected use of 'isNaN'. (eslintno-restricted-globals), Argument of type 'string' is not assignable to parameter of type 'number'. ts(2345)
let val = '123'
isNaN(val) // nah! Argument of type 'string' is not assignable to parameter of type 'number'. ts(2345)
isNaN(123) // nah! Unexpected use of 'isNaN'. (eslintno-restricted-globals)
let val = '123'
isNaN(val) // nah! Argument of type 'string' is not assignable to parameter of type 'number'. ts(2345)
isNaN(123) // nah! Unexpected use of 'isNaN'. (eslintno-restricted-globals)
then use
Number.isNaN(val) // yay!
Number.isNaN(val) // yay!
2020. 8. 6.U+001D
2020. 8. 5.:active on mobile safari
-
webkit-tap-highlight-color
쓰기 -> 근데:active
랑 동작이 다름 -
body에
<body ontouchstart="">
넣기 -
필요한 컴포넌트에
onTouchStart={() => false}
넣기
2020. 8. 5.Array._proto__.length
js array는 object이고 length
프로퍼티를 갖고 있다. 그래서 아래가 가능.
const {length, [0]: first, [length - 1]: last} = [1, 2, 3];
console.log(first, last); // 1 3
const {length, [0]: first, [length - 1]: last} = [1, 2, 3];
console.log(first, last); // 1 3
주의: length
를 선언해두지 않으면 length - 1
을 알 수 없고 last
가 undefined
되어버림.