This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "$schema": "https://playground.wordpress.net/blueprint-schema.json", | |
| "landingPage": "/", | |
| "steps": [ | |
| { | |
| "step": "login" | |
| }, | |
| { | |
| "step": "writeFile", | |
| "path": "/wordpress/wp-content/mu-plugins/rewrite.php", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "landingPage": "/pdf.php", | |
| "steps": [ | |
| { | |
| "step": "writeFile", | |
| "path": "/wordpress/pdf.php", | |
| "data": "<?php $pdf = '%PDF-1.1\n\n '; $pdf .= '1 0 obj\n '; $pdf .= '<<\n '; $pdf .= '/Type /Catalog\n '; $pdf .= '/Outlines 2 0 R\n '; $pdf .= '/Pages 3 0 R\n '; $pdf .= '>>\n '; $pdf .= 'endobj\n\n '; $pdf .= '2 0 obj\n '; $pdf .= '<<\n '; $pdf .= '/Type /Outlines\n '; $pdf .= '/Count 0\n '; $pdf .= '>>\n '; $pdf .= 'endobj\n\n '; $pdf .= '3 0 obj\n '; $pdf .= '<<\n '; $pdf .= '/Type /Pages\n '; $pdf .= '/Kids [4 0 R]\n '; $pdf .= '/Count 1\n '; $pdf .= '>>\n '; $pdf .= 'endobj\n\n '; $pdf .= '4 0 obj\n '; $pdf .= '<<\n '; $pdf .= '/Type /Page\n '; $pdf .= '/Parent 3 0 R\n '; $pdf .= '/MediaBox [0 0 595.28 841.89]\n '; $pdf .= '/Contents 5 0 R\n '; $pdf .= '/Resources << /Font << /F1 6 0 R >> >>\n '; $pdf .= '>>\n '; $pdf .= 'endobj\n\n '; $pdf .= '5 0 obj\n '; $pdf .= '<< /Length 44 >>\n '; $pdf .= 'stream\n '; $pdf .= 'BT\n '; $pdf .= '70 50 TD\n '; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "landingPage": "/", | |
| "steps": [ | |
| { | |
| "step": "writeFile", | |
| "path": "/wordpress/wp-content/mu-plugins/error.php", | |
| "data": "<?php error_log('This is broken');" | |
| } | |
| ] | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "landingPage": "/category/uncategorized/", | |
| "phpExtensionBundles": [ | |
| "kitchen-sink" | |
| ], | |
| "features": { | |
| "networking": true | |
| }, | |
| "steps": [ | |
| { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "landingPage": "/wp-admin/plugin-install.php", | |
| "phpExtensionBundles": [ | |
| "kitchen-sink" | |
| ], | |
| "features": { | |
| "networking": true | |
| }, | |
| "steps": [ | |
| { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function debug( $message, $label = '', $log_file = 'debug.log' ) { | |
| if ( is_bool( $message ) ) { | |
| $message = $message ? 'true' : 'false'; | |
| } else if ( is_array( $message ) || is_object( $message ) ) { | |
| $message = json_encode( | |
| $message, | |
| JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES | |
| ); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| openssl aes-256-cbc -a -salt -pbkdf2 -in .env -out .env.enc |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| openssl aes-256-cbc -d -a -pbkdf2 -in .env.enc -out .env |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| TOTAL=${1:-5} | |
| echo "Import runner started" | |
| while : | |
| do | |
| ACTIVE=$(ps -aux | grep import-wc-admin-orders.sh | grep -c -v grep) | |
| echo "Active importers: $ACTIVE/$TOTAL" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| cd /var/www/ | |
| wp action-scheduler run --batch-size=10 --hooks=wc-admin_queue_batches_orders,wc-admin_import_batch_orders 2>&1 | awk -v commandid=$1 '{ "date +%Y-%m-%d\\ %T.%3N" | getline timestamp; print timestamp, commandid, $0; fflush(); }' >> ~/cli.log |
NewerOlder