Skip to content

Instantly share code, notes, and snippets.

@manuelselbach manuelselbach/.zshrc
Last active Jan 7, 2019

Embed
What would you like to do?
# ENVs
##############################################
export HOMEBREW_CASK_OPTS=\"$HOMEBREW_CASK_OPTS --appdir=/Applications\"
export NO_AUTO_PERMISSION_FIX=1
# grep settings
##############################################
export GREP_OPTIONS='--color=always'
export GREP_COLOR='1;31;40'
# bind some keys, navigate back / forward
##############################################
bindkey "[D" backward-word
bindkey "[C" forward-word
bindkey "^[a" beginning-of-line
bindkey "^[e" end-of-line
# general
##############################################
alias ll='ls -la'
alias gwd='cd ~/Desktop/git_workspace'
alias pw='cd ~/projects'
alias ts="date +%s | tee >(pbcopy)"
# vagrant
##############################################
alias vup='vagrant up'
alias vhalt='vagrant halt'
alias vreload='vagrant halt && vagrant up'
alias vprovision='vagrant provision'
alias vssh='vagrant ssh'
# PHP
##############################################
alias use_php70="brew unlink php70 && brew unlink php71 && brew unlink php72 && brew link php70"
alias use_php71="brew unlink php70 && brew unlink php71 && brew unlink php72 && brew link php71"
alias use_php72="brew unlink php70 && brew unlink php71 && brew unlink php72 && brew link php72"
# docker
##############################################
alias dc-up='docker-compose up -d'
alias dc-stop='docker-compose stop'
alias dc-logs='docker-compose logs -f --tail=50'
alias dc-logs-web='docker-compose logs -f --tail=50 web'
dc-clean-images() {
docker rmi -f $(docker images | grep "<none>" | awk '{print $3}')
}
dc-clean-volumes() {
docker volume rm $(docker volume ls -qf dangling=true)
}
dc-bash () {
docker exec -ti $1 /bin/bash
}
dc-ip () {
docker inspect --format '{{ .NetworkSettings.IPAddress }}' $1
}
# xcode
##############################################
openUrlInSimulator() {
xcrun simctl openurl booted $1
}
# skype
##############################################
openNewSkypeInstance() {
open -na /Applications/Skype.app --args -DataPath /Users/$(whoami)/Library/Application\ Support/Skype$1
}
# myip
alias myip="myip4 && myip6"
alias myip4='IP=$(dig +short -4 myip.opendns.com a @resolver1.opendns.com 2> /dev/null) && echo "IPv4: $IP" || echo "IPv4: down"'
alias myip6='IP=$(dig +short -6 myip.opendns.com aaaa @resolver1.opendns.com 2> /dev/null) && echo "IPv6: $IP" || echo "IPv6: down"'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.