updated 2021-06-23
Version 2105 (Build 14026.20302)
==========================================
I never use the Dock and all it does for me is come in the way when I'm resizing windows or clicking on stuff I can't access using just my keyboard.
Here's a way to hide the Dock so it doesn't get in the way anymore.
Run the following commands in the terminal.
# Hide Dock
defaults write com.apple.dock autohide -bool true && killall Dock
defaults write com.apple.dock autohide-delay -float 1000 && killall Dock
| #!/usr/bin/env bash | |
| ### Bash Environment Setup | |
| # http://redsymbol.net/articles/unofficial-bash-strict-mode/ | |
| # https://www.gnu.org/software/bash/manual/html_node/The-Set-Builtin.html | |
| # set -o xtrace | |
| set -o errexit | |
| set -o errtrace | |
| set -o nounset | |
| set -o pipefail |
| <?php | |
| // Add this to your `functions.php` or (preferably) to a plugin: | |
| function featured_products_orderby( $orderby, $query ) { | |
| global $wpdb; | |
| if ( 'featured_products' == $query->get( 'orderby' ) ) { | |
| $featured_product_ids = (array) wc_get_featured_product_ids(); | |
| if ( count( $featured_product_ids ) ) { | |
| $string_of_ids = '(' . implode( ',', $featured_product_ids ) . ')'; | |
| $orderby = "( {$wpdb->posts}.ID IN {$string_of_ids} ) " . $query->get( 'order' ); |
| # Backup | |
| docker exec CONTAINER /usr/bin/mysqldump -u root --password=root DATABASE > backup.sql | |
| # Restore | |
| cat backup.sql | docker exec -i CONTAINER /usr/bin/mysql -u root --password=root DATABASE | |
| /** | |
| * Return a formated string from a date Object mimicking PHP's date() functionality | |
| * | |
| * format string "Y-m-d H:i:s" or similar PHP-style date format string | |
| * date mixed Date Object, Datestring, or milliseconds | |
| * | |
| */ | |
| function dateFormat(format,date){ | |
| if(!date || date === "") |