Skip to content

Instantly share code, notes, and snippets.

@christian-draeger
Last active January 15, 2019 09:46
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 christian-draeger/f4f537734a6073b30c352c8bbafbd0ea to your computer and use it in GitHub Desktop.
Save christian-draeger/f4f537734a6073b30c352c8bbafbd0ea to your computer and use it in GitHub Desktop.
useful alias collection
# A shell alias is a shortcut to reference a command.
# It can be used to avoid typing long commands or as a means to correct incorrect input.
# Personally i really like to use the z-shell (ZSH), you can find plugins that provide
# aliases for certain tools.
# This Gist is a collection of aliases i wrote over the time and found them handy
# collection of useful aliases regarding git
alias dummyCommit='git commit --allow-empty -m "dummy commit"'
alias dummyCommitAndPush='git commit --allow-empty -m "dummy commit" && git push'
# collection of useful aliases regarding maven
alias mcv='mvn clean verify'
alias mct='mvn clean test'
alias mcc='mvn clean compile'
alias mcp='mvn clean package'
alias mci='mvn clean install'
# maven + spring-boot
alias msbr='mvn spring-boot:run'
alias mcsbr='mvn clean spring-boot:run'
alias msbrd='mvn docker:start spring-boot:run'
# collection of useful aliases regarding network
alias showOpenPorts='lsof -iTCP -sTCP:LISTEN -n -P'
alias killAppOnPort='f(){ lsof -t -i tcp:"$1" | xargs kill; unset -f f; }; f'
alias whoIsPort='f(){ lsof -iTCP -sTCP:LISTEN -n -P | awk "NR == 1 || /:$1./"; unset -f f; }; f'
alias sudo='sudo '
alias ll='ls -lah'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment