export RC="~/.bash_aliases" export PATH=/usr/bin:$PATH alias build="docker build ." alias run="docker build . -t temp && docker run --rm temp" alias rc="vi $RC && tail $RC && source $HOME/.${SHELL##*/}rc" alias bat="batcat --paging=never" cd() { clear; echo "$(pwd)/$*"; echo; command cd "$@" && ls -lh --color=auto; echo; } alias my="sudo chown -R $(id -u):$(id -g)" alias l="clear; pwd; echo; command ls -lh --color=auto" alias ls="clear; pwd; echo; command ls -alh --color=auto" alias ns="watch -n 0.1 nvidia-smi" log() { if [ $# -eq 0 ]; then docker compose logs -f else docker logs -f "$@" fi } alias i="sudo apt-get install -y" alias debian="docker run -it --rm --gpus all --network host python:3.12-slim bash" alias download="huggingface-cli download" alias journal="sudo journalctl -u" alias make="make -j" export GGML_CUDA=1 export LLAMA_CURL=1 export LD_LIBRARY_PATH="/usr/local/cuda/lib64:/usr/local/lib:$LD_LIBRARY_PATH" export PATH="/home/w/.venv/bin:/home/w/hub/llama.cpp:/usr/local/cuda/bin:$PATH" alias rsync="rsync -avPh" alias wg="sudo wg" alias dpkg="sudo dpkg" alias systemctl="sudo systemctl" alias service="sudo service" alias apt="sudo apt-get" alias chwon="sudo chown" alias bsah="bash" alias pyhton="python" # alias stauts="status" # alias stuats="status" dash() { sudo docker run -it --rm --gpus all --entrypoint=bash "$1"; } dsh() { sudo docker run -it --rm "$1" sh; } alias nuc="ssh 192.168.12.2" alias mac="ssh jaewooklee@192.168.12.45" alias ip="ip -4" alias ping="ping -c 2" diff() { if [[ $# -eq 0 ]]; then clear git status echo echo git diff --staged else diff -qr "$@" fi } alias less="less -SEX" 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 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 diff } alias remote="git remote -v" alias stash="git stash" alias vimrc="vi ~/.vimrc" commit() { git commit -m "$*" } 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 weather="curl ko.wttr.in" alias dryblack="clear; black --check --diff --color ." alias compose="docker compose" alias compsoe="compose" alias ps="ps ux" clone() { git clone "https://git.yauk.tv/$@"; } ign() { for item in "$@"; do if [ -d "$item" ]; then echo "$item/" >> .gitignore echo "Added directory: $item/ to .gitignore" elif [ -f "$item" ]; then echo "$item" >> .gitignore echo "Added file: $item to .gitignore" else echo "Warning: $item does not exist" fi done } alias r="redis-cli" q() { "$@" > /dev/null 2>&1 & } log() { python -c "while log := __import__('redis').Redis().brpop('log'): print(log[1].decode())" }