Skip to content

Instantly share code, notes, and snippets.

View GaryJones's full-sized avatar

Gary Jones GaryJones

View GitHub Profile
@GaryJones
GaryJones / style.css
Created August 5, 2015 12:34
Klingon font (pIqad)
@font-face {
font-family:pIqad;
src:url('data:font/eot;base64,piAAAOAfAAABAAIAAAAAAAIABgMAAAAAAAABAPQBAAAAAExQAQAAAAAAABAAAAAAAAAAAAEAAAAAAAAAJJpHDQAAAAAAAAAAAAAAAAAAAAAAAAoAcABJAHEAYQBEAAAADABNAGUAZABpAHUAbQAAADQAVgBlAHIAcwBpAG8AbgAgADAAMAAxAC4AMAAwADAAIABCAHUAaQBsAGQAIAAxADAAMQAgAAAAGABwAEkAcQBhAEQAIABNAGUAZABpAHUAbQAAAAAAAAEAAAAOAIAAAwBgR0RFRgD5AMoAABeEAAAAWkdQT1NuacfnAAAX4AAAB95HU1VCbJF0jwAAH8AAAAAgT1MvMmv6eAMAAAFoAAAAVmNtYXDq+gR+AAACZAAAAWpnYXNw//8AAwAAF3wAAAAIZ2x5Zmml+jsAAAQkAAAO6GhlYWT1EmRrAAAA7AAAADZoaGVhFA4HiwAAASQAAAAkaG10eP5hBTgAAAHAAAAAomxvY2FKjU36AAAD0AAAAFRtYXhwAD0AbwAAAUgAAAAgbmFtZaBegQ4AABMMAAAC3XBvc3SeSYZwAAAV7AAAAY8AAQAAAAEAAA1HmiRfDzz1AAsIAAAAAAC/4MTYAAAAAM26Vur/mP17CMAGMQAAAAgAAgAAAAAAAAABAAAF1/3bBdwJof+Y/+YIwAABAAAAAAAAAAAAAAAAAAAAKAABAAAAKQA+AAIAAAAAAAIAEAAvAAEAAAAAAAAAAAAAAAEGbgH0AAUAAAXcBkAAAAPWBdwGQAAAAAAAZgISAAACAAYDAAAAAAAAAAAAARAAAAAAAAAAAAAAAFBmRWQAAAAA+P4HCP8IBdwHAwNRAAAAAQAAAAAAAAAAAAAE5QEAAqoAAAfQ/8wH/wAICHT/1QeOAC4F7AABB+//8gUVAEUGjABhB8UAOwa9//MFtgA+BzIAFwfj/6EGvwAABTwAfQP6
<?php
namespace GMJ\Foobar;
class Config extends \ArrayObject {}
@GaryJones
GaryJones / edd_mu_updater.php
Created July 10, 2015 11:03
EDD-VAT MU updater file
<?php
/**
*
* Version: 1.0.7
*
* This must-use plugin implements three things:
*
* 1) A class that will be used indirectly by a host plugin to
* check to see if this plugin already exists and, if not,
* will copy this file to the mu-plugins folder.
@GaryJones
GaryJones / functions.php
Created May 30, 2015 08:51
bookmarks.gj theme
<?php
/** Start the engine **/
require_once( TEMPLATEPATH . '/lib/init.php' );
require_once( CHILD_DIR . '/tag_list_widget.php' );
require_once( CHILD_DIR . '/tag_chain_widget.php' );
require_once( CHILD_DIR . '/tag_filter_widget.php' );
/** Add support for custom background **/
add_theme_support( 'custom-background' );
Verifying I am +garyjones on my passcard. https://onename.com/garyjones
<?php
add_action( 'genesis_entry_content', 'kat_grid_content', 9 );
/**
* Change the number of words in excerpt if in the grid loop and customize READ MORE, add accessibility.
*/
function kat_grid_content() {
// Make sure we're in the grid loop.
if ( ! apply_filters( 'is_genesis_grid_loop', false ) ) {
return;
@GaryJones
GaryJones / commenting.php
Last active August 29, 2015 14:20
Test file for checking which Squiz.Commenting rules to ignore.
<?php
/**
* Summary (no period for file headers)
*
* Description (use period).
*
* @link http://example.com
* @since 5.0.0
*
* @package WordPress
@GaryJones
GaryJones / gist:56938d30bb86cd1c078a
Last active March 18, 2018 14:02
Config Files list

Config Files

Development-related files that might be found in version-controlled projects. Doesn't include editor-specific files.

Files

  • .editorconfig - EditorConfig define and maintain consistent coding styles between different editors and IDEs.
  • .gitignore - ignore files from version control. Note, don't add system files - contributors should be globally ignoring these on their local machines. Only use for files created during project build, credentials files etc.
<?php
/**
* Blog Intro
*/
add_action( 'genesis_before_loop', 'rgc_blog_intro' );
/**
* Add title and content before blog archive loop.
*
* @author Robin Cornett
@GaryJones
GaryJones / RedirectsCept.php
Last active May 20, 2019 15:21
Codeception 301 Redirection Tests
<?php
$I = new RedirectsTester($scenario);
$I->wantTo('check 301 redirects are working');
// First, test /login/ page gets rewritten to https://
$I->seePermanentRedirectToHttpsFor('login/');
$I->seePermanentRedirectToHttpsFor('login/?redirect_to=foo');