<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
    <channel>
        <title>devbinx_.log</title>
        <link>https://velog.io/</link>
        <description>Archive용 velog, 직접 보고 경험한 것들을 저장합니다.</description>
        <lastBuildDate>Thu, 21 Sep 2023 05:38:16 GMT</lastBuildDate>
        <docs>https://validator.w3.org/feed/docs/rss2.html</docs>
        <generator>https://github.com/jpmonette/feed</generator>
        <image>
            <title>devbinx_.log</title>
            <url>https://velog.velcdn.com/images/devbinx_/profile/f0763573-b642-40b1-ae5a-1fb8d9ebb3f4/social_profile.jpeg</url>
            <link>https://velog.io/</link>
        </image>
        <copyright>Copyright (C) 2019. devbinx_.log. All rights reserved.</copyright>
        <atom:link href="https://v2.velog.io/rss/devbinx_" rel="self" type="application/rss+xml"/>
        <item>
            <title><![CDATA[[Git] Git Crediential을 이용한 pull/push ID/Token 캐싱]]></title>
            <link>https://velog.io/@devbinx_/Git-Git-Crediential%EC%9D%84-%EC%9D%B4%EC%9A%A9%ED%95%9C-pullpush-IDToken-%EC%BA%90%EC%8B%B1</link>
            <guid>https://velog.io/@devbinx_/Git-Git-Crediential%EC%9D%84-%EC%9D%B4%EC%9A%A9%ED%95%9C-pullpush-IDToken-%EC%BA%90%EC%8B%B1</guid>
            <pubDate>Thu, 21 Sep 2023 05:38:16 GMT</pubDate>
            <description><![CDATA[<p>GitHub에서 <code>Personal access tokens</code>을 발급받고 저장소 Pull/Push를 하던 중, 작업 할 때마다 ID/Token을 입력하는게 너무 번거로워 구글링을 통해 찾은 해결책을 공유합니다.</p>
<hr>
<p>Git의 <code>crediential</code>이란 말 그대로 계정 정보를 의미합니다.</p>
<p>저장소에 push / pull을 할 때마다 해당 저장소를 이용할 수 있는 권한이 필요한데, crediential에 계정 정보를 저장해 놓으면 저장소를 이용할 때마다 로그인할 필요가 없게 됩니다.</p>
<pre><code class="language-shell">$ git config credential.helper store # 위 명령을 수행후 push 또는 pull을 수행
$ git push http://example.com/repo.git # 맨 처음은 ID와 토큰이 필요
Username: &lt;type your username&gt;
Password: &lt;type your password&gt;
[... time goes on ...]
$ git push http://example.com/repo.git # 이후에는 자동으로 원격 저장소 접근 가능</code></pre>
<p><code>creidential.helper</code>에 다음과 같이 cache 시간을 초단위로 지정할 수도 있습니다.</p>
<pre><code class="language-shell">$ git config --global credential.helper &#39;cache --timeout=3600&#39; // 1시간 동안 캐시 유지</code></pre>
<blockquote>
<p>Ref : <a href="https://jw910911.tistory.com/121">Git : github 개인 엑세스 토큰 발급 / Git Crediential을 이용하여 원격저장소에 처음 한번만 로그인하도록 계정정보 캐싱</a></p>
</blockquote>
]]></description>
        </item>
        <item>
            <title><![CDATA[[Terminal] zsh 쉘과 oh-my-zsh로 터미널 세팅하기]]></title>
            <link>https://velog.io/@devbinx_/zsh-%EC%89%98%EA%B3%BC-oh-my-zsh%EB%A1%9C-%ED%84%B0%EB%AF%B8%EB%84%90-%EC%84%B8%ED%8C%85%ED%95%98%EA%B8%B0</link>
            <guid>https://velog.io/@devbinx_/zsh-%EC%89%98%EA%B3%BC-oh-my-zsh%EB%A1%9C-%ED%84%B0%EB%AF%B8%EB%84%90-%EC%84%B8%ED%8C%85%ED%95%98%EA%B8%B0</guid>
            <pubDate>Wed, 20 Sep 2023 03:21:26 GMT</pubDate>
            <description><![CDATA[<p><img src="https://velog.velcdn.com/images/devbinx_/post/27dcb658-5f5a-4d65-a888-848e174760e1/image.png" alt=""></p>
<p>항상 기본 터미널과 쉘만 쓰다가 며칠 전에 <strong>zsh</strong>와 <strong>oh-my-zsh</strong>의 플러그인을 접하고 신세계를 경험해서 (...) 글을 남깁니다.</p>
<blockquote>
<p><em>oh-my-zsh는 기본적으로 <strong>Mac</strong>과 <strong>Linux</strong>에서 동작합니다.
윈도우 환경애서는 WSL이나 Windows 용 Ubuntu를 설치하여 사용할 수 있습니다.</em></p>
</blockquote>
<h2 id="1-🖥️-zsh-및-oh-my-zsh-설치하기">1. 🖥️ zsh 및 oh-my-zsh 설치하기</h2>
<p><strong>⌨️ zsh 설치하기</strong></p>
<pre><code class="language-shell"># zsh 설치
sudo apt install zsh

# 설치경로 확인
which zsh
#=&gt; /usr/bin/zsh

# 기본 sh 변경
sudo chsh -s $(which zsh)</code></pre>
<p><strong>⌨️ oh-my-zsh 설치</strong></p>
<pre><code class="language-shell"># git wget curl 세 가지 패키지가 설치되어 있어야 함.

# oh-my-zsh 설치
sh -c &quot;$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)&quot;</code></pre>
<h2 id="2-🎨-커스터마이징">2. 🎨 커스터마이징</h2>
<h3 id="21-테마-변경">2.1 테마 변경</h3>
<p><a href="https://github.com/ohmyzsh/ohmyzsh/wiki/Themes">테마목록</a></p>
<p>테마 목록을 보고 바꿀 테마를 고르면 됩니다.
해당 포스트에서 사용한 테마는 <strong>agnoster</strong> 테마로, 현재 CheckOut 중인 Branch를 쉽게 알 수 있는 테마입니다.</p>
<pre><code class="language-shell"># 텍스트 편집기로 .zshrc 오픈
vim ~/.zshrc</code></pre>
<p>텍스트 에디터에서 <code>ZSH_THEME</code> 부분을 선택한 테마의 이름으로 변경하고 저장합니다.</p>
<p><img src="https://velog.velcdn.com/images/devbinx_/post/e336b098-ca43-4d2d-b282-8a8fedf783dd/image.png" alt=""></p>
<h3 id="2-2-폰트-변경">2-2. 폰트 변경</h3>
<p>테마를 바꾸고 터미널을 재실행하면 폰트가 깨져있을 겁니다.</p>
<p>깨지지 않는 폰트로 변경해야 하는데, 폰트 변경 방법은 터미널마다 방법이 다르기 때문에 본인 터미널의 폰트 변경 방법에 맞게 폰트를 변경하시면 됩니다.</p>
<p>저는 <a href="https://github.com/naver/d2codingfont">D2Coding</a> 폰트를 사용했습니다.</p>
<h2 id="3-플러그인-plugin-설치">3. 플러그인 (Plugin) 설치</h2>
<p>zsh는 다양한 플러그인을 지원합니다. 그 중에서도 <code>zsh-autosuggestions</code>과 <code>zsh-syntax-highlighter</code> 가 아무래도 가장 많이 쓰이는 것 같습니다.</p>
<p><code>zsh-autosuggestions</code> 은 이전에 사용한 명령어를 추천해주어 자동완성해주는 플러그인이고, <code>zsh-syntax-highlighter</code>은 문법 하이라이트 플러그인입니다.</p>
<p><strong><a href="https://github.com/zsh-users/zsh-autosuggestions">zsh-autosuggestions</a>
<a href="https://github.com/zsh-users/zsh-syntax-highlighting">zsh-syntax-highlighter</a></strong></p>
<p>git 명령어로 oh-my-zhs의 플러그인 디렉토리로 클론합니다.</p>
<pre><code class="language-shell"># zsh-autosuggestions
git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions

# zsh-syntax-highlighter
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting</code></pre>
<p>텍스트 에디터에서 <code>plugins=()</code> 부분에 플러그인 경로를 추가합니다.</p>
<pre><code class="language-shell"># 텍스트 편집기로 .zshrc 오픈
vim ~/.zshrc</code></pre>
<pre><code class="language-shell">plugins=( 
    # other plugins...
    zsh-autosuggestions
    zsh-syntax-highlighting
)</code></pre>
<p><img src="https://velog.velcdn.com/images/devbinx_/post/56a53928-f9ca-4395-9fe9-e85f3d740d00/image.png" alt=""></p>
<h2 id="4-🎉완성">4. 🎉완성!</h2>
<p><img src="https://velog.velcdn.com/images/devbinx_/post/b65067cf-5a50-448f-9c3e-23dc27d878c7/image.png" alt=""></p>
<p><strong>Reference</strong>
<a href="https://danaing.github.io/etc/2022/03/28/M1-mac-iTerm2-setting.html">https://danaing.github.io/etc/2022/03/28/M1-mac-iTerm2-setting.html</a>
<a href="https://tutorialpost.apptilus.com/code/posts/tools/mac-cli-with-iterm2-zsh/">https://tutorialpost.apptilus.com/code/posts/tools/mac-cli-with-iterm2-zsh/</a></p>
]]></description>
        </item>
        <item>
            <title><![CDATA[[MacOS] 운영체제에서 hosts 파일 변경 방법]]></title>
            <link>https://velog.io/@devbinx_/MacOS-%EC%9A%B4%EC%98%81%EC%B2%B4%EC%A0%9C%EC%97%90%EC%84%9C-hosts-%ED%8C%8C%EC%9D%BC-%EB%B3%80%EA%B2%BD-%EB%B0%A9%EB%B2%95</link>
            <guid>https://velog.io/@devbinx_/MacOS-%EC%9A%B4%EC%98%81%EC%B2%B4%EC%A0%9C%EC%97%90%EC%84%9C-hosts-%ED%8C%8C%EC%9D%BC-%EB%B3%80%EA%B2%BD-%EB%B0%A9%EB%B2%95</guid>
            <pubDate>Tue, 19 Sep 2023 06:01:48 GMT</pubDate>
            <description><![CDATA[<p>vi, vim 등과 같은 텍스트 에디터로 hosts 파일을 편집툴로 오픈합니다.</p>
<pre><code class="language-shell">$ sudo vi /etc/hosts</code></pre>
<p>파일 내용을 수정 후, ESC를 누르고 :wq 를 입력하면 저장이 됩니다.</p>
<pre><code>127.0.0.1       localhost
255.255.255.255 broadcasthost
::1             localhost</code></pre><p>터미널에서 아래 명령으로 캐시를 갱신하면 수정한 호스트 파일이 바로 적용됩니다.</p>
<pre><code class="language-shell">$ dscacheutil -flushcache</code></pre>
<p>출처 : <a href="https://goateedev.tistory.com/267">https://goateedev.tistory.com/267</a></p>
]]></description>
        </item>
        <item>
            <title><![CDATA[[MacOS] iTerm2 화면 분할]]></title>
            <link>https://velog.io/@devbinx_/iTerm2-%ED%99%94%EB%A9%B4-%EB%B6%84%ED%95%A0</link>
            <guid>https://velog.io/@devbinx_/iTerm2-%ED%99%94%EB%A9%B4-%EB%B6%84%ED%95%A0</guid>
            <pubDate>Tue, 19 Sep 2023 04:32:04 GMT</pubDate>
            <description><![CDATA[<p>맥 OS에서 많이 쓰이는 iTerm2을 사용 중인데,
동일한 구조의 여러 대의 서버 터미널에 접근 및 작업 시 유용합니다.</p>
<p><strong>1. 좌우 분할 (Shell &gt; Split Vertically with Current Profile)</strong></p>
<ul>
<li>command + d</li>
</ul>
<p><strong>2. 상하 분할 (Shell &gt; Split Horizontally with Current Profile)</strong></p>
<ul>
<li>command + shift + d</li>
</ul>
<p><strong>3. 현재 탭 모든 분할 화면 동시 입력</strong></p>
<ul>
<li><p>command + alt + i</p>
</li>
<li><p>(해제) shift + command + alt + i</p>
</li>
</ul>
<p><strong>4. 화면 이동</strong></p>
<ul>
<li>command + alt + 화살표</li>
</ul>
<p>출처 : <a href="https://huzz.tistory.com/26">https://huzz.tistory.com/26</a></p>
]]></description>
        </item>
    </channel>
</rss>