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 | |
| aptitude -y install expect | |
| // Not required in actual script | |
| MYSQL_ROOT_PASSWORD=abcd1234 | |
| SECURE_MYSQL=$(expect -c " | |
| set timeout 10 |
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
| # Download and Install the Latest Updates for the OS | |
| apt-get update && apt-get upgrade -y | |
| # Set the Server Timezone to CST | |
| echo "America/Chicago" > /etc/timezone | |
| dpkg-reconfigure -f noninteractive tzdata | |
| # Enable Ubuntu Firewall and allow SSH & MySQL Ports | |
| ufw enable | |
| ufw allow 22 |
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
| <?php | |
| /** | |
| * Replace all occurrences of the search string with the replacement string. | |
| * | |
| * @author Sean Murphy <[email protected]> | |
| * @copyright Copyright 2012 Sean Murphy. All rights reserved. | |
| * @license http://creativecommons.org/publicdomain/zero/1.0/ | |
| * @link http://php.net/manual/function.str-replace.php | |
| * | |
| * @param mixed $search |
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
| // install | |
| // npm i gulp-imagemin imagemin-pngquant imagemin-zopfli imagemin-mozjpeg imagemin-giflossy -f | |
| // node node_modules/jpegtran-bin/lib/install.js | |
| // node node_modules/gifsicle/lib/install.js | |
| // node node_modules/zopflipng-bin/lib/install.js | |
| // node node_modules/mozjpeg/lib/install.js | |
| // node node_modules/giflossy/lib/install.js | |
| // node node_modules/pngquant-bin/lib/install.js | |
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
| <?php | |
| // add the below to your functions file | |
| // then visit the page that you want to see | |
| // the enqueued scripts and stylesheets for | |
| function se_inspect_styles() { | |
| global $wp_styles; | |
| echo "<h2>Enqueued CSS Stylesheets</h2><ul>"; | |
| foreach( $wp_styles->queue as $handle ) : | |
| echo "<li>" . $handle . "</li>"; |