-
Notifications
You must be signed in to change notification settings - Fork 0
/
dot_bash_aliases
74 lines (66 loc) · 2.39 KB
/
dot_bash_aliases
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
#!/usr/bin/env bash
# Terminal
alias cat="bat"
alias ls="eza --icons --oneline --hyperlink"
alias dir="eza --icons -long --hyperlink --group --smart-group --header"
alias kcat='kitty +kitten icat'
alias kdiff='kitty +kitten diff'
alias kgrep='kitty +kitten hyperlinked_grep'
alias kclip='kitty +kitten clipboard'
alias ksh="kitty +kitten ssh"
alias kctl='kubectl'
# Dotfiles management
alias cgit='chezmoi git -- '
alias cgis='chezmoi git -- status '
alias cgid='chezmoi git -- diff '
alias cgtc='chezmoi git -- commit '
alias cadd="chezmoi add"
alias cedit='chezmoi edit'
alias cappl='chezmoi apply'
# Git
alias gis="git status"
alias gid="git diff"
alias ga.="git add ."
alias gpsh="git push"
alias gpll="git pull"
alias gtc="git commit"
alias gie="nano .git/info/exclude"
# Docker
alias di="docker images"
alias dangling='docker rmi -f $(docker images -f "dangling=true" -q) 2>/dev/null 1>&2'
alias dvp="echo 'Y' | docker volume prune && echo && docker system df && echo -e '\ndocker builder prune'"
alias dbp="echo 'Y' | docker builder prune && echo -e '\ndocker builder prune'"
alias dpa='docker ps -a --format "\nID\t{{.ID}}\nNAMES\t{{.Names}}\nIMAGE\t{{.Image}}\nCOMMAND\t{{.Command}}\nCREATED\t{{.RunningFor}}\nSTATUS\t> {{.Status}}\nPORTS\t{{.Ports}}\n"'
alias ds-all="docker ps | awk 'NR > 1 {print \$NF}' | xargs -I{} docker stop {}"
# Coding helpers
alias ace='node ace'
alias art='php artisan'
alias mng='python manage.py'
alias style="ruff format"
alias spk='echo `python3 -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())"`'
alias gradl="./gradlew"
alias mkube='minikube'
alias supabase="npx supabase"
alias http="python3 -m http.server" # quick http server for files
alias gpd="gitpod"
alias j="just"
alias pnx="pnpm dlx"
alias smee="npx smee-client"
alias act="gh act"
alias gl="glab"
# Command line tools
alias lzd="lazydocker"
alias lzg="lazygit"
alias tv="tidy-viewer"
alias scpy="scrcpy >/dev/null 2>&1 &"
alias prism="npx @stoplight/prism-cli@latest" # api mocking
alias cookiecutter="pipx run cookiecutter"
alias hackrnews="clx -n"
# alias mermaid="npx @mermaid-js/mermaid-cli@latest"
# Misc
# shellcheck disable=SC2154
alias load.env='while read -r line; do export $line; done < .env;'
alias pj="/usr/bin/env python3 -m json.tool"
alias xo='xdg-open >/dev/null 2>/dev/null'
alias off='shutdown -h now'
alias jitsi-link="python -c 'import uuid; print(f\"https://meet.jit.si/{uuid.uuid4()}\")'"