Codes and details are moved to https://easyengine.io/tutorials/wordpress/woocommerce-window-shopping-caching-technique/
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
#!/bin/bash | |
# Script inspired by https://gist.github.com/1025598 | |
# Script inspired by https://gist.github.com/chmac/2575823 | |
#### WARNING #### | |
#### Please be careful with this script. The use of eval $(find) is dangerous. | |
#### If a user can upload a file called wp-config.php anywhere onto your site, | |
#### they can probably execute arbitrary commands via this script. | |
#### You have been warned. GPL, no warranty. |
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 | |
/* | |
OCP - Opcache Control Panel (aka Zend Optimizer+ Control Panel for PHP) | |
Author: _ck_ (with contributions by GK, stasilok) | |
Version: 0.1.6 | |
Free for any kind of use or modification, I am not responsible for anything, please share your improvements | |
* revision history | |
0.1.6 2013-04-12 moved meta to footer so graphs can be higher and reduce clutter | |
0.1.5 2013-04-12 added graphs to visualize cache state, please report any browser/style bugs |
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
#!/bin/bash | |
set -o errexit | |
# Author: David Underhill | |
# Script to permanently delete files/folders from your git repository. To use | |
# it, cd to your repository's root and then run the script with a list of paths | |
# you want to delete, e.g., git-delete-history path1 path2 | |
# | |
# retrieved from: http://dound.com/2009/04/git-forever-remove-files-or-folders-from-history/ | |
# |
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 | |
/* | |
Usage: | |
$frag = new CWS_Fragment_Cache( 'unique-key', 3600 ); // Second param is TTL | |
if ( !$frag->output() ) { // NOTE, testing for a return of false | |
functions_that_do_stuff_live(); | |
these_should_echo(); | |
// IMPORTANT | |
$frag->store(); | |
// YOU CANNOT FORGET THIS. If you do, the site will break. |
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
#!/bin/bash | |
#### | |
# Split MySQL dump SQL file into one file per table | |
# based on http://blog.tty.nl/2011/12/28/splitting-a-database-dump | |
#### | |
if [ $# -lt 1 ] ; then | |
echo "USAGE: bash mysql_splitdump.sh DUMP_FILE [TABLE]" | |
exit |
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 | |
//* Using the Gravity Forms editor, be sure to check "Allow field to be populated dynamically under Advanced Options | |
//* You will need to set the Field Parameter Name value to work with the filter as follows: gform_field_value_$parameter_name | |
//* Dynamically populate first name for logged in users | |
add_filter('gform_field_value_first_name', 'populate_first_name'); | |
function populate_first_name($value){ | |
global $current_user; | |
get_currentuserinfo(); | |
return $current_user->user_firstname; |
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
#!/bin/sh | |
# move this file to /etc/init.d/monit | |
### BEGIN INIT INFO | |
# Provides: monit | |
# Required-Start: $remote_fs | |
# Required-Stop: $remote_fs | |
# Should-Start: $all | |
# Should-Stop: $all |
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
ignoreip = 127.0.0.0/8 10.0.0.0/8 172.16.0.0/12 192.168.0.0/16 199.27.128.0/21 173.245.48.0/20 103.21.244.0/22 103.22.200.0/22 103.31.4.0/22 141.101.64.0/18 108.162.192.0/18 190.93.240.0/20 188.114.96.0/20 197.234.240.0/22 198.41.128.0/17 162.158.0.0/15 104.16.0.0/12 2400:cb00::/32 2606:4700::/32 2803:f800::/32 2405:b500::/32 2405:8100::/32 |
I hereby claim:
- I am rahul286 on github.
- I am rahul286 (https://keybase.io/rahul286) on keybase.
- I have a public key whose fingerprint is F3EE 65A9 C240 F22C D088 39EA 35F8 2EAE 1FE9 2BA3
To claim this, I am signing this object: