Last active
August 8, 2022 12:16
-
-
Save admench/c84594a794f77c63035875d0b9d8f7c6 to your computer and use it in GitHub Desktop.
My zshrc
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
# If you come from bash you might have to change your $PATH. | |
# export PATH=$HOME/bin:/usr/local/bin:$PATH | |
# Path to your oh-my-zsh installation. | |
export ZSH="/Users/adammenczykowski/.oh-my-zsh" | |
ZSH_THEME="bira" | |
# Which plugins would you like to load? | |
# Standard plugins can be found in $ZSH/plugins/ | |
# Custom plugins may be added to $ZSH_CUSTOM/plugins/ | |
# Example format: plugins=(rails git textmate ruby lighthouse) | |
# Add wisely, as too many plugins slow down shell startup. | |
# docker | |
# docker-compose | |
plugins=( git zsh-autosuggestions ) | |
source $ZSH/oh-my-zsh.sh | |
# User configuration | |
# export MANPATH="/usr/local/man:$MANPATH" | |
# You may need to manually set your language environment | |
# export LANG=en_US.UTF-8 | |
# Preferred editor for local and remote sessions | |
# if [[ -n $SSH_CONNECTION ]]; then | |
# export EDITOR='vim' | |
# else | |
# export EDITOR='mvim' | |
# fi | |
# Compilation flags | |
# export ARCHFLAGS="-arch x86_64" | |
export NVM_DIR="$([ -z "${XDG_CONFIG_HOME-}" ] && printf %s "${HOME}/.nvm" || printf %s "${XDG_CONFIG_HOME}/nvm")" | |
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm | |
# Set personal aliases, overriding those provided by oh-my-zsh libs, | |
# plugins, and themes. Aliases can be placed here, though oh-my-zsh | |
# users are encouraged to define aliases within the ZSH_CUSTOM folder. | |
# For a full list of active aliases, run `alias`. | |
# | |
# Example aliases | |
# alias zshconfig="mate ~/.zshrc" | |
# alias ohmyzsh="mate ~/.oh-my-zsh" | |
alias a="php artisan" | |
alias nd="npm run dev" | |
alias nw="npm run watch" | |
alias nb="npm run build" | |
alias np="npm run production" | |
alias yd="yarn dev" | |
alias yw="yarn watch" | |
# Storm-specific commands | |
alias nr="npm run reinstall" | |
alias nds="npm run dev:sales" | |
alias ndw="npm run dev:warehouse" | |
alias ndb="npm run dev:buildroom" | |
alias ndf="npm run dev:finance" | |
alias ndl="npm run dev:logistics" | |
alias gcm="gco master && gfa && grb upstream/master" | |
alias gpb="gp -u origin HEAD" | |
alias phpunit="./vendor/bin/phpunit" | |
alias phpunits="./vendor/bin/phpunit --stop-on-failure" | |
alias phpcsold="./vendor/bin/php-cs-fixer fix --config .php_cs" | |
alias phpcs="./vendor/bin/php-cs-fixer fix --config .php-cs-fixer.php" | |
# clean up merged branches | |
alias cleanbranches='git branch --merged | egrep -v "(^\*|master|dev)" | xargs git branch -d' | |
# alias recentbranches="git for-each-ref --sort=committerdate refs/heads/ --format='%(HEAD) %(color:yellow)%(refname:short)%(color:reset) - %(color:red)%(objectname:short)%(color:reset) - %(contents:subject) - %(authorname) (%(color:green)%(committerdate:relative)%(color:reset))'" | |
alias recentbranches="git branch --sort=-committerdate --format='%(HEAD) %(color:yellow)%(refname:short)%(color:reset) - %(color:red)%(objectname:short)%(color:reset) - %(contents:subject) - %(authorname) (%(color:green)%(committerdate:relative)%(color:reset))'" | |
alias nah='git clean -fd && git reset --hard HEAD' | |
alias wipcommit="git add . && git commit -m 'wip'" | |
alias wipcommitpush="git add . && git commit -m 'wip' && git push" | |
alias phpstorm='open -na "PhpStorm.app" --args "$@"' | |
alias phpstormeap='open -na "PhpStorm-EAP.app" --args "$@"' | |
alias expose='~/.composer/vendor/bin/expose' | |
alias zshconfig="phpstorm ~/.zshrc" | |
source /Users/adammenczykowski/code/dev/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh | |
# antigen bundle zsh-users/zsh-autosuggestions | |
phpv() { | |
valet stop | |
brew unlink shivammathur/php/[email protected] shivammathur/php/[email protected] shivammathur/php/[email protected] shivammathur/php/[email protected] shivammathur/php/[email protected] shivammathur/php/[email protected] shivammathur/php/php php | |
# if you're really struggling: | |
# brew install $1 | |
brew link --force --overwrite $1 | |
brew services start $1 | |
composer global update | |
rm -f ~/.config/valet/valet.sock | |
valet install | |
# if still having issues: | |
composer dump-autoload && composer global dump-autoload | |
} | |
# alias php70="phpv [email protected]" | |
# alias php71="phpv [email protected]" | |
alias php71="phpv shivammathur/php/[email protected]" | |
alias php72="phpv shivammathur/php/[email protected]" | |
alias php73="phpv shivammathur/php/[email protected]" | |
alias php74="phpv shivammathur/php/[email protected]" | |
alias php80="phpv shivammathur/php/[email protected]" | |
alias php81="phpv shivammathur/php/[email protected]" | |
alias phplatest="phpv shivammathur/php/php" | |
# Recursively remove node_modules from current directory. | |
alias rm_node_modules="find . -name 'node_modules' -type d -prune -exec rm -rf '{}' +" | |
export PATH=${PATH}:~/.composer/vendor/bin | |
export PATH=${PATH}:~/.dotnet/tools | |
export BAT_THEME="GitHub" | |
export PATH=${PATH}:/Users/adammenczykowski/.npm/bin | |
alias myip='curl http://ipecho.net/plain; echo' | |
alias sshkey='cat ~/.ssh/id_rsa.pub | tee >(pbcopy)' | |
# enter a file name ending with '.php' | |
# and it will be opened in phpstorm | |
alias -s php=code |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment