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 | |
/** | |
* 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 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: Disable Yoast Nags | |
* Description: Hides all Yoast premium nags in the backend. | |
* Version: 1.0 | |
* Author: Zachary Scott | |
*/ | |
namespace zacscott; |
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
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 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 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 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 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 | |
/** | |
* Renders BBCode to html, suitable to be embedded in a document. Supports only | |
* a limited set of BBCode tags (can be extended), which are: | |
* | |
* @param $bbcode The bbcode to be rendered. Must not be `null` or empty | |
* string. | |
* @param $reps Optional additional replacements. Allows you to add custom tags | |
* etc. Should be an associative array, mapping a regex (preg) to replacement. |
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
# 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 mysql@5.7 | |
ln -s /usr/local/Cellar/mysql-client/5.7.22/bin/mysql_config /usr/local/bin/mysql_config |
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 | |
add_action( 'plugins_loaded', function() { | |
$settings = new zacscott\SettingsBuilder(); | |
$settings->page( array( | |
'title' => 'TEST ', | |
'menu' => 'Test Settings', | |
) ); |
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 | |
/** | |
* Plugin Name: Notes | |
* Description: Keep private notes within WordPress | |
* Version: 1.0 | |
* Author: Zachary Scott | |
* Author URI: https://www.zacscott.net | |
* Plugin URI: https://gist.github.com/zacscott/b4cbacf5a0825a270a28 | |
* License: GPLv3+ | |
*/ |
NewerOlder