Skip to content

Instantly share code, notes, and snippets.

@camaleaun
Last active June 1, 2022 21:20
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 camaleaun/c0362372007858cadde2607da230e894 to your computer and use it in GitHub Desktop.
Save camaleaun/c0362372007858cadde2607da230e894 to your computer and use it in GitHub Desktop.
Aliases
alias wpdebug0='wp config set WP_DEBUG false --raw --type=constant'
alias wpdebug1='wp config set WP_DEBUG true --raw --type=constant'
alias rmdss='find . -name '.DS_Store' -type f -delete'
alias rmnm='find . -name 'node_modules' -type d -delete'
alias rmcv='find . -name 'vendor' -type d -delete'
alias guiau='git update-index --assume-unchange'
alias guinau='git update-index --no-assume-unchange'
alias jpdev1='wp config set JETPACK_DEV_DEBUG true --type=constant --raw'
alias jpdev0='wp config set JETPACK_DEV_DEBUG false --type=constant --raw'
alias wplangupdate='wp language core update && wp language plugin update --all && wp language theme update --all'
alias wplanginstall='wp language core install pt_BR && wp language plugin install pt_BR --all && wp language theme install pt_BR --all'
alias homesite="wp option get siteurl && wp option get home"
alias wprminactives='wp theme delete $(wp theme list --status=inactive --field=name --format=csv) && wp plugin delete $(wp plugin list --status=inactive --field=name --format=csv)'
alias storefront='wp theme install storefront --force && wp language theme install storefront pt_BR'
alias wpmi='php -d memory_limit=-1 /usr/local/bin/wp'
alias genpwd='wp eval "echo wp_generate_password( 12, false ) . \"\n\";" --path=/Users/camaleaun/.wp-cli/core'
alias stopnm="sudo service nginx stop && sudo service mysql stop"
alias startnm="sudo service nginx start && sudo service mysql start"
alias wpd="docker-compose exec wordpress wp"
alias du="docker-compose up -d"
alias dd="docker-compose down"
alias dr="docker-compose restart"
alias drw="docker-compose restart wordpress"
alias wpuc="wp user create gilberto gilberto@yogh.com.br --role=administrator --user_pass=gilberto"
alias gs="git status"
alias gl="git log"
alias gc="git commit"
alias ga="git add"
alias gd="git diff"
alias bt='upower --dump | tr -d "\n" | tr -d " " | sed -n "s/\(keyboard\|mouse\)present:yesrechargeable:yesstate:dischargingwarning-level:nonepercentage:\([[:digit:]]\+%\)/\n\1: \2\n/pg" | grep "[[:digit:]]\+%$"'
alias sidd='wp post delete --force $(wp post list --post_type=distributor --format=ids)'
alias siddc='wp term delete distributor_cat $(wp term list distributor_cat --field=term_id)'
alias siddp='wp term delete distributor_place $(wp term list distributor_place --field=term_id)'
alias sids='wp post delete --force $(wp post list --post_type=salesagent --format=ids)'
alias sidp='wp post delete --force $(wp post list --post_type=product --format=ids)'
alias sidpc='wp term delete product_cat $(wp term list product_cat --field=term_id)'
alias sidpd='wp term delete product_distributor $(wp term list product_distributor --field=term_id)'
alias sid='sidd && siddc && sids && sidp && sidpc'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment