λ°˜μ‘ν˜•

전체 κΈ€ 271

[Linux] .zshrc λ³€κ²½ ν›„ 변경사항 λ°”λ‘œ μ €μž₯ν•˜λŠ” 방법

Intro μ•ˆλ…•ν•˜μ„Έμš”. zsh의 .zshrc λ³€κ²½ ν›„ λ°”λ‘œ μ μš©ν•˜λŠ” 방법에 λŒ€ν•΄ μ•Œμ•„λ³΄λ„λ‘ ν•˜κ² μŠ΅λ‹ˆλ‹€. How to apply보톡 μ•„λž˜μ˜ λͺ…λ Ήμ–΄ vi/vim 을 톡해 νŒŒμΌμ„ μˆ˜μ •ν•©λ‹ˆλ‹€. μˆ˜μ •ν›„ wq λͺ…λ Ήμ–΄λ₯Ό 톡해 μ €μž₯ν•΄μ€λ‹ˆλ‹€. ν•˜μ§€λ§Œ μ΄λ•Œ 변경사항이 λ°”λ‘œ μ €μž₯λ˜μ§€ μ•ŠμŠ΅λ‹ˆλ‹€. βžœ ~ vi .zshrc  source ν‚€μ›Œλ“œλ₯Ό 톡해 ν•΄λ‹Ή νŒŒμΌμ„ ν•œλ²ˆ 더 μž…λ ₯ν•΄μ€˜μ•Ό 변경사항이 λ°”λ‘œ μ €μž₯λ˜μ–΄ μ μš©λ©λ‹ˆλ‹€ :)➜ ~ source ~/.zshrc

[React] window scroll event handler μ΄λ²€νŠΈκ°€ μ•ˆλ¨Ήνž λ•Œ, scrollY always 0

Introμ•ˆλ…•ν•˜μ„Έμš”. Reactμ—μ„œ window.scroll μ΄λ²€νŠΈκ°€ μ œλŒ€λ‘œ μž‘λ™ν•˜μ§€ μ•Šμ€ μ—λŸ¬κ°€ λ°œμƒν•˜μ˜€μŠ΅λ‹ˆλ‹€. 아무리 window.scrollY 값을 ꡬ해도 0으둜 λ‚˜μ˜€λ”λΌκ³ μš”.   μ½”λ“œλŠ” λ‹€μŒκ³Ό κ°™μŠ΅λ‹ˆλ‹€. // stateconst [scrollTop, setScrollTop] = useState(0), headerRef = useRef(null), headerHeight = headerRef?.current?.clientHeight ?? 0, // useEffectuseEffect(() => { const handleScroll = () => { setScrollTop(window.scrollY); }; handleScroll(); window.ad..

Framework/React 2024.05.25

[Html] select element μ—μ„œ dropdown icon λ°”κΎΈλŠ” 방법

Intro μ•ˆλ…•ν•˜μ„Έμš”. select element μ—μ„œ dropdown icon λ°”κΎΈλŠ” 방법에 λŒ€ν•΄ μ•Œμ•„λ³΄λ„λ‘ ν•˜κ² μŠ΅λ‹ˆλ‹€ :) How to solve problem Option 1 Option 2 Option 3 /* Hide the default dropdown arrow */ .custom-select { appearance: none; /* For Firefox */ -webkit-appearance: none; /* For Chrome, Safari, Opera */ -moz-appearance: none; /* For Firefox */ background-image: url('custom-dropdown-icon.png'); /* Custom arrow icon */ background-pos..

Programming/Html 2024.04.23

[React] useForm λΌμ΄λΈŒλŸ¬λ¦¬λž€?

Intro μ•ˆλ…•ν•˜μ„Έμš”. 이번 μ‹œκ°„μ—λŠ” React useForm λΌμ΄λΈŒλŸ¬λ¦¬μ— λŒ€ν•΄ κ°„λ‹¨νžˆ 정리해보렀고 ν•©λ‹ˆλ‹€. React mui ν…œν”Œλ¦Ώμ„ μ‚΄νŽ΄λ³΄λ˜ 도쀑 useForm 라이브러리λ₯Ό μ‚¬μš©ν•˜λŠ” 뢀뢄을 처음 λ°œκ²¬ν–ˆκ±°λ“ μš”! :) UseForm? useForm은 Reactμ—μ„œ Form 관리λ₯Ό κ°„νŽΈν•˜κ²Œ ν•  수 μžˆλ„λ‘ λ„μ™€μ£ΌλŠ” 라이브러리 쀑 ν•˜λ‚˜μž…λ‹ˆλ‹€. React Hooksλ₯Ό 기반으둜 λ™μž‘ν•©λ‹ˆλ‹€. useForm을 μ‚¬μš©ν•˜λ©΄ μƒνƒœ 관리와 μœ νš¨μ„± 검사 λ“±μ˜ λ³΅μž‘ν•œ 폼 κ΄€λ ¨ μž‘μ—…μ„ κ°„μ†Œν™”ν•  수 μžˆμ–΄ κ°œλ°œμžλ“€μ΄ 폼을 더 λΉ λ₯΄κ³  μ‰½κ²Œ μž‘μ„±ν•  수 μžˆμŠ΅λ‹ˆλ‹€. μ΄λŠ” 개발 생산성을 높이고 μ½”λ“œμ˜ μœ μ§€λ³΄μˆ˜μ„±μ„ ν–₯μƒμ‹œν‚΅λ‹ˆλ‹€. UseForm's function Form μƒνƒœ 관리 : useForm 훅을 μ‚¬μš©ν•˜μ—¬ 폼의 μƒνƒœλ₯Ό 관리할 수 μžˆμŠ΅λ‹ˆλ‹€..

Framework/React 2024.02.29

[React] Input elements should have autocomplete attributes (suggested: "current-password") Error ν•΄κ²° 방법

Intro μ•ˆλ…•ν•˜μ„Έμš”. Reactμ—μ„œ MUI의 TextFieldλ₯Ό μ‚¬μš©ν•˜λ˜ 도쀑 μ•„λž˜μ™€ 같은 μ—λŸ¬κ°€ λ°œμƒν•˜μ˜€μŠ΅λ‹ˆλ‹€. Input elements should have autocomplete attributes (suggested: "current-password") How to solve problem ν•΄λ‹Ή μ—λŸ¬κ°€ λ°œμƒν•œ μ΄μœ λŠ” autocomplete 속성을 λͺ…μ‹œν•˜μ§€ μ•Šμ•„μ„œμž…λ‹ˆλ‹€. autoComplete μ†μ„±μ΄λž€ 폼 ν•„λ“œμ— λΈŒλΌμš°μ €μ˜ μžλ™ μ™„μ„± κΈ°λŠ₯을 μ‚¬μš©ν• μ§€ μ—¬λΆ€λ₯Ό μ§€μ •ν•©λ‹ˆλ‹€. λΈŒλΌμš°μ €λŠ” μ’…μ’… μ‚¬μš©μžκ°€ 이전에 μž…λ ₯ν•œ 데이터λ₯Ό κΈ°μ–΅ν•˜κ³ , μœ μ‚¬ν•œ μž…λ ₯ ν•„λ“œκ°€ λ‚˜νƒ€λ‚  λ•Œ 이λ₯Ό μžλ™μœΌλ‘œ μ™„μ„±ν•©λ‹ˆλ‹€. 예λ₯Ό λ“€μ–΄, μ‚¬μš©μžκ°€ 이전에 μž…λ ₯ν•œ 이메일 μ£Όμ†Œλ‚˜ μ‚¬μš©μž 이름을 κΈ°μ–΅ν•˜μ—¬ λ‹€μŒμ— ν•΄λ‹Ή ν•„λ“œμ— λ‹€μ‹œ μž…λ ₯ν•  λ•Œ 브라..

Framework/React 2024.02.16

[Material UI] Dialog μ»΄ν¬λ„ŒνŠΈ ν™”μ‚΄ν‘œ ν‚€ (PgUp, PgDn) Internal scroll μΆ”κ°€ν•˜λŠ” 방법

Intro μ•ˆλ…•ν•˜μ„Έμš”. 이번 μ‹œκ°„μ—λŠ” MUI Dialog Component μ—μ„œ ν™”μ‚΄ν‘œ ν‚€ (PgUp, PgDn) Internal scroll 을 μΆ”κ°€ν•˜λŠ” 방법에 λŒ€ν•΄ μ•Œμ•„λ³΄κ² μŠ΅λ‹ˆλ‹€. Mui Dialog Component Open full-screen dialog Sound save MUI Full Dialog μ˜ˆμ‹œλŠ” λ‹€μŒκ³Ό κ°™μŠ΅λ‹ˆλ‹€. μœ„ μ½”λ“œ ν™œμš© μ‹œμ— 기본적으둜 ν™”μ‚΄ν‘œ λ°©ν–₯ν‚€ 슀크둀이 μž‘λ™ν•˜μ§€ μ•ŠμŠ΅λ‹ˆλ‹€. PgUp, PgDn λ²„νŠΌλ„ λ§ˆμ°¬κ°€μ§€κ³ μš”. How to solve problem Modal title DialoContent νƒœκ·Έμ— tabIndex={0} 속성을 μΆ”κ°€ν•˜λ©΄ ν™”μ‚΄ν‚€ ν‘œλ₯Ό 톡해 up & down μŠ€ν¬λ‘€μ„ μ‹€ν–‰μ‹œν‚¬ 수 μžˆμŠ΅λ‹ˆλ‹€. PgUp, PgDn λ²„νŠΌλ„ 잘 μž‘λ™ν•˜κ³ μš”. Conclusion ..

Framework/React 2024.01.24

[Git] submodule / subtree

Intro μ•ˆλ…•ν•˜μ„Έμš”. 이번 μ‹œκ°„μ—λŠ” git submodule / subtree 에 λŒ€ν•΄ μ•Œμ•„λ³΄κ² μŠ΅λ‹ˆλ‹€. submodule # Goal ν•˜λ‚˜ μ΄μƒμ˜ μ™ΈλΆ€ μ €μž₯μ†Œ (git μ €μž₯μ†Œ)λ₯Ό ν˜„μž¬ ν”„λ‘œμ νŠΈμ— ν¬ν•¨μ‹œν‚€κΈ° μœ„ν•΄ μ‚¬μš©ν•©λ‹ˆλ‹€. # How to work λΆ€λͺ¨ μ €μž₯μ†Œ(repository)λŠ” μ„œλΈŒλͺ¨λ“ˆμ΄λΌ λΆˆλ¦¬λŠ” λ³„λ„μ˜ μ €μž₯μ†Œλ₯Ό κ°€λ¦¬ν‚€λŠ” λ§ν¬λ§Œμ„ μœ μ§€ν•˜κ³  μžˆμŠ΅λ‹ˆλ‹€. 이 μ €μž₯μ†ŒλŠ” 자체적으둜 독립적인 Git μ €μž₯μ†Œλ‘œμ„œ κ΄€λ¦¬λ˜λ©°, λΆ€λͺ¨ μ €μž₯μ†Œμ—λŠ” ν•΄λ‹Ή μ„œλΈŒλͺ¨λ“ˆμ˜ μƒνƒœ(컀밋 ν•΄μ‹œ)λ§Œμ„ κΈ°λ‘ν•©λ‹ˆλ‹€. # Usage μ„œλΈŒλͺ¨λ“ˆ μΆ”κ°€: git submodule add λΆ€λͺ¨ μ €μž₯μ†Œμ—μ„œ μ„œλΈŒλͺ¨λ“ˆ μ—…λ°μ΄νŠΈ: git submodule update --init --recursive subtree # Goal μ™ΈλΆ€ μ €μž₯μ†Œμ˜ 일뢀 λ˜λŠ” 전체..

Devops/Git 2024.01.22

[AWS] beanstalk healthd.conf not foud μ—λŸ¬ λ°œμƒ 원인 및 ν•΄κ²° 방법

Intro μ•ˆλ…•ν•˜μ„Έμš”. beanstalk λΉˆμŠ€ν†‘μ„ μ‚¬μš©ν•˜μ—¬ 배포 ν™˜κ²½μ„ κ΅¬μ„±ν•˜λ˜ 도쀑 μ•„λž˜μ˜ μ—λŸ¬κ°€ λ°œμƒν–ˆμŠ΅λ‹ˆλ‹€. healthd.conf not foud [ERROR] An error occurred during execution of command [app-deploy] - [start proxy with new configuration]. Stop running the command. Error: copy proxy conf from staging failed with error validate nginx configuration failed with error Command /bin/sh -c /usr/sbin/nginx -t -c /var/proxy/staging/nginx/nginx.conf f..

Devops/AWS 2023.12.11

[AWS] Elastic Beanstalk μ—λŸ¬ The EC2 instances failed to communicate with AWS Elastic Beanstalk

Intro μ•ˆλ…•ν•˜μ„Έμš”. λΉˆμŠ€ν†‘ 배포 ν™˜κ²½ ꡬ성 쀑 λ‹€μŒκ³Ό 같은 μ—λŸ¬κ°€ λ°œμƒν•˜μ˜€μŠ΅λ‹ˆλ‹€. The EC2 instances failed to communicate with AWS Elastic Beanstalk, either because of configuration problems with the VPC or a failed EC2 instance. Check your VPC configuration and try launching the environment again. Why? ꡬ글링을 ν•΄λ³΄λ‹ˆ μΈμŠ€ν„΄μŠ€ μ„€μ • 쀑 퍼블릭 IP μ£Όμ†Œ 할당에 μ²΄ν¬ν•˜μ§€ μ•ŠμœΌλ©΄ λ‹€μŒ μ—λŸ¬κ°€ λ°œμƒν•  수 μžˆλ‹€κ³  ν•©λ‹ˆλ‹€. How to solve the problem μœ„ ν™”λ©΄κ³Ό 같이 퍼블릭 IP μ£Όμ†Œ > ν™œμ„±ν™”λ¨μ— 체크λ₯Ό ν•˜λ©΄ ν•΄λ‹Ή 에..

Devops/AWS 2023.11.28

[ν”„λ‘œκ·Έλž˜λ¨ΈμŠ€/JS] ν”Όμž λ‚˜λˆ  λ¨ΉκΈ° (2)

Problem Description 머쓱이넀 ν”Όμžκ°€κ²ŒλŠ” ν”Όμžλ₯Ό μ—¬μ„― 쑰각으둜 잘라 μ€λ‹ˆλ‹€. ν”Όμžλ₯Ό λ‚˜λˆ λ¨Ήμ„ μ‚¬λžŒμ˜ 수 n이 λ§€κ°œλ³€μˆ˜λ‘œ μ£Όμ–΄μ§ˆ λ•Œ, nλͺ…이 μ£Όλ¬Έν•œ ν”Όμžλ₯Ό 남기지 μ•Šκ³  λͺ¨λ‘ 같은 수의 ν”Όμž 쑰각을 λ¨Ήμ–΄μ•Ό ν•œλ‹€λ©΄ μ΅œμ†Œ λͺ‡ νŒμ„ μ‹œμΌœμ•Ό ν•˜λŠ”μ§€λ₯Ό return ν•˜λ„λ‘ solution ν•¨μˆ˜λ₯Ό μ™„μ„±ν•΄λ³΄μ„Έμš”. Restrictions. 1 ≤ n ≤ 100 Input/Output Example μž…μΆœλ ₯ 예 #1 6λͺ…이 λͺ¨λ‘ 같은 양을 λ¨ΉκΈ° μœ„ν•΄ ν•œ νŒμ„ μ‹œμΌœμ•Ό ν”Όμžκ°€ 6쑰각으둜 λͺ¨λ‘ ν•œ 쑰각씩 먹을 수 μžˆμŠ΅λ‹ˆλ‹€. μž…μΆœλ ₯ 예 #2 10λͺ…이 λͺ¨λ‘ 같은 양을 λ¨ΉκΈ° μœ„ν•΄ μ΅œμ†Œ 5νŒμ„ μ‹œμΌœμ•Ό ν”Όμžκ°€ 30쑰각으둜 λͺ¨λ‘ μ„Έ 쑰각씩 먹을 수 μžˆμŠ΅λ‹ˆλ‹€. μž…μΆœλ ₯ 예 #3 4λͺ…이 λͺ¨λ‘ 같은 양을 λ¨ΉκΈ° μœ„ν•΄ μ΅œμ†Œ 2νŒμ„ μ‹œν‚€λ©΄ ..

λ°˜μ‘ν˜•