alias nmap="nmap -p1-65535" alias restart="docker restart" alias down="docker compose down" alias up="docker compose down && docker compose up -d --remove-orphans && docker compose logs -f" alias prune="docker system prune -f" alias i="sudo apt-get install -y" alias cls="clear" alias rc="vi ~/.bash_aliases && tail ~/.bash_aliases && source ~/.bash_aliases" alias l='clear; echo "\x1b[92m$(pwd)\x1b[0m"; command ls -lh --color=auto' alias ls='clear; echo "\x1b[92m$(pwd)\x1b[0m"; command ls -alh --color=auto' alias ns="watch -n 0.1 nvidia-smi" alias ping="ping -c 2" alias rsync="rsync -avPh" log() { if [ $# -eq 0 ]; then docker compose logs -f else docker logs -f "$@" fi } alias wg="sudo wg" alias systemctl="sudo systemctl" alias service="sudo service" alias apt="sudo apt-get" alias chwon="sudo chown" alias reboot='sudo reboot' export HOMEBREW_NO_AUTO_UPDATE=1 export GOPATH=$HOME/go export PATH="/Users/w/.venv/bin:$PATH:$HOME/go/bin" export PATH="/home/w/hub/llama.cpp/build/bin:$PATH" export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:./build/bin export HF_TOKEN=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 export CLOUDFLARE_API_TOKEN=Pah8Q6hBUsQsKnKhaMJB2QvL-LHAWCcU8xti66Q3 dive(){ docker exec -it "$@" sh; } alias nuc="ssh w@192.168.12.5" alias mac="ssh jaewooklee@10.0.0.2" alias mac="ssh w@192.168.12.2" alias ip="ip -4" # docker() { # if [[ "$1" == "ps" ]]; then # command docker ps | less -SEX # elif [[ "$1" == "images" ]]; then # command docker images | less -SEX # elif [[ "$1" == "rm" ]]; then # command docker "$@" -f # else # command docker "$@" # fi # } alias ..="cd .." # 상위 디렉토리로 이동 alias ...="cd ../.." # 두 단계 위로 이동 alias ~="cd ~" # 홈 디렉토리로 이동 alias mkdir="mkdir -p" alias myip="curl ifconfig.me" # 내 IP 주소 확인 alias ports="netstat -tuln" # 열려 있는 포트 확인 alias free="free -h --si" alias df="df -h" # alias diff="git diff --staged" alias status="git status ." alias push="git push" alias pull="git pull" alias fetch="git fetch" add() { if [ $# -eq 0 ]; then git add . else git add $@ fi git status } parallel() { if [ $# -lt 2 ]; then echo "Usage: parallel " return 1 fi count=$1 shift command="$@" for i in $(seq 1 $count); do eval "$command" & done wait } # repeat() { # if [ $# -lt 2 ]; then # echo "Usage: repeat [s|m|h] " # return 1 # fi # interval=$(echo $1 | sed 's/[smh]$//') # unit=${1##*[0-9]} # command="${@:2}" # case $unit in # s|'') seconds=$interval;; # m) seconds=$((interval * 60));; # h) seconds=$((interval * 3600));; # *) echo "Invalid time unit. Use 's' for seconds, 'm' for minutes, 'h' for hours, or no unit for seconds."; return 1;; # esac # while true; do # eval $command # sleep $seconds # done # } alias remote="git remote -v" alias stash="git stash" alias branch="git branch" alias checkout="git checkout" alias vimrc="vi ~/.vimrc" commit() { git commit -m "$*" && git push } git() { if [[ "$1" == "remote" ]]; then shift command git remote -v "$@" elif [[ "$1" == "status" ]]; then command git status . command git diff --staged --stat else command git "$@" fi } alias wg="sudo wg" alias wg-quick="sudo wg-quick" alias weather="curl ko.wttr.in" alias sudo="sudo " alias dryblack="clear; black --check --diff --color ." alias compose="docker compose" alias compsoe="compose"