Last active
January 27, 2025 08:40
-
-
Save yaoyunchen/58d50bd855199ea2063118f931963385 to your computer and use it in GitHub Desktop.
Aliases (~/.aliases)
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
# Docker | |
alias d='docker' | |
alias da='docker attach' | |
alias dr='docker restart' | |
alias dimg='docker images' | |
alias dps='docker ps' | |
alias dvol='docker volume ls' | |
alias dclearimg='docker rmi $(docker images --quiet --filter "dangling=true")' | |
alias dclearps='docker ps --filter status=dead --filter status=exited -aq | xargs docker rm -v' | |
alias dclearvol='docker volume rm $(docker volume ls -qf dangling=true)' | |
alias dc='docker-compose' | |
alias dcer='docker-compose exec rails' | |
alias dcerjasmine='docker-compose run --rm -e RAILS_ENV=test -p 8888:3000 rails rails jasmine' | |
alias dcerspec='docker-compose run --rm -e RAILS_ENV=test rails rspec' | |
# Git | |
alias g='git' | |
alias gadd='git add -A .' | |
alias gcommit='git commit -m' | |
alias gcommitreset='git reset HEAD~' | |
alias gc='git checkout' | |
alias glog='git log --show-signature' | |
alias gmerge='git merge --no-ff' | |
alias gpull='git pull' | |
alias gpush='git push' | |
alias gpushs='git push --set-upstream origin' | |
alias gs='git status' | |
# Lists | |
alias ls='ls -la -FGash' | |
alias grep='grep --color=auto' | |
# Navigation | |
alias ..='cd ..' | |
alias ...='cd ../..' | |
alias ....='cd ../../..' | |
alias mkdir='mkdir -pv' | |
# Quick Open | |
alias aliases='open ~/.aliases' | |
alias bashprofile='open ~/.bash_profile' | |
alias hosts='open /etc/hosts' | |
alias sub='sublime' | |
# Rails | |
## Using simplecov gem | |
alias coverage='open coverage/index.html' | |
alias migrate='rails db:migrate' | |
alias routes='rails routes | grep' | |
alia seed='rails db:seed' | |
# System Info | |
alias cpu='top -o cpu' | |
alias mem='top -o rsize' | |
alias pssearch='ps aux | grep -v grep | grep -i -e VSZ -e' | |
# Terminal | |
alias bashreset='. ~/.bash_profile' | |
alias clearall="clear && printf '\e[3J'" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment