Move aliases and functions

This commit is contained in:
Oliver Davies 2019-09-08 19:32:13 +01:00
parent fcfb0852e2
commit c0c047c300
3 changed files with 0 additions and 7 deletions

View file

@ -0,0 +1,53 @@
alias ga="git add"
alias gc="git commit"
alias gca="git commit --amend --no-edit --reset-author"
alias gcm="git commit -m"
alias gl="git log"
alias gs="git status"
alias gh="github"
alias nah="git reset --hard && git clean -fd"
alias wip="git add . && git commit -m 'wip'"
alias l="ls -lah"
# Fast open
alias o="open ."
alias p="phpunit"
alias pf="phpunit --filter "
alias pstorm="phpstorm"
alias st="subl"
alias stt="subl ."
# Quickly go to the Code directory
alias web="cd ~/Code"
alias y=yarn
alias ya='yarn add'
alias yd="yarn dev"
alias yp="yarn prod"
alias ys="yarn serve"
alias yw="yarn watch"
# Docksal
alias f="fin"
# Shorter Git commands.
alias add='git add'
alias amend='git commit --amend'
alias clone='git clone'
alias commit='git commit'
alias pull='git pull'
alias push='git push'
alias rebase='git rebase'
alias hosts="sudo vim /etc/hosts"
alias sshconfig='vim ~/.ssh/config'
alias zshconfig='vim ~/.zshrc'
# PhpStorm
alias pstorm='open -a /Applications/PhpStorm.app "`pwd`"'
# Sublime Text
alias sublime='open -a /Applications/Sublime\ Text.app "`pwd`"'

View file

@ -0,0 +1,20 @@
shorten() {
pushd ~/Code/opdavi.es
git pull --rebase
npm run shorten $1 $2
popd
}
function mkd() {
mkdir -p "$@" && cd "$@"
}
function db {
if [ "$1" = "refresh" ]; then
mysql -uroot -e "drop database $2; create database $2"
elif [ "$1" = "create" ]; then
mysql -uroot -e "create database $2"
elif [ "$1" = "drop" ]; then
mysql -uroot -e "drop database $2"
fi
}