Skip to content

Instantly share code, notes, and snippets.

@vdloc
Last active November 9, 2023 10:49
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 vdloc/edf92eaed7fe48e33afee4d10c3cdf80 to your computer and use it in GitHub Desktop.
Save vdloc/edf92eaed7fe48e33afee4d10c3cdf80 to your computer and use it in GitHub Desktop.
my zsh configuration
# 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="$HOME/.oh-my-zsh"
# Set name of the theme to load --- if set to "random", it will
# load a random theme each time oh-my-zsh is loaded, in which case,
# to know which specific one was loaded, run: echo $RANDOM_THEME
# See https://github.com/ohmyzsh/ohmyzsh/wiki/Themes
ZSH_THEME="jonathan"
# Set list of themes to pick from when loading at random
# Setting this variable when ZSH_THEME=random will cause zsh to load
# a theme from this variable instead of looking in $ZSH/themes/
# If set to an empty array, this variable will have no effect.
# ZSH_THEME_RANDOM_CANDIDATES=( "robbyrussell" "agnoster" )
# Uncomment the following line to use case-sensitive completion.
# CASE_SENSITIVE="true"
# Uncomment the following line to use hyphen-insensitive completion.
# Case-sensitive completion must be off. _ and - will be interchangeable.
# HYPHEN_INSENSITIVE="true"
# Uncomment one of the following lines to change the auto-update behavior
# zstyle ':omz:update' mode disabled # disable automatic updates
# zstyle ':omz:update' mode auto # update automatically without asking
# zstyle ':omz:update' mode reminder # just remind me to update when it's time
# Uncomment the following line to change how often to auto-update (in days).
# zstyle ':omz:update' frequency 13
# Uncomment the following line if pasting URLs and other text is messed up.
# DISABLE_MAGIC_FUNCTIONS="true"
# Uncomment the following line to disable colors in ls.
# DISABLE_LS_COLORS="true"
# Uncomment the following line to disable auto-setting terminal title.
# DISABLE_AUTO_TITLE="true"
# Uncomment the following line to enable command auto-correction.
# ENABLE_CORRECTION="true"
# Uncomment the following line to display red dots whilst waiting for completion.
# You can also set it to another string to have that shown instead of the default red dots.
# e.g. COMPLETION_WAITING_DOTS="%F{yellow}waiting...%f"
# Caution: this setting can cause issues with multiline prompts in zsh < 5.7.1 (see #5765)
# COMPLETION_WAITING_DOTS="true"
# Uncomment the following line if you want to disable marking untracked files
# under VCS as dirty. This makes repository status check for large repositories
# much, much faster.
# DISABLE_UNTRACKED_FILES_DIRTY="true"
# Uncomment the following line if you want to change the command execution time
# stamp shown in the history command output.
# You can set one of the optional three formats:
# "mm/dd/yyyy"|"dd.mm.yyyy"|"yyyy-mm-dd"
# or set a custom format using the strftime function format specifications,
# see 'man strftime' for details.
# HIST_STAMPS="mm/dd/yyyy"
# Would you like to use another custom folder than $ZSH/custom?
# ZSH_CUSTOM=/path/to/new-custom-folder
# 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.
plugins=(git zsh-autosuggestions zsh-syntax-highlighting fast-syntax-highlighting zsh-autocomplete)
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"
# 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`.
path+=('/opt/android-studio/bin')
export PATH
# Example aliases
# alias zshconfig="mate ~/.zshrc"
# alias ohmyzsh="mate ~/.oh-my-zsh"
alias ls='ls --color=auto'
alias grep='grep --color=auto'
alias fgrep='fgrep --color=auto'
alias egrep='egrep --color=auto'
# some more ls aliases
alias ll='ls -alF'
alias la='ls -A'
alias l='ls -CF'
# Magento alias
alias mg-index="php bin/magento indexer:reindex"
alias mg-deploy="sudo rm -rf var/view_preprocessed/ var/cache/ var/log/ pub/static/frontend && php bin/magento s:s:d -f -a frontend && mg-clear-cache"
alias mg-deploy-fast="sudo rm -rf var/view_preprocessed/ var/cache/ var/log/ pub/static/frontend && php bin/magento s:s:d -f -a frontend en_US de_DE && mg-clear-cache"
alias mg-deploy-ch="sudo rm -rf var/view_preprocessed/ var/cache/ var/log/ pub/static/frontend && php bin/magento s:s:d -f -a frontend de_CH && mg-clear-cache"
alias mg-deploy-at="sudo rm -rf var/view_preprocessed/ var/cache/ var/log/ pub/static/frontend && php bin/magento s:s:d -f -a frontend de_AT && mg-clear-cache"
alias mg-deploy-en="sudo rm -rf var/view_preprocessed/ var/cache/ var/log/ pub/static/frontend && php bin/magento s:s:d -f -a frontend en_US && mg-clear-cache"
alias mg-deploy-de="sudo rm -rf var/view_preprocessed/ var/cache/ var/log/ pub/static/frontend && php bin/magento s:s:d -f -a frontend de_DE && mg-clear-cache"
alias mg-module-list="php bin/magento module:status"
alias mg-disable-module="php bin/magento module:disable "
alias mg-enable-module="php bin/magento module:enable "
alias mg-create-admin="php bin/magento admin:user:create --admin-user=admin-vdloc --admin-password=admin123 --admin-email=hi@mageplaza.com --admin-firstname=Mageplaza --admin-lastname=Family"
alias mg-mode="php bin/magento deploy:mode:show"
alias change-php="sudo update-alternatives --config php"
alias mg-clear-cache="bin/magento cache:flush"
alias start-elasticsearch="sudo systemctl --now enable elasticsearch"
alias mg-refresh-all="start-elasticsearch && php bin/magento indexer:reindex && php bin/magento setup:upgrade && php bin/magento setup:di:compile && rm -rf var/view_preprocessed/ var/cache/ var/log/ pub/static/frontend/ && php bin/magento setup:static-content:deploy -f && php bin/magento cache:flush "
alias mg-refresh-hard="mg-upgrade && mg-compile && mg-deploy-fast && mg-deploy-admin && mg-clear-cache"
alias mg-refresh="rm -rf var/view_preprocessed var/cache pub/static/frontend && mg-clear-cache"
alias mg-compile="php bin/magento setup:di:compile"
alias mg-upgrade="php bin/magento setup:upgrade"
alias mg-deploy-admin="sudo rm -rf pub/static/adminhtml && sudo php bin/magento s:s:d -f -a adminhtml && fix-permission"
alias fix-permission="sudo chmod 777 -R var pub generated"
alias php-74="valet use 7.4 && change-php <<< 5"
alias php-81="change-php <<< 6 && valet use 8.1"
alias futon="cd ~/sites/futon"
alias viba="cd ~/sites/viba"
alias albrief="cd ~/sites/brief/al-staging3"
alias mode-dev="bin/magento deploy:mode:set developer"
alias mode-default="bin/magento deploy:mode:set default"
alias mode-production="bin/magento deploy:mode:set production"
alias enable-assets-optimize="php bin/magento config:set dev/css/merge_css_files 1 && php bin/magento config:set dev/css/minify_files 1 && php bin/magento config:set dev/js/merge_files 1 && php bin/magento config:set dev/js/minify_files 1"
alias disable-assets-optimize="php bin/magento config:set dev/css/merge_css_files 0 && php bin/magento config:set dev/css/minify_files 0 && php bin/magento config:set dev/js/merge_files 0 && php bin/magento config:set dev/js/minify_files 0"
alias recent-branches="git branch --sort=-committerdate"
alias vscode="code ."
alias update-shell="source ~/.zshrc"
alias update="sudo apt update"
alias upgrade="sudo apt upgrade"
alias install="sudo apt install"
alias edit-config="vim ~/.zshrc"
alias test-futon-local="lighthouse https://futon.test --view"
alias test-futon-local-desktop="lighthouse https://futon.test --view --preset=desktop"
alias test-futon-live="lighthouse https://www.futonwerk.de --view"
alias test-futon-live-desktop="lighthouse https://www.futonwerk.de --view --preset=desktop"
alias test-futon-staging="lighthouse http://futonwerkde.testsystem.org/ --view"
alias test-futon-staging-desktop="lighthouse http://futonwerkde.testsystem.org/ --view --preset=desktop"
alias restore-stash="git stash apply"
alias stash="git stash"
alias shell-database="mysql -u root -proot"
alias open-futon-local="google-chrome https://futon.test"
alias search-history="history | grep "
alias disable-2fa="php bin/magento module:disable {Magento_AdminAdobeImsTwoFactorAuth,Magento_TwoFactorAuth}"
alias update-master="git ck master && git pull && git ck -"
alias update-dev="git ck develop || git ck develop_new && git pull && git ck -"
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion
export PATH=/home/ecentura/.nvm/versions/node/v18.18.0/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/snap/bin:/opt/android-studio/bin:/home/ecentura/.config/composer/vendor/bin
export PATH=/home/ecentura/.nvm/versions/node/v18.18.0/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/snap/bin:/opt/android-studio/bin:/home/ecentura/.config/composer/vendor/bin:/home/ecentura/.composer/vendor/bin/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment