Skip to content

Instantly share code, notes, and snippets.

View 1eedaegon's full-sized avatar
Need more mocha =]

Gon ⌬ 1eedaegon

Need more mocha =]
  • Anywhere you want
  • 10:03 (UTC +09:00)
View GitHub Profile
@1eedaegon
1eedaegon / prevent-docker-failed.md
Last active April 26, 2024 05:36
When start failed docker on wsl2 ubuntu

Inspect log

Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running? See journal

journalctl -xeu docker

Nov 15 14:42:36 1eegram systemd[1]: Starting Docker Application Container Engine...
░░ Subject: A start job for unit docker.service has begun execution
░░ Defined-By: systemd
@1eedaegon
1eedaegon / get-remote.sh
Last active November 27, 2023 12:46
How to get git remote path without semi colon
# 1.
$(git remote -v | tail -1 | awk -F"@" '{print$2}' | awk -F".git" '{print$1}' | sed 's/:/\//g')
# 2.
$(git remote -v | sed -n '1p' | awk -F '@' '{print $2}' | sed -e 's/\:/\//g' | awk -F '.git' '{print $1}')
# example
❯ go mod init $(git remote -v | tail -1 | awk -F"@" '{print$2}' | awk -F".git" '{print$1}' | sed 's/:/\//g')
go: creating new go.mod: module github.com/1eedaegon/ory-practice
@1eedaegon
1eedaegon / reset-command-line-tool-path.md
Last active November 27, 2023 12:47
How to fix: No such file or directory command line tools

Because the CLI binary points to the wrong directory

I got No such file or directory [command line tools] after update MacOS to Sonoma

I got

> make --version
make: error: sh -c '/Users/daegonlee/Downloads/Xcode.app/Contents/Developer/usr/bin/xcodebuild -sdk '' -find make 2> /dev/null' failed with exit code 17920: (null) (errno=No such file or directory)
xcode-select: Failed to locate 'make', requesting installation of command line developer tools.
@1eedaegon
1eedaegon / how-to-curl-to-kubelet-on-minikube.md
Last active August 14, 2023 09:09
How to curl to kubelet on minikube

How to curl to kubelet on minikube

Directly

1. Connect inside conatiner

docker exec -it minikube bash

2. Request pods list to kubelet

@1eedaegon
1eedaegon / wsl2-with-docker-network.md
Last active August 17, 2023 12:07
wsl2 with docker desktop unable to connect to dns

Because docker desktop use subnet 192.168.65.0/24

Could not resolve DNS after start Docker desktop

curl www.naver.com
curl: (6) Could not resolve host: www.naver.com

Solution 1: Change docker desktop network cidr

@1eedaegon
1eedaegon / install-ngrok-wsl2.md
Created July 12, 2023 08:00
How to install ngrok on wsl2

Ngrok

Requirements

  • Windows 11
  • WSL 2

Installation

  1. Download ngrok
@1eedaegon
1eedaegon / enable-systemd-wsl2.md
Last active July 12, 2023 07:42
How to enable systemd on wsl2

Systemd

Requirements

  • Windows 11
  • WSL 2

Enable systemd option inside wsl2 instance

  1. Add inside /etc/wsl.conf:
@1eedaegon
1eedaegon / vim-go.md
Last active April 10, 2023 01:33
How to setup vim-go

1. Using Pathogen

git clone https://github.com/fatih/vim-go.git ~/.vim/bundle/vim-go

2. On vim

  • :GoInstallBinaries

3. If you got this error:

vim-go: could not find 'gopls'. Run :GoInstallBinaries to fix it

  • Check binary path: go env | grep GOBIN > ""
  • go get golang.org/x/tools/gopls@latest
@1eedaegon
1eedaegon / windows-update-61%-trouble-shooting.md
Last active November 30, 2022 07:39
Windows 포맷 후 업데이트 61% 문제

Windows 포맷 후 업데이트 61% 문제

#troubleshooting #windows #gram #포맷


메모:

윈도우 업데이트와 혈투 결과

Problem:

LG Gram windows 10 포맷 후 업데이트 61% 멈춤 문제

@1eedaegon
1eedaegon / simple-disk-management-using-lvm.md
Last active July 25, 2022 05:48
How to simple use LVM

How to manage disk simply using LVM2

Set up disks scalably

Pre-requirements

Install two packages

  • lvm2
  • xfs
> apt install lvm2
> apt install xfsprogs