[TIL] 220902

먼지·2022년 9월 2일
0

TIL

목록 보기
25/57
post-thumbnail

skill-badge

Git

error: cannot pull with rebase: You have unstaged changes.
error: please commit or stash them.
네가 지금 올리지 않은 변경사항이 있는데 커밋하든지 stash(잠시어디밀어넣고) 하든지 해라

node? yarn error (wsl)

node version이 회사 프로젝트마다 다를 수 있음. 그러면 노드 버전을 원하는 버전으로 다양한 버전 중 선택할 수 있게
npm 같은 node를 관리해주는 node nvm이 잇음
nvm은 노드버전들을관리해줌

asdf install

https://asdf-vm.com/guide/getting-started.html
https://twitter.com/iknow_p/status/1540951648667074560

wsl텀널에서벌어진일기억나는대로적어보기
1. 현재 디렉토리에서? git clone https://github.com/asdf-vm/asdf.git ~/.asdf --branch v0.10.2
2. .bashrc에

. $HOME/.asdf/asdf.sh
Completions must be configured by adding the following to your .bashrc:

. $HOME/.asdf/completions/asdf.bash
  1. 둘중하나햇음
# sudo앞에썻엇나
apt-get install dirmngr gpg curl gawk 
# or
asdf plugin add nodejs https://github.com/asdf-vm/asdf-nodejs.git
  1. asdf global nodejs latest
  2. asdf local nodejs latest

vim 모드

  • 이동
  • 수정 i(엔터x) or o(주석구문x)

esc 수정 -> 탐색 모드

vim에서 나가는 법
shift+; => wq enter

wsl

sudo 관리자계정이 맞니? 위험한거설치해도되니

인생이 간편해짐
설치하는방법

# asdf야~ 버전번호의 nodejs를 설치해라
asdf install nodejs 버전번호

# asdf야~ 전역으로 nodejs 버전을 이걸로 설정해라
asdf global nodejs 버전번호

리눅스 mac 는 유닉스 출신이라 비슷한데
유닉스계승자mac 이고 그걸 꽁짜로 오픈소스로만든게 리눅스
윈도우는 마소의 빌게이츠가 태생부터 다르게 만든것

리눅스는 명령어만 다르다? 놉. '근본'부터 다르다

이런거세개를동시에돌리고있따

"dev": "run-p \"dev:*\"",

yarn dev 햇을때
run-p 여러개를동시에실행해주세요. dev로시작하는모든명령어를실행해주세요

"dev:css": "npm run generate:css -- --watch",
"generate:css": "npx tailwindcss -i ./styles/tailwind.css -o ./app/tailwind.css",

tailwindcss를 생성해주는 친구

"dev:remix": "remix watch",

리믹스 서버를 실행해주는 친구

[pages:inf] - http://127.0..
내컴퓨터 local 나 127
내집

[pages:inf] - http://172.3..
나의 ip주소
경기도파주시1동이런거
핸드폰으로들어갈수있음?

라이브쉐어 서버공유

shared servers = proxy
라이브쉐어 -> 나한테요청 -< ㅇ으디ㅏ딥

숨겨진 페이지 - /skills/admin/new

typescript

export default function LinkWithTooltip({
  to,
  tooltip,
  children,
  className,
}: React.ComponentProps<typeof Link> & { tooltip: string }) {
  // Link라는 컴포넌트의 Props 타입 & tooltip이라는 string prop이 추가된 타입이다


// as const 값이 변하지 않는다 . 타입스크립트가 타입을 좀 더 구체적으로 추론할 수 잇음
const t = [1,2,3,4] as const

type T = typeof t;


const dict = {
  'dog': ['진돗개', "치와와", "말티즈", '리트리버'],
  'cat': ['코숏', '러시안 블루', '샴', '스핑크스']
} as const
// as const - 내코드에포함돼잇는데이터. json 같은 데이터로 가져오는 상수에 사용!
// as const & typeof 같이쓰면좋음

type Dog = typeof dict['dog']
type Cat = typeof dict['cat']

type Dog = typeof dict['dog'][number]
type Cat = typeof dict['cat'][number]

// => typeof 값의타입을꺼낼때씀

// 공부하기!
const dict = {
  'dog': ['진돗개', "치와와", "말티즈", '리트리버'],
  'cat': ['코숏', '러시안 블루', '샴', '스핑크스']
} as const
// as const - 내코드에포함돼잇는데이터. json 같은 데이터로 가져오는 상수에 사용!
// as const & typeof 같이쓰면좋음

type Dict = typeof dict

type DogArray = typeof dict['dog']

type Dog = typeof dict['dog'][number]

type Cat = typeof dict['cat'][number]

remix는 타입스크립트로 만든 프레임워크
자바스크립트로 만든 라이블러리는 타입이 따롱 ㅣㅆ음

ssr 로 만들어서 사용자초기로딩속도가빠름
첫페이지를 빠르게 보내주기땜문에
react-query 등으로 데이터로딩상태관리안해도됨


profile
꾸준히 자유롭게 즐겁게

0개의 댓글