Skip to content

Instantly share code, notes, and snippets.

@pazairfog
Last active May 9, 2023 02:20
Show Gist options
  • Select an option

  • Save pazairfog/29d78b98b9b7da0d588f9be06062e642 to your computer and use it in GitHub Desktop.

Select an option

Save pazairfog/29d78b98b9b7da0d588f9be06062e642 to your computer and use it in GitHub Desktop.
Global ZSH config
# Configuration globale
export LANG=fr_FR.UTF-8
# Preferred editor for local and remote sessions
export EDITOR='vim'
# Look in ~/.oh-my-zsh/themes/
ZSH_THEME="kolo"
# Add wisely, as too many plugins slow down shell startup.
plugins=(zsh-completions git git-remote-branch git-prompt gitfast)
# Do some aliases
alias grepR="grep -nR"
alias cats="cat"
alias dog="cat"
alias gzip="pigz"
alias gdsp='gd -w'
# Drush completion
autoload bashcompinit
bashcompinit
source /etc/bash_completion.d/drush.complete.sh
# Drush my friend
alias dac='drush cc all'
alias dcr='drush cr'
alias dsyncpowsdev="drush sql-sync-pipe @owsdev @self -y --progress"
# Gulp build
alias gbu='gulp build'
# Compilation fichiers SASS avec Compass + clear cache D7
alias cct='compass comp . --trace'
alias cctd='cct && dac'
# Docker my friend
alias dimg='docker images'
# PHP Codesniffer
alias phpconfigpath='phpcs --config-set installed_paths ~/.drush/modules/coder/coder_sniffer'
alias phpdrupalcs='phpcs --config-set default_standard Drupal'
# MAJ Atom IDE
alias iatom='/usr/local/share/atom/install.sh'
# Mauvais réseau ? Composer sans limite
alias compnolimit='php -d memory_limit=-1 /usr/local/bin/composer'
# From git projects parent directory "/www"
function pullall {
find . -maxdepth 3 -name .git -type d | xargs -L 1 bash -c 'cd "$0" && cd ../ && git pl-all'
}
# Neat option to have meteo data
function meteo {
curl -4 wttr.in/"$1";
}
# Drush generate AKA dcg
function dcg {
if [ -f ../vendor/chi-teck/drupal-code-generator/bin/dcg ]; then
../vendor/chi-teck/drupal-code-generator/bin/dcg $*
else
echo "Drush generate n'existe pas ou vous n'êtes pas dans un docroot Drupal"
fi
}
# Drupal console config file
source "$HOME/.console/console.rc" 2>/dev/null
# Alias pour drupal console
function drupal {
if [ -f ../vendor/bin/drupal ]; then
../vendor/bin/drupal $*
else
echo "Vous devez vous trouver au niveau du docroot Drupal"
fi
}
# Démarrer SOLR 4
function ssolr4() {
cd /opt/solr-4.10.4/example && java -jar start.jar && cd -
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment