Skip to content

Instantly share code, notes, and snippets.

Avatar

Simon Wheatley simonwheatley

View GitHub Profile
View Testing bash stuff
#!/bin/bash -e
#
echo "Hello Simon"
say "Hello Simon"
@simonwheatley
simonwheatley / LICENSE.md
Created Jan 8, 2016
Add GitHub repo collaborators
View LICENSE.md

The GNU General Public License, Version 2, June 1991 (GPLv2)

Copyright (C) 1989, 1991 Free Software Foundation, Inc. 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA

Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed.

@simonwheatley
simonwheatley / fieldmanager-babble-poc.php
Last active Aug 29, 2015
A proof of concept for creating a custom translation UI for a Fieldmanager field group utilising repeatable fields
View fieldmanager-babble-poc.php
<?php
/*
Plugin Name: A8c VIP Translatable Fields Test
Version: 1.0b1
*/
// Code pasted from Fieldmanager site
// using Fieldmanager for a slideshow - any number of slides,
// with any number of related links
@simonwheatley
simonwheatley / babble-demo.php
Created Jun 9, 2015
Demo of a plugin adding two fields in a meta box, one of which is synced and one translated
View babble-demo.php
<?php
/*
Plugin Name: Babble Demo
Description: Demo to show translating (or not) post meta
Version: 1.0
Author: Automattic
Author URI: https://automattic.com/
License: GPL v2 or later
This program is free software; you can redistribute it and/or modify
@simonwheatley
simonwheatley / remove-genericons-example-html.sh
Last active Aug 29, 2015
Remove all files called example.html and containing the string "<title>Genericons</title>". Usage: `./remove-genericons-example-html.sh /path/to/site/`
View remove-genericons-example-html.sh
#!/bin/bash
#
# Remove all files called example.html and
# containing the string
# "<title>Genericons</title>
#
# Copyright Automattic Inc, 2015
#
# This script is free software, and is released under the
# terms of the GPL version 2 or (at your option) any
@simonwheatley
simonwheatley / gist:a3be131e0118f9bef324
Created Apr 14, 2015
Adapt Automattic/syndication to just use WP_RSS and make life easier for users
View gist:a3be131e0118f9bef324
<?php
/**
*
*
* @package
**/
class GlowSyndication {
/**
View build.sh
#!/bin/bash
# Takes a composer controlled repo and pushes a
# composed PACKAGE into a branch called "PACKAGE".
(
# SANITY CHECKS
# Check for uncommitted changes, and refuse to proceed if there are any
if [ -n "$(git ls-files . --exclude-standard --others)" ]; then
@simonwheatley
simonwheatley / get_field_key
Created Jan 27, 2014
Getting an Advanced Custom Fields field_key from a field_name and field_group.
View get_field_key
/**
* Get a field key from a field name. Why isn't this an
* ACF API function?
*
* @param string $field_group The name of the field_group to search
* @param string $field_name The name of the field to find a key for
* @return string|bool The field key if found, else false
*
* @author Simon Wheatley
**/
@simonwheatley
simonwheatley / .gitignore
Last active Dec 26, 2015
Amazing script from Matt Reed, to prompt me to log my time.
View .gitignore
Simon Log.app
@simonwheatley
simonwheatley / automattic-updater.php
Created Aug 29, 2013
Get updates to Automattic code from GitHub
View automattic-updater.php
<?php
/*
Plugin Name: Automattic Updater
Description: Get updates to Automattic code from GitHub
Version: 1.0
Author: Code for the People
Author URI: http://codeforthepeople.com/
Copyright © 2013 Code for the People Ltd