Skip to content

Instantly share code, notes, and snippets.

@zorchp
Created May 8, 2023 02:42
Show Gist options
  • Save zorchp/99f8cb701cbb75ca44fa1b26e2785ef2 to your computer and use it in GitHub Desktop.
Save zorchp/99f8cb701cbb75ca44fa1b26e2785ef2 to your computer and use it in GitHub Desktop.
`Alias` when I use Ubuntu
# Ubuntu Linux
alias vi=nvim
alias cl=clear
alias vb='vi ~/.bashrc'
alias sb='source ~/.bashrc'
# for net
func_tcp() { firewall-cmd --zone=public --add-port=$1/tcp --permanent && iptables -I INPUT -ptcp --dport $1 -j ACCEPT; }
alias addtcp='func_tcp'
alias addudp='func_udp() { firewall-cmd --zone=public --add-port=$1/udp --permanent && iptables -I INPUT -pudp --dport $1 -j ACCEPT; };func_udp'
alias reufw='firewall-cmd --reload'
alias port_status='func_port_status() { sudo netstat -tunlp | grep $1 && sudo iptables -L -n --line-numbers | grep $1; }; func_port_status'
alias gcl='git clone'
# for vpn
alias vpn='pm2 start /home/zorch/clash1/clash'
alias uvpn='pm2 stop /home/zorch/clash1/clash'
alias vv="export https_proxy=http://127.0.0.1:7890 http_proxy=http://127.0.0.1:7890 all_proxy=socks5://127.0.0.1:7890"
alias uv="unset https_proxy http_proxy all_proxy"
alias goo='curl -vvv google.com'
alias py3xi="conda activate py3xi"
alias depy="conda deactivate"
alias ipy="ipython"
# LinuxBrew
alias brewbak='brew bundle dump --describe --force --file="~/code/dotfile/MacOS/Brewfile"'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment