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 | |
/** | |
* Plugin Name: Object Cache | |
* Description: Object cache backend - uses APC for local development, Redis or Memcached for prod/staging. | |
* Version: 3.0 | |
* Author: The Code Company | |
* Author URI: http://thecode.co | |
* | |
* @package thecodeco | |
*/ |
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 | |
# Automatically hits all sitemaps on a site to pre-cache then at the edge. | |
# CONFIG | |
SITEMAP_URL=https://www.oursite.com.au/sitemap_index.xml | |
# Pull the index sitemap and get a list of all of the individual sitemaps. | |
echo "PULLING $SITEMAP_URL" | |
sitemaps=`curl $SITEMAP_URL | awk -F '[<>]' '/loc/{print $3}'` |
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
import os | |
import re | |
import subprocess | |
import sys | |
import tempfile | |
def log(message): | |
"""Print a log message to console, will be a darker colour than normal print()""" |
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
# Python's mysqlclient requires MySQL version 5.7, however brew installs MySQL v8 by default. | |
# This is how you can install MySQL 5.7 and have it work to build mysqlclient | |
brew install [email protected] | |
ln -s /usr/local/Cellar/mysql-client/5.7.22/bin/mysql_config /usr/local/bin/mysql_config |
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 | |
/* | |
* Plugin Name: Fragment Cache | |
* Description: Provides the <code>FragmentCache</code> helper class | |
* Version: 1.2 | |
* Author: Zachary Scott | |
*/ | |
namespace zacscott; |
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 | |
/* | |
* Plugin Name: Routes for WordPress | |
* Description: Routes class provider plugin | |
* Version: 2.0 | |
* Author: Zachary Scott | |
*/ | |
namespace zacscott; |
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 | |
/** | |
* Plugin Name: Photon CDN | |
* Version: 1.1 | |
* Description: Use the WP.com Photon image CDN without installing JetPack | |
* Author: Zachary Scott | |
*/ | |
namespace zacscott; |
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 | |
/** | |
* Plugin Name: Purge Cache | |
* Description: Allow admins to purge the WordPress cache | |
* Version: 1.1 | |
* Author: Zachary Scott | |
*/ | |
namespace zacscott; |
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 | |
/** | |
* Plugin Name: Allow HTTPS | |
* Description: Fixes the canonical URL to always be HTTP | |
* Version: 1.0 | |
* Author: Zachary Scott | |
*/ | |
namespace zacscott; |
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 | |
/** | |
* Plugin Name: Relative URLs | |
* Description: Converts all links in post content, attachments etc. to root | |
* relative. This is specifically designed to work well with | |
* <a href="https://crowdfavorite.com/ramp/">RAMP</a>. | |
* Version: 1.1 | |
* Author: Zachary Scott | |
*/ |
NewerOlder