While nginx microcaching already solves page caching (as of static, rarely changing WordPress pages), the performance for dynamically generated pages (like WooCommerce shop pages and admin backend in general) can benefit greatly from additionally using an object cache. Object caching allows an application (in this case WordPress with its plugins, theme, etc.) to store prepared objects (mostly database queries) in a database and quickly retrieve them, therefore improving the performance of dynamic page generation. Object caching is (usually) transparent, which means that it shouldn't be noticeable by users and developers (except for the performance improvements of course).
This file contains 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
# YouTube (english) : https://www.youtube.com/watch?v=FtU2_bBfSgM | |
# YouTube (french) : https://www.youtube.com/watch?v=VjnaVBnERDU | |
# | |
# On your laptop, connect to the Mac instance with SSH (similar to Linux instances) | |
# | |
ssh -i <your private key.pem> ec2-user@<your public ip address> | |
# | |
# On the Mac |
This file contains 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
git clone https://github.com/krakjoe/pcov.git | |
cd pcov | |
/usr/local/bin/phpize | |
./configure | |
export INCLUDE_PATH=/Applications/Local.app/Contents/Resources/extraResources/lightning-services/php-7.3.5+3/bin/darwin/include | |
make CPPFLAGS="-I${INCLUDE_PATH}/php -I${INCLUDE_PATH}/php/main -I${INCLUDE_PATH}/php/TSRM -I${INCLUDE_PATH}/php/Zend -I${INCLUDE_PATH}/php/ext -I${INCLUDE_PATH}/php/ext/date/lib" | |
sudo make install | |
sudo cp $(php-config --extension-dir)/pcov.so /usr/local/php/extensions |
This file contains 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
define(‘ITSEC_USE_CRON’, true); | |
define('ITSEC_DISABLE_MODULES', true); | |
define('ITSEC_DISABLE_TWO_FACTOR', true); | |
define('ITSEC_DISABLE_INACTIVE_USER_CHECK', true); | |
define(‘ITSEC_DEBUG’, true); |
Also see: AWS CLI Setup
This file contains 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
/** | |
* Encryption class for encrypt/decrypt that works between programming languages. | |
* | |
* @author Vee Winch. | |
* @link https://stackoverflow.com/questions/41222162/encrypt-in-php-openssl-and-decrypt-in-javascript-cryptojs Reference. | |
* @link https://github.com/brix/crypto-js/releases crypto-js.js can be download from here. | |
*/ | |
class Encryption { |
This file contains 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
cat ~/.aws/config | |
[default] | |
region = us-standard | |
output = json |
This cheat sheet provides a detailed overview of the exposed lifecycle events and available commands (and entrypoints) of the Serverless framework, that can be hooked by plugins (internal and external ones). The document is structured by the commands invoked by the user.
Lifecycle events are shown as the globally available outer events (all providers) and sub lifecycle events that are provider specific in the called order. Currently only the AWS provider is shown. If you have information about the other provider,
This file contains 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 | |
// Define a constant to use with html emails | |
define("HTML_EMAIL_HEADERS", array('Content-Type: text/html; charset=UTF-8')); | |
// @email - Email address of the reciever | |
// @subject - Subject of the email | |
// @heading - Heading to place inside of the woocommerce template | |
// @message - Body content (can be HTML) | |
function send_email_woocommerce_style($email, $subject, $heading, $message) { |
NewerOlder