Skip to content

Instantly share code, notes, and snippets.

@uplight-dev
Last active September 22, 2023 18:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save uplight-dev/e2c5384e41a26b3251167b906ef1f6fd to your computer and use it in GitHub Desktop.
Save uplight-dev/e2c5384e41a26b3251167b906ef1f6fd to your computer and use it in GitHub Desktop.
unix alias
#!/bin/bash
alias aliases_pull="curl -sL -H 'Pragma: no-cache' \$1 | bash -"
alias aliases_install="wget -o ~/.aliases \$1 && echo '~/. .aliases' >> ~/.profile"
# docker
alias dkr_c="docker compose"
alias dkr_build_up="dkr_c down --rmi all --remove-orphans -t 1 && dkr_c build --no-cache && dkr_c up -d"
alias dkr_re="dkr_c restart"
alias dkr_dn_up="dkr_c down -t 1 && dkr_c up -d"
alias dkr_sh='docker exec -it $(dkr_c ps -q) /bin/sh'
alias dkr_bash='docker exec -it $(dkr_c ps -q) /bin/bash'
alias dkr_ps="dkr_c ps"
alias dkr_logs="dkr_c logs"
# wireguard
alias wg_re="sudo wg-quick down wg0 ; sudo wg-quick up wg0"
alias wg_s="sudo wg"
# sh
alias ssh_alive='ssh $1 -p $2 -o ServerAliveInterval=60'
# 2307 vmbox pre-install
alias x1_ssh_wag='ssh root@vmbox.uplight.link -p 10022'
alias x1_sshid_wag='ssh-add ~/.ssh/id_rsa_wag'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment