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
  • 11:23 (UTC +09:00)
View GitHub Profile
@1eedaegon
1eedaegon / how-to-setup-airflow.service
Created April 10, 2025 03:13
how to setup airflow using systemd with venv
######### Ariflow Web #########
[Unit]
Description=Airflow Webserver
After=network.target
[Service]
User=1000
Group=1000
WorkingDirectory=/home/ec2-user/workspace/airflow-venv
Environment=AIRFLOW_HOME=/home/ec2-user/workspace/airflow-venv # venv path
@1eedaegon
1eedaegon / how-to-use-pip.sh
Created April 10, 2025 01:37
How to use pip in a Python environment installed with uv
#!/bin/bash
# 0. Install UV
# (Optional)using nix
# nix profile install github:1eedaegon/...s#py
wget -qO- https://astral.sh/uv/install.sh | sh
# 1. Install python
uv venv --python 3.12
@1eedaegon
1eedaegon / login-ecr.sh
Last active April 7, 2025 06:40
How to AWS ECR login using aws cli
#!/bin/sh
REGION=ap-northeast-2
$(aws ecr get-login --no-include-email --region $REGION)
# OR
# aws ecr get-login-password --region $REGION | docker login AWS --password-stdin [NUMBER].dkr.ecr.$REGION.amazonaws.com
@1eedaegon
1eedaegon / solve-using-systemd.md
Created April 26, 2024 05:39
/mnt/c/Users/[]/AppData/Local/Programs/Microsoft VS Code/bin/code: 61: /mnt/c/Users/[]/AppData/Local/Programs/Microsoft VS Code/Code.exe: Exec format error

Problem

When start vscode on WSL2 using "code" command

/mnt/c/Users/[PC NAME]/AppData/Local/Programs/Microsoft VS Code/bin/code: 61: /mnt/c/Users/[PC NAME]/AppData/Local/Programs/Microsoft VS Code/Code.exe: Exec format error

❯ code .
/mnt/c/Users/[]/AppData/Local/Programs/Microsoft VS Code/bin/code: 61: /mnt/c/Users/[]/AppData/Local/Programs/Microsoft VS Code/Code.exe: Exec format error

Solution

@1eedaegon
1eedaegon / solution.md
Last active April 24, 2024 07:55
solution: kubebuilder The CustomResourceDefinition "blah" is invalid: metadata.annotations: Too long: must have at most 262144 bytes

Trouble sample

like this: is invalid: metadata.annotations: Too long: must have at most 262144

make install # kubeduiler generated makefile

/home/lee-ubuntu/workspace/pipeline-operator/bin/kustomize-v5.3.0 build config/crd | kubectl apply -f -
customresourcedefinition.apiextensions.k8s.io/pipelines.pipeline.1eedaegon.github.io unchanged
customresourcedefinition.apiextensions.k8s.io/tasks.pipeline.1eedaegon.github.io unchanged
The CustomResourceDefinition "runs.pipeline.1eedaegon.github.io" is invalid: metadata.annotations: Too long: must have at most 262144 bytes
@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