Last active
February 2, 2024 16:33
-
-
Save apzentral/08160a13e44be8444979445a453a66c0 to your computer and use it in GitHub Desktop.
aliases file
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
################################### | |
# Utilities | |
################################### | |
alias b="brew" | |
alias c="clear && reset" | |
alias re="reset" | |
alias e="exit" | |
alias s="sudo su" | |
alias m="make" | |
alias n="node" | |
alias p="php" | |
alias hist="history" | |
alias g="git" | |
alias ll="ls -l --color=auto" | |
alias lll="ls -rtls --color=auto" | |
alias lss="exa -l --icons" | |
alias ip="ifconfig | grep 'inet ' | grep -v 127.0.0.1" | |
alias ports="sudo lsof -i -P | grep LISTEN" | |
alias s-aliases="source ~/.bash_aliases" | |
alias o-aliases="code ~/.bash_aliases" | |
alias reset-lunchpad="defaults write com.apple.dock ResetLaunchPad -bool true; killall Dock" | |
alias pcat='pygmentize -f terminal256 -O style=native -g' | |
alias d2u-current="find . -type f -exec dos2unix '{}' '+'" | |
################################### | |
# Git | |
################################### | |
alias lg='lazygit' | |
alias git-re-master="git fetch origin && git rebase origin/master" | |
alias git-me-master="git fetch origin && git merge origin/master" | |
alias git-f="git fetch origin" | |
alias git-s="git status" | |
alias git-b-clean="git fetch -p && for branch in \$(git branch -vv | grep ': gone]' | awk '{print \$1}'); do git branch -D \$branch; done" | |
alias git-ai="git add -i" | |
alias git-pl="git pull" | |
alias git-ph="git push" | |
alias git-s-master="git switch master" | |
alias git-b="git branch" | |
alias git-ba="git branch -v -a" | |
# https://stackoverflow.com/questions/54276820/how-to-checkout-all-modified-files | |
alias git-co-mof="git status | awk '/modified/{split(\$0,a,\":\"); print \"git checkout \" a[2]}' | sh" | |
alias git-reset-last-commit="git reset HEAD~" | |
alias git-restore="git restore ." | |
alias git-log-graph="git log --all --decorate --oneline --graph" | |
alias git-st="git stash" | |
alias git-st-list="git stash list" | |
alias git-st-pop="git stash pop" | |
################################### | |
# grep | |
################################### | |
alias grep-all="grep -r -i -n" | |
alias grep-js="grep -r -i -n --include=\*.js" | |
alias grep-html="grep -r -i -n --include=\*.html" | |
alias grep-cpp="grep -r -i -n --include=\*.cpp --include=\*.h" | |
alias grep-sql="grep -r -i -n --include=\*.sql" | |
################################### | |
# Network | |
################################### | |
alias list-ip-port="netstat -tunlp" | |
################################### | |
# Search File(s) | |
################################### | |
alias search-xml="find . -type f -name '*.xml'" | |
################################### | |
# Find Max File Size | |
################################### | |
alias ducks='du -cks * | sort -rn | head' | |
################################### | |
# List | |
################################### | |
alias list-path="cat ~/.aliases | grep 'path-'" | |
alias list-ssh="cat ~/.aliases | grep 'ssh-'" | |
################################### | |
# VSCode | |
################################### | |
# https://code.visualstudio.com/docs/remote/troubleshooting#_cleaning-up-the-vs-code-server-on-the-remote | |
alias vscode-kill-server-processes="kill -9 `ps aux | \grep vscode-server | \grep USER | \grep -v grep | awk '{print $2}'`" | |
alias vscode-extension-processes="ps aux | grep vscode | grep extensions" | |
################################### | |
# Ubuntu | |
################################### | |
alias ubuntu-update="sudo apt-get update && time sudo apt-get dist-upgrade -y" | |
################################### | |
# AWS CLI | |
################################### | |
alias aws-ec2-info="aws ec2 describe-instances" | |
################################### | |
# Apache | |
################################### | |
alias apache-config="cd /usr/local/etc/apache2" | |
alias apache-start="sudo apachectl start" | |
alias apache-stop="sudo apachectl stop" | |
alias apache-restart="sudo apachectl -k restart" | |
alias apache-checkcfg="sudo apachectl configtest" | |
################################### | |
# Nginx | |
################################### | |
alias brew-start-nginx="brew services start nginx" | |
alias brew-stop-nginx="brew services stop nginx" | |
alias brew-restart-nginx="brew services restart nginx" | |
alias o-nginx="code /opt/homebrew/etc/nginx/nginx.conf" | |
alias nginx-start="sudo nginx" | |
alias nginx-stop="sudo nginx -s stop" | |
alias nginx-reload="sudo nginx -s reload" | |
################################### | |
# Hosts | |
################################### | |
alias o-httpd="code /usr/local/etc/apache2/2.4/httpd.conf" | |
alias o-vhosts="code /usr/local/etc/apache2/2.4/extra/httpd-vhosts.conf" | |
alias o-hosts="code /etc/hosts" | |
################################### | |
# PHP | |
################################### | |
alias path-php="cd /usr/local/etc/php" | |
################################### | |
# PHP - tools | |
################################### | |
alias phinx="./vendor/bin/phinx" | |
alias comp-dump="composer dumpautoload" | |
alias comp-r="composer require" | |
################################### | |
# Python | |
################################### | |
alias remove-all-pyc="find . -name '*.pyc' -delete" | |
alias venv-activate=". venv/bin/activate" | |
################################### | |
# Jupyter | |
################################### | |
alias j-notebook="jupyter notebook" | |
################################### | |
# alembic | |
################################### | |
alias alembic-init-sync="alembic revision --autogenerate -m " | |
alias alembic-head="alembic upgrade head" | |
alias alembic-downgrade="alembic downgrade -1" | |
alias alembic-base="alembic downgrade base" | |
################################### | |
# Database | |
################################### | |
alias mysql-start="mysql.server start" | |
alias mysql-stop="mysql.server stop" | |
alias mysql-check="ps aux | grep 'mysql'" | |
alias postgres-start="lunchy start postgres" | |
alias postgres-stop="lunchy stop postgres" | |
################################### | |
# Docker | |
################################### | |
alias lzd='lazydocker' | |
alias dk="docker" | |
alias dkvls="docker volume ls" | |
alias dkvrm="docker volume rm" | |
alias dkc="docker-compose" | |
alias dkc-up="docker-compose up -d" | |
alias dkm="docker-machine" | |
alias dkm-ip="docker-machine ip default" | |
################################### | |
# Vagrant | |
################################### | |
alias vg="vagrant" | |
alias vg-g-status="vagrant global-status" | |
alias vg-status="vagrant status" | |
################################### | |
# Terraform | |
################################### | |
alias tf="terraform" | |
################################### | |
# SeleniumHQ | |
################################### | |
alias sel="selenium-server" | |
################################### | |
# WildFly | |
################################### | |
alias wildfly="/usr/local/opt/wildfly-as/libexec/bin/standalone.sh --server-config=standalone-full.xml" | |
################################### | |
# SSH | |
################################### | |
alias ssh-agent-start="eval \"$(ssh-agent -s)\"" | |
################################### | |
# tmux | |
################################### | |
alias tmux-dev="tmux -CC a -t dev" | |
alias tmux-kill-all="tmux kill-session" | |
################################### | |
# SSH - Web Servers | |
################################### | |
################################### | |
# Path | |
################################### | |
################################### | |
# export | |
################################### | |
export LESS=FRX |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment