Skip to content

Instantly share code, notes, and snippets.

View iamjjanga-ouo's full-sized avatar
🐵
i can do this all day

LeeSihyung iamjjanga-ouo

🐵
i can do this all day
View GitHub Profile
VERSION=1.22.4
ARCH=amd64
wget "https://go.dev/dl/go${VERSION}.linux-${ARCH}.tar.gz"
rm -rf /usr/local/go && tar -C /usr/local -xzf "go${VERSION}.linux-${ARCH}.tar.gz"
echo 'export PATH=$PATH:/usr/local/go/bin' | tee -a ~/.bashrc
source ~/.bashrc
@iamjjanga-ouo
iamjjanga-ouo / snippets.md
Last active May 15, 2024 07:01
[github-pages] hugo commands

Debug

  • $ hugo server or $ hugo server -D http://localhost:1313/에서 디버그 용도로 사용(watch files)
    • -D 옵션은 draft로 실행됨

Write contents

  • $ hugo new post/test1.md 명령으로 파일을 생성하면 \content\post\test1.md에 생성
@iamjjanga-ouo
iamjjanga-ouo / create-aws-ecr-authentication-cronjob.md
Last active May 14, 2024 02:27 — forked from tuantranf/create-aws-ecr-authentication-cronjob.md
A Kubernetes cronjob to refresh ECR authentication

A Kubernetes cronjob to refresh ECR authentication

Create AWS secret

kubectl create secret generic aws-secret --from-literal=AWS_ACCOUNT= --from-literal=AWS_ACCESS_KEY_ID= --from-literal=AWS_SECRET_ACCESS_KEY= --from-literal=AWS_DEFAULT_REGION= --from-literal=AWS_REGION=

Create cronjob

@iamjjanga-ouo
iamjjanga-ouo / aws_login.yml
Created April 5, 2024 13:15 — forked from tedivm/aws_login.yml
AWS ECR Github Actions OIDC
jobs:
deploy:
name: Push to ECR
runs-on: ubuntu-latest
# These permissions are needed to interact with GitHub's OIDC Token endpoint.
permissions:
id-token: write
contents: read
@iamjjanga-ouo
iamjjanga-ouo / Vagrant-M1-Install.bash
Created January 1, 2024 08:20 — forked from beauwilliams/Vagrant-M1-Install.bash
Run x86 VM's on Mac M1 arm using vagrant with qemu hypervisor
brew install vagrant qemu
#Due to dependency errors, we must install vbguest first..
vagrant plugin install vagrant-vbguest
vagrant plugin install vagrant-qemu
#cd to working dir you like to keep your vagrant files
cd ~/VM-and-containers/VagrantMachines/M1-vagrantfiles/ubuntu18-generic-64/
#Create a vagrant file
$EDITOR Vagrantfile
@iamjjanga-ouo
iamjjanga-ouo / note.md
Last active July 3, 2022 00:14
linux `du` command examples #linux

du examples


find all files(include hidden) size in cwd

$ du -sch .[!.]* * |sort -h
# =======OUTPUT

get role

  • redis-cli
$ redis-cli -h <redis host> -p <port> info | grep role
role: master
@iamjjanga-ouo
iamjjanga-ouo / note.md
Last active May 19, 2022 14:50
pipenv

pipenv?

  • 파이썬에서도 패키지를 프로젝트 단위로 관리할 수 있도록 도와주는 패키지 관리 도구
  • 기본적으로 pip기반으로 동작
  • 프로젝트별 격리된 가상환경(virtual environment)제공

install

# mac
$ brew install pipenv
@iamjjanga-ouo
iamjjanga-ouo / note.md
Last active July 21, 2022 04:26
Docker snippets

TOC

  1. Resource Control

Resource control

change container CPU Quota

$ docker update --cpu-quota <INT> <Container ID | Container Name>

# show current cpu-quota
@iamjjanga-ouo
iamjjanga-ouo / terminal-capture.md
Created April 6, 2021 12:48 — forked from worldofprasanna/terminal-capture.md
Multiple screen terminal capture using asciinema & tmux

Commands Reference

  1. Start a new tmux named session tmux new -s terminal-capture
  2. Split the screen using these commands,
  • vertical split <C-b>"
  • horizontal split <C-b>%
  1. To navigate between the panes,
  • To goto Left pane <C-b> left-key
  • To goto Right pane <C-b> right-key
  • To goto Top pane up-key