Skip to content

Instantly share code, notes, and snippets.

View earnjam's full-sized avatar

William Earnhardt earnjam

View GitHub Profile
@earnjam
earnjam / lastmilestone.json
Last active June 6, 2019 00:59
Bulk Modified ticket last milestone update applied.
[
{
"id": "43773",
"milestone": "Future Release"
},
{
"id": "37805",
"milestone": null
},
{
@earnjam
earnjam / vvv-custom.yml
Created October 25, 2018 00:28
Custom config for VVV I use for development on the WordPress project
---
sites:
# Development environment pulled from trunk
# Useful for contributing to Wordpress Core
wordpress-develop:
repo: https://github.com/earnjam/custom-site-template-develop.git
nginx_upstream: php71
hosts:
- wordpress-develop.test
@earnjam
earnjam / playbook-post.yml
Created October 11, 2018 15:15
Ansible playbook for VCCW to install ModSecurity and setup the OWASP ModSecurity Core Rule Set
---
- hosts: all
become: yes
tasks:
- name: Install ModSecurity
apt:
name: libapache2-modsecurity
update_cache: yes
@earnjam
earnjam / .bash_profile
Created September 28, 2018 19:39
Custom bash profile
# Description: This file holds all my BASH configurations and aliases
#
# Sections:
# 1. Environment Configuration
# 2. Make Terminal Better (remapping defaults and adding functionality)
# 3. File and Folder Management
# 4. Searching
# 5. Process Management
# 6. Networking
# 7. System Operations & Information
@earnjam
earnjam / WPDev.code-workspace
Last active May 20, 2018 00:50
Custom VS Code Workspace settings for VVV for WordPress Core development
{
"folders": [
{
"path": "."
}
],
"settings": {
"phpcs.enable": true,
"phpcs.standard": "WordPress-Core",
"phpcbf.enable": true,
@earnjam
earnjam / vvv-custom.yml
Last active May 20, 2018 10:13
Custom configuration file for VVV designed for contributing to Wordpress Core
---
sites:
# A default installation of the latest released version of WordPress.
wordpress-default:
repo: https://github.com/Varying-Vagrant-Vagrants/custom-site-template.git
hosts:
- wordpress.test
# Development environment pulled from trunk
# Useful for contributing to Wordpress Core
@earnjam
earnjam / maynard-loop.txt
Created December 13, 2017 15:30
URL polygon coordinates for Maynard Loop in Cary, NC - data.townofcary.org
&geofilter.polygon=(35.80147756805686,-78.79181027412415),(35.80116866034035,-78.79259884357452),(35.800742278701975,-78.79341959953307),(35.799650209170885,-78.79501819610596),(35.79830576829492,-78.79696011543274),(35.79690909202879,-78.79910588264465),(35.79616070710445,-78.80040407180786),(35.79549063555143,-78.80149841308592),(35.794616053140274,-78.80281805992126),(35.7941809339268,-78.80356907844543),(35.793732758645916,-78.80449175834656),(35.79339336209106,-78.80535542964935),(35.793201906984706,-78.80598843097687),(35.792740672334254,-78.80803227424622),(35.792605782449385,-78.80841314792633),(35.79228378631468,-78.8089656829834),(35.791957437549506,-78.8093250989914),(35.79153100647661,-78.80962014198303),(35.79091746387749,-78.80986154079437),(35.78900718389184,-78.80994737148285),(35.78343273312154,-78.81011903285979),(35.78331958643491,-78.81007075309753),(35.78296273813748,-78.81009221076965),(35.78248403668611,-78.8100117444992),(35.78210542531478,-78.80985081195831),(35.781452642853665,-78.80
@earnjam
earnjam / backupphpbb
Created December 9, 2017 11:49
Simple bash script to back up a phpBB database daily
#!/bin/bash
mysqldump --defaults-extra-file=/path/to/config.cnf db_name --single-transaction --quick --ignore-table=db_name.phpbb_search_wordmatch --ignore-table=db_name.phpbb_search_wordlist --ignore-table=db_name.phpbb_sessions > "/path/to/backups/filename-$(date '+%u').sql"
@earnjam
earnjam / gist:11019679
Created April 18, 2014 01:02
Multisite Problem Example
if ( is_admin() ) {
$this->install(is_multisite() ? true : false); //we run this here because activation hooks aren't triggered when updating - see http://wp.mu/8kv
$this->init_admin_pages();
}
@earnjam
earnjam / exclude_pages.php
Created June 14, 2013 12:13
These are some small patches to the Exclude Pages plugin for Wordpress by Simon Wheatley. Changes: - Switched out the add_option() and delete_option() functions for update_option(). If delete_option() fails for any reason, add_option() will fail to update the excluded pages array. update_option() seems like the better choice here because it will…
<?php
/*
Plugin Name: Exclude Pages from Navigation
Plugin URI: http://wordpress.org/extend/plugins/exclude-pages/
Description: Provides a checkbox on the editing page which you can check to exclude pages from the primary navigation. IMPORTANT NOTE: This will remove the pages from any "consumer" side page listings, which may not be limited to your page navigation listings.
Version: 1.93
Author: Simon Wheatley
Author URI: http://simonwheatley.co.uk/wordpress/
Copyright 2007 Simon Wheatley