Last active
June 7, 2021 18:23
-
-
Save manuelselbach/abf60859fb98c6040f81 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
# 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 ts="date +%s | tee >(pbcopy)" | |
# git | |
############################################## | |
# amount of stable releases (also bugfix releases) but exclude release candidates (rc*) | |
# Notice: needs gnu grep to be installed "brew install grep" | |
alias numberOfStableReleases="git tag --list | ggrep -Pi '^((?!rc*).)*$' | wc -l" | |
alias listStableReleases="git tag --list | ggrep -Pi '^((?!rc*).)*$'" | |
# 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 | |
# Notice: requires kitsuyui/homebrew-myip to install "brew tap kitsuyui/homebrew-myip && brew install 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