> sudo nano /etc/gdm3/custom.conf
Uncomment #WaylandEnable=false
NOTE: this command will stop all of your running apps, make sure to save all of your files before running it.
> sudo systemctl restart gdm3
| -- Get size of single database | |
| SELECT | |
| table_schema "DB Name", | |
| ROUND(SUM(data_length + index_length) / 1024 / 1024, 1) "DB Size in MB" | |
| FROM information_schema.tables WHERE table_schema = '<db_name>'; | |
| -- Get size of all databases | |
| SELECT | |
| table_schema "DB Name", | |
| ROUND(SUM(data_length + index_length) / 1024 / 1024, 1) "DB Size in MB" |
Install WP-Rocket regulary, do not activate.
via your pantheon Dashboard, go to the envrionment then Connection Info and copy the login command line to SFTP. Login to SFTP, then create these 2 folders under Uploads
cd /code/wp-content/uploads| <?php | |
| # Source: https://jrsinclair.com/articles/2013/simple-parallel-processing-in-php-with-pcntl-fork/ | |
| // A function to run | |
| $makeDir = function($a) { | |
| shell_exec('mkdir '.shellescapearg($a)); | |
| } | |
| // An array to process | |
| $dirnames = array('a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k'); |
| CREATE TABLESPACE TBS_ORA_DOCKER_01 DATAFILE 'TBS_ORA_DOCKER_01.dat' SIZE 50M ONLINE; | |
| CREATE TEMPORARY TABLESPACE TBS_TEMPORARY_ORA_DOCKER_01 TEMPFILE 'TBS_TEMPORARY_ORA_DOCKER_01.dbf' SIZE 10M AUTOEXTEND ON; | |
| CREATE USER ORA_DOCKER | |
| IDENTIFIED BY ORA_DOCKER | |
| DEFAULT TABLESPACE TBS_ORA_DOCKER_01 | |
| TEMPORARY TABLESPACE TBS_TEMPORARY_ORA_DOCKER_01 | |
| QUOTA UNLIMITED on TBS_ORA_DOCKER_01; |
| <?php | |
| // Add this code to functions.php | |
| function checkout_allow_only_gmail_emails( $valid_data, $posted ) { | |
| if ( ! empty( $posted['edd_email'] ) ) { | |
| list( $user_id, $domain ) = explode( '@', $posted['edd_email'] ); | |
| if ( strtolower( $domain ) != 'gmail.com' ) { | |
| edd_set_error( 'email_not_allowed', 'Only Google emails are allowed!' ); |
| <?php | |
| // Add this code to functions.php | |
| add_action( 'woocommerce_after_checkout_validation', 'checkout_allow_only_gmail_emails', 10, 2 ); | |
| function checkout_allow_only_gmail_emails( $fields, $errors ) { | |
| if ( ! empty( $fields['billing_email'] ) ) { | |
| list( $user_id, $domain ) = explode( '@', $fields['billing_email'] ); |
| @echo off | |
| Setlocal enabledelayedexpansion | |
| Set "Pattern=Untitled" | |
| Set "Replace=Page" | |
| For %%# in ("D:\Folder Name\*.jpg") Do ( | |
| Set "File=%%~nx#" | |
| Ren "%%#" "!File:%Pattern%=%Replace%!" | |
| ) |