Skip to content

Instantly share code, notes, and snippets.

View rlaace423's full-sized avatar
🏠
Working from home

Sam (Sangho Kim) rlaace423

🏠
Working from home
View GitHub Profile
@rlaace423
rlaace423 / install-aws-cli.sh
Created February 28, 2025 08:49
install aws-cli in Alpine Linux
# Python 이 μ—†λ‹€λ©΄ μ„€μΉ˜
apk add --update --no-cache python3 python3-dev py3-pip build-base
# aws-cli μ„€μΉ˜
AWSCLI_VERSION=2.24.14
export CFLAGS="-Wno-error=incompatible-pointer-types" # ruamel.yaml.clib λΉŒλ“œ μ—λŸ¬ λ•Œλ¬Έμ— ν•„μš”
apk add --no-cache \
curl \
make \
@rlaace423
rlaace423 / .zshrc
Last active June 26, 2025 13:32
2024 ArchLinux
### key binding - Home, End, Ctrl-left, Ctrl-Right
case $TERM in (xterm*)
## Common
bindkey '^[[H' beginning-of-line
bindkey '^[[F' end-of-line
## Linux
bindkey ';5D' backward-word
bindkey ';5C' forward-word
bindkey '^[[3~' delete-char
## macOS
version: "3.9"
services:
mongo:
image: mongo:4.4
container_name: mongo
networks:
- mongo
ports:
- "27017:27017"
volumes:
# 계정 μΆ”κ°€
use admin
db.createUser({ user: 'root', pwd: 'Hello#$', roles: ['root'] });
use bitcore
db.createUser({ user: 'bitcore', pwd: 'Hello2024#$', roles: ['dbOwner'] });
# λΉ„λ°€λ²ˆν˜Έ λ³€κ²½
db.changeUserPassword(username, password)
ssh -ND 1080 root@somewhere-ssh-server -p 22
# 이후 창을 끄지 말고 μΌœλ‘”λ‹€
# 이제 MacOS, datagrip의 ssh 터널 μ„€μ • λ“±μ—μ„œ
# localhost, 1080 포트둜 SOCK5 ν”„λ‘μ‹œ μ„œλ²„μ— μž…λ ₯ν•˜λ©΄ 됨
version: "3.9"
services:
nextcloud:
image: arm64v8/nextcloud
restart: always
container_name: nextcloud
ports:
- "10000:80"
networks:
sudo apt install fcitx-hangul
im-config μ‹€ν–‰
OK -> Yes λ₯Ό 눌러 선택화면 μ§„μž…
fcitx 선택 ν›„ OK -> OK
.bashrc λ˜λŠ” .zshrc 에 μ•„λž˜ λ‚΄μš© μΆ”κ°€
export QT_IM_MODULE=fcitx
export GTK_IM_MODULE=fcitx
export XMODIFIERS=@im=fcitx
@rlaace423
rlaace423 / .redis_password
Last active August 25, 2023 21:01
redis docker μ„€μ •
very_strong_password
@rlaace423
rlaace423 / add-user.sh
Last active March 21, 2024 02:31
mysql docker μ„€μ • (with MacOS M1 Chip)
mysql -u root -p
# 1. user μΆ”κ°€
create user '아이디'@'%' identified by 'λΉ„λ°€λ²ˆν˜Έ';
grant all privileges on DB이름.* to '아이디'@'%';
λ˜λŠ”
grant select, insert, update on DB이름.* to '아이디'@'%';
FLUSH PRIVILEGES;
@rlaace423
rlaace423 / create-bitcoin-address.ts
Created November 24, 2021 14:12
create bitcoin address (native nodejs)
import { createECDH } from 'crypto';
import { p2wpkh } from 'bitcoinjs-lib/src/payments';
import { bitcoin } from 'bitcoinjs-lib/src/networks';
import { Buffer } from 'buffer';
import { encode } from 'wif';
const network = bitcoin;
const ecdh = createECDH('secp256k1');
ecdh.generateKeys();