Skip to content

Instantly share code, notes, and snippets.

Tom Willmot willmot

Block or report user

Report or block willmot

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
willmot / gist:8869315
Created Feb 7, 2014
Full Provision with Salty WordPress
View gist:8869315
vagrant provision
[default] Running provisioner: salt...
Copying salt minion config to vm.
Checking if salt-minion is installed
salt-minion found
Checking if salt-call is installed
salt-call found
Using Bootstrap Options: -c /tmp -C
Salt binaries found. Configuring only.
stdin: is not a tty
willmot / .gitignore
Created May 29, 2012
Yell .gitignore file
View .gitignore
willmot / github callback handler.php
Created Jun 26, 2012
Auto git pull on every push to github
View github callback handler.php
// TODO Handle tagged releases
// TODO Check current branch is checked out before pulling
// TODO Store sites in separate config file
// TODO Allow config file to be in folder above root.
// TODO Allow updating via $_GET?
// TODO Make sure sane git status before pulling?
// You can't view this file directly
willmot / httpd-headers.conf
Created Jul 4, 2012
Cache control headers
View httpd-headers.conf
<IfModule mod_mime.c>
AddType text/css .css
AddType application/x-javascript .js
AddType text/x-component .htc
AddType text/html .html .htm
AddType text/richtext .rtf .rtx
AddType image/svg+xml .svg .svgz
AddType text/plain .txt
AddType text/xsd .xsd
AddType text/xsl .xsl
View brew-config
HEAD: 26c0d8f475daef5f1ba60625e7fbdad3f002cc78
HOMEBREW_CELLAR: /usr/local/Cellar
CPU: dual-core 64-bit penryn
OS X: 10.8-x86_64
Xcode: 4.5
GCC-4.0: N/A
GCC-4.2: N/A
willmot / gist:3066516
Created Jul 7, 2012
brew install -v svn on 10.8 with Xcode 4.5 DP2
View gist:3066516
brew install -v svn
==> Installing subversion dependency: serf
==> Downloading
Already downloaded: /Library/Caches/Homebrew/serf-1.1.0.tar.bz2
/usr/bin/tar xf /Library/Caches/Homebrew/serf-1.1.0.tar.bz2
==> ./configure --disable-debug --disable-dependency-tracking --prefix=/usr/local/Cellar/serf/1.1.0
./configure --disable-debug --disable-dependency-tracking --prefix=/usr/local/Cellar/serf/1.1.0
checking for chosen layout... Serf
checking for working mkdir -p... yes
checking build system type... x86_64-apple-darwin12.0.0
View gist:7805401 localhost
# The following lines are desirable for IPv6 capable hosts
::1 ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
ff02::3 ip6-allhosts salty-wordpress salty-wordpress vagrant-ubuntu-raring-32
willmot / php.rb
Created Mar 20, 2012 — forked from pgib/php.rb
PHP 5.2.4 Formula for Homebrew
View php.rb
require 'formula'
def mysql_installed?
`which mysql_config`.length > 0
class Php < Formula
url ''
homepage ''
md5 '0826e231c3148b29fd039d7a8c893ad3'
willmot / termmeta.php
Last active May 6, 2016
Add termmeta support to WordPress including a termmeta table and all the standard WordPress metadata functions
View termmeta.php
* Setup the termmeta table
* Use <code>add_theme_support( 'term-meta' );</code> to enable support for term meta
function hm_add_term_meta_table() {
global $wpdb;
willmot / plugin-activate.php
Created Jan 29, 2012
Require a minimum PHP version on plugin activation
View plugin-activate.php
// Don't activate on anything less than PHP 5.2.4
if ( version_compare( phpversion(), '5.2.4', '<' ) ) {
require_once( ABSPATH . 'wp-admin/includes/plugin.php' );
deactivate_plugins( WPRP_PLUGIN_SLUG . '/plugin.php' );
if ( isset( $_GET['action'] ) && ( $_GET['action'] == 'activate' || $_GET['action'] == 'error_scrape' ) )
die( __( 'WP Remote requires PHP version 5.2.4 or greater.', 'wpremote' ) );
You can’t perform that action at this time.