๋ฐ˜์‘ํ˜•

๐Ÿ‘ป OS & Tools 33

/etc/profile, /etc/bash.bashrc, ~/.bashrc, ~/.bash_profile ํŒŒ์ผ์˜ ์ฐจ์ด์ 

์œ ์ €๊ฐ€ ๋กœ๊ทธ์ธํ•  ๋•Œ, ๋‹ค์Œ๊ณผ ๊ฐ™์€ ์ˆœ์„œ๋กœ bash ์„ค์ •ํŒŒ์ผ๋“ค์„ ์ฝ๊ฒŒ ๋œ๋‹ค. 1. /etc/profile ์‹คํ–‰: ์‹œ์Šคํ…œ ์ „์—ญ์— ๋Œ€ํ•œ ํ™˜๊ฒฝ์„ค์ •. ์ผ๋ฐ˜์ ์œผ๋กœ ๋‹ค์Œ์„ ์ˆ˜ํ–‰ํ•œ๋‹ค. - `/etc/bash.bashrc` ์‹คํ–‰ → ์‹œ์Šคํ…œ ์ „์ฒด์˜ non-login shell ํ™˜๊ฒฝ์„ค์ • - `/etc/profile.d` ๋””๋ ‰ํ† ๋ฆฌ ์•ˆ์˜ ์ถ”๊ฐ€ ์„ค์ • ์Šคํฌ๋ฆฝํŠธ๋ฅผ ์‹คํ–‰. 2. ~/.bash_profile, ~/.bash_login, ~/.profile ์ค‘ ํ•˜๋‚˜ ์‹คํ–‰: ๊ฐœ์ธ ํ™˜๊ฒฝ ์„ค์ • - ์ผ๋ฐ˜์ ์œผ๋กœ `~/.bashrc`๋ฅผ ์‹คํ–‰ํ•œ๋‹ค - ์ด๋ ‡๊ฒŒ ํ•˜๋ฉด login shell๊ณผ non-login shell ๋ชจ๋‘์—์„œ `~/.bashrc`๋ฅผ ์‚ฌ์šฉํ•  ์ˆ˜ ์žˆ๋‹ค.

ํด๋”๋ณ„๋กœ ํ™˜๊ฒฝ๋ณ€์ˆ˜๋ฅผ ์„ค์ •ํ•  ์ˆ˜ ์žˆ๋Š” direnv

https://github.com/direnv/direnv GitHub - direnv/direnv: unclutter your .profile unclutter your .profile. Contribute to direnv/direnv development by creating an account on GitHub. github.com direnv๋Š” ํด๋”๋ณ„๋กœ ํ™˜๊ฒฝ๋ณ€์ˆ˜๋ฅผ ๋‹ค๋ฅด๊ฒŒ ์„ค์ •ํ•  ์ˆ˜ ์žˆ๋Š” ํˆด์ด๋‹ค. 1. ์„ค์น˜๋ฐฉ๋ฒ• apt-get install direnv #Linux brew install direnv #MacOS 2. shell์— hook ์„ค์ • ์‚ฌ์šฉํ•˜๋Š” shell์˜ ์ข…๋ฅ˜์— ๋”ฐ๋ผ hook์„ ์„ค์ •ํ•ด ์ฃผ์–ด์•ผ ํ•œ๋‹ค. 2.1. bash vi ~/.bashrc #๋งจ ์•„๋ž˜์— ๋‹ค์Œ ๋‚ด์šฉ ์ถ”๊ฐ€ eval "$(dir..

VSCode ์œ ์šฉํ•œ ๋‹จ์ถ•ํ‚ค ๋ชจ์Œ

VSCode ๋‹จ์ถ•ํ‚ค ์„ค์ •์€ ์ขŒ์ธกํ•˜๋‹จ [Manage] ๋ฒ„ํŠผ์„ ๋ˆŒ๋Ÿฌ [Keyboard Shortcuts]๋กœ ๋“ค์–ด๊ฐˆ ์ˆ˜ ์žˆ๋‹ค. 1. Go to File (Windows: ctrl+p / Mac: cmd+p) ํŒŒ์ผ๋ช…์„ ๊ฒ€์ƒ‰ํ•ด์„œ ๋ฐ”๋กœ openํ•  ์ˆ˜ ์žˆ๋‹ค. 2. Go to Line/Column (Windows: ctrl+g / Mac: cmd+g) ํŠน์ • ๋ผ์ธ์œผ๋กœ ๋ฐ”๋กœ ์ด๋™ํ•  ์ˆ˜ ์žˆ๋‹ค. 3. Toggle Vertical/Horizontal Editor Layout (Windows: alt+ctrl+o / Mac: alt+cmd+o) ์—๋””ํ„ฐ ๊ทธ๋ฃน์„ transposeํ•  ์ˆ˜ ์žˆ๋‹ค. ์˜ˆ๋ฅผ ๋“ค์–ด, ์œ„์•„๋ž˜๋กœ ๊ทธ๋ฃน์ด ๋ฐฐ์น˜๋˜์–ด ์žˆ์—ˆ์œผ๋ฉด ์ขŒ์šฐ ๋ฐฐ์น˜๋กœ ์ „ํ™˜ํ•  ์ˆ˜ ์žˆ๋‹ค.

TeX ํŒŒ์ผ์˜ ๋ณ€๊ฒฝ์‚ฌํ•ญ์„ ๋ณด์—ฌ์ฃผ๋Š” LatexDiff ์„ค์น˜๋ฐฉ๋ฒ•๊ณผ ์‚ฌ์šฉ๋ฒ• (Windows)

์ €๋„์—์„œ ๋ฆฌ๋น„์ „ ์‹œ ๋…ผ๋ฌธ์˜ ๋ณ€๊ฒฝ์‚ฌํ•ญ์ด ํ‘œ์‹œ๋œ ํŒŒ์ผ์„ ์š”๊ตฌํ•  ๋•Œ๊ฐ€ ์žˆ๋‹ค. ์›Œ๋“œ์˜ ๊ฒฝ์šฐ 'track change' ๊ธฐ๋Šฅ์„ ์ด์šฉํ•˜๋ฉด ๋˜๋Š”๋ฐ, LaTeX์˜ ๊ฒฝ์šฐ๋Š” LatexDiff๋ผ๋Š” ํ”„๋กœ๊ทธ๋žจ์„ ์ด์šฉํ•  ์ˆ˜ ์žˆ๋‹ค. LatexDiff๋ฅผ ์ด์šฉํ•˜๋ฉด ์•„๋ž˜์™€ ๊ฐ™์ด ๋ณ€๊ฒฝ์‚ฌํ•ญ์ด ํ‘œ์‹œ๋œ tex ํŒŒ์ผ์ด ์ƒ์„ฑ๋œ๋‹ค. ์„ค์น˜๋ฐฉ๋ฒ• ๋‹ค์Œ ๋งํฌ์—์„œ latexdiff.zip ํŒŒ์ผ์„ ๋‹ค์šด๋กœ๋“œ ๋ฐ›์•„ ์••์ถ•์„ ํ•ด์ œํ•œ๋‹ค. ๋‹ค์šด๋กœ๋“œ ๋งํฌ: https://www.ctan.org/pkg/latexdiff CTAN: Package latexdiff latexdiff – Determine and mark up significant differences between LaTeX files Latexdiff is a Perl script for visual mar..

Git Stash - ๋ณ€๊ฒฝ๋œ ํŒŒ์ผ๋“ค์„ ์ž„์‹œ ์ €์žฅํ•˜๊ธฐ

git stash ๋ช…๋ น์–ด๋ฅผ ์ด์šฉํ•ด ์ž‘์—…์ค‘์ด๋˜ ๋ณ€๊ฒฝ์‚ฌํ•ญ๋“ค์„ ์ž„์‹œ๋กœ ์ €์žฅํ•  ์ˆ˜ ์žˆ๋‹ค. git status ๋ช…๋ น์–ด๋ฅผ ์ด์šฉํ•˜๋ฉด stage์— ์žˆ๋Š” ํŒŒ์ผ๋“ค์˜ ๋ชฉ๋ก์„ ํ™•์ธํ•  ์ˆ˜ ์žˆ๋‹ค. ์ด๋“ค์€ tracked์ด๋ฉด์„œ modified ์ƒํƒœ์ด๊ฑฐ๋‚˜, ์ƒˆ๋กญ๊ฒŒ stage์— ์ถ”๊ฐ€๋œ ํŒŒ์ผ๋“ค์ด๋‹ค. $ git status Changes to be committed: (use "git reset HEAD ..." to unstage) modified: index.html Changes not staged for commit: (use "git add ..." to update what will be committed) (use "git checkout -- ..." to discard changes in working directory) ..

Git commit ์ •ํ™•ํ•œ ์‹œ๊ฐ„ ํ™•์ธํ•˜๊ธฐ

Github์—์„œ commitํ•œ ์‹œ๊ฐ„์ด ํ‘œ์‹œ๋ ๋•Œ '6 days ago' ์™€ ๊ฐ™์ด ๋‚˜ํƒ€๋‚œ๋‹ค. ์ด๋•Œ '6 days ago' ๋ถ€๋ถ„์— ๋งˆ์šฐ์Šค๋ฅผ ์˜ฌ๋ฆฌ๋ฉด ์ •ํ™•ํ•œ ์‹œ๊ฐ„์ด ํ‘œ์‹œ๋œ๋‹ค. ๋ช‡์‹œ ๋ช‡๋ถ„์— commit์ด ๋˜์—ˆ๋Š”์ง€๋ฅผ ํ™•์ธํ•  ์ˆ˜ ์žˆ๋‹ค. ์ด์ƒ ์˜ค๋Š˜์˜ ๊ฟ€ํŒ ๐Ÿ‘

tar.gz ์••์ถ• ํ•ด์ œ ์‹œ not in gzip ์—๋Ÿฌ

tar.gz ํŒŒ์ผ์„ ์••์ถ•ํ•ด์ œํ•  ๋•Œ ๋ณดํ†ต ๋‹ค์Œ command๋ฅผ ์ด์šฉํ•˜๋Š”๋ฐ, tar -zxvf [filename.tar.gz] ๋‹ค์Œ๊ณผ ๊ฐ™์€ ์—๋Ÿฌ๊ฐ€ ๋œจ๋ฉด์„œ ์••์ถ•ํ•ด์ œ๊ฐ€ ์•ˆ๋  ๋•Œ๊ฐ€ ์žˆ๋‹ค. ์ด ๊ฒฝ์šฐ ํŒŒ์ผ์ด๋ฆ„์€ .tar.gz๋กœ ๋˜์–ด ์žˆ์ง€๋งŒ gzip ํฌ๋งท์œผ๋กœ ์••์ถ•๋˜์ง€ ์•Š์•˜์„ ์ˆ˜ ์žˆ๋‹ค. ๋‹ค์Œ command๋กœ ์ด๋ฅผ ํ™•์ธํ•  ์ˆ˜ ์žˆ๋‹ค. file [filename.tar.gz] ํŒŒ์ผ์ด tar ํ˜•์‹์œผ๋กœ๋งŒ ์••์ถ•๋œ ๊ฒƒ์„ ํ™•์ธํ•  ์ˆ˜ ์žˆ๋‹ค. ๋”ฐ๋ผ์„œ ์ด ๊ฒฝ์šฐ ๋‹ค์Œ command๋กœ ์••์ถ•์„ ํ•ด์ œํ•  ์ˆ˜ ์žˆ๋‹ค. tar -xvf [filename.tar.gz] ์ฐธ๊ณ : https://www.linuxfordevices.com/tutorials/linux/solved-gzip-stdin-not-in-gzip-format [SOLVED] gzip: s..

VSCode ๊พธ๋ฏธ๊ธฐ

์˜ˆ์œ ์Šคํ‚จ์„ ๊ฐ–์ถ”์ง€ ์•Š์œผ๋ฉด ์ฝ”๋”ฉ์„ ๋ชปํ•˜๋Š” ๋‚˜.. ์ •์ƒ์ธ๊ฐ€์š”? ์‹ฌ์ง€์–ด ๋‚˜๊ฐ™์€ ์‚ฌ๋žŒ๋“ค์€ ์•„๋ฌด๋ฆฌ ์˜ˆ์˜๊ฒŒ ์Šคํ‚จ์„ ์™„์„ฑ์‹œ์ผฐ์–ด๋„ ์ฃผ๊ธฐ์ ์œผ๋กœ ๋” ์˜ˆ์˜๊ฒŒ ๋ฐœ์ „์‹œ์ผœ์•ผ ๋˜๋Š” ๊ทธ๋Ÿฐ ๋ณ‘์ด ์žˆ๋‹ค. ์ด๋ฒˆ์—” ์–ด๋–ป๊ฒŒ VSCode๋ฅผ ๋˜ ๊พธ๋ฉฐ๋ณผ๊นŒ ํ•˜๋‹ค๊ฐ€ ๋ฐœ๊ฒฌํ•œ ์˜ˆ์œ extension ๋‘๊ฐ€์ง€๋ฅผ ์†Œ๊ฐœํ•ฉ๋‹ˆ๋‹ค 1. vscode-icons https://marketplace.visualstudio.com/items?itemName=vscode-icons-team.vscode-icons vscode-icons - Visual Studio Marketplace Extension for Visual Studio Code - Icons for Visual Studio Code marketplace.visualstudio.com ํŒŒ์ผ ์•„์ด์ฝ˜์„ ์•Œ๋ก๋‹ฌ๋กํ•˜..

LaTeX figure ๋„ฃ๊ธฐ

LaTex์—์„œ figure์„ ์‚ฌ์šฉํ•˜๊ธฐ ์œ„ํ•ด์„œ๋Š” graphics package๋ฅผ ์„ ์–ธํ•ด์•ผ ํ•œ๋‹ค. \usepackage{graphicx} LaTeX์— ๋“ค์–ด๊ฐ€๋Š” figure์€ ์ผ๋ฐ˜์ ์œผ๋กœ ๋‹ค์Œ๊ณผ ๊ฐ™์ด ๊ตฌ์„ฑ๋œ๋‹ค. \begin{figure}[!t] \centerline{\includegraphics[width=\columnwidth]{figure.png}} \caption{This is the first figure.} \label{figure_1} \end{figure} Figure์˜ ๋‚ด์šฉ์€ \begin{figure} ๊ณผ \end{figure} ์‚ฌ์ด์— ์œ„์น˜ํ•œ๋‹ค. [!t]๋Š” figure์ด ๋†“์ผ ์ˆ˜ ์žˆ๋Š” ์œ„์น˜๋ฅผ ์˜๋ฏธํ•œ๋‹ค. ๋‹ค์Œ ์ค‘ ํ•˜๋‚˜ ์ด์ƒ์˜ option์„ ์‚ฌ์šฉํ•  ์ˆ˜ ์žˆ๋‹ค. ๋‹จ, ์ˆœ์„œ๋Œ€๋กœ ์ ์šฉ๋˜๋Š” ๊ฒƒ์€ ์•„๋‹ˆ๋‹ค. ๋Œ€๋ถ€..

Mac์—์„œ fn ๋ณด์กฐ ํ‚ค ๋ณ€๊ฒฝ fn+ํ™”์‚ดํ‘œ ๋‹จ์ถ•ํ‚ค (PageUp, PageDown, Home, End) ์ž‘๋™ ์•ˆํ•  ๋•Œ

์œˆ๋„์šฐ๋ฅผ 2x๋…„ ์จ์˜ค๋˜ ๋‚˜.. ๋งฅ๋ถ์— ๋„์ €ํžˆ ์ ์‘์„ ๋ชปํ•ด์„œ ์˜จ๊ฐ– ์„ค์ •์„ ๋‹ค ๋ฐ”๊พธ๋‹ค๊ฐ€ command ์™€ fn ํ‚ค๋ฅผ ๋ฐ”๊ฟจ๋Š”๋ฐ, ์ด๋ ‡๊ฒŒ ํ–ˆ์„ ๋•Œ์˜ ๋ฌธ์ œ๋Š” fn+ํ™”์‚ดํ‘œ ๋‹จ์ถ•ํ‚ค๊ฐ€ ์ž‘๋™์„ ์•ˆํ•˜๋Š” ๊ฒƒ์ด์—ˆ๋‹ค.. ์›๋ž˜ fn+ํ™”์‚ดํ‘œ ๋‹จ์ถ•ํ‚ค๊ฐ€ PageUp, PageDown, Home, End ๊ธฐ๋Šฅ์œผ๋กœ ๋งคํ•‘๋˜์–ด ์žˆ๋‹ค. ๋‚˜๋Š” command ํ‚ค์™€ fn ํ‚ค๋ฅผ ๋ฐ”๊ฟจ์œผ๋‹ˆ ์ด ๊ธฐ๋Šฅ์ด command+ํ™”์‚ดํ‘œ ๋‹จ์ถ•ํ‚ค๋กœ ๋งคํ•‘๋˜์•ผ ํ•˜๋Š”๋ฐ ์ด๊ฒŒ ์•ˆ๋จ.. ๊ตฌ๊ธ€์„ ๋ฏธ์นœ๋“ฏ์ด ๋’ค์ ธ์„œ DefaultKeyBinding.dict๋„ ํ•ด๋ณด๊ณ  ์˜จ๊ฐ– ๋ฐฉ๋ฒ•์„ ๋‹ค ์จ๋ดค๋Š”๋ฐ ํ•ด๊ฒฐ์ด ์•ˆ๋ผ์„œ command๋ฅผ control๋กœ ๋ฐ”๊ฟ” ๋ณด๊ธฐ๋„ ํ–ˆ์œผ๋‚˜ ๋ถˆํŽธํ•ด์„œ ๋‹ค ํฌ๊ธฐ.. ๋‚œ ๋ณต์‚ฌ ๋ถ™ํ˜€๋„ฃ๊ธฐ ๋“ฑ๋“ฑ์˜ ๋‹จ์ถ•ํ‚ค๋ฅผ ์ด์šฉํ• ๋ ค๋ฉด ๋ฌด์กฐ๊ฑด command๊ฐ€ ๊ฐ€์žฅ ์™ผ์ชฝ์— ์žˆ์–ด์•ผ ํ•œ๋‹ค. ํ•˜์ง€๋งŒ ๋‚œ ์˜์ง€์˜..

๋ฐ˜์‘ํ˜•