Skip to content

Instantly share code, notes, and snippets.

Proudly powered by 🦄 💩 & ☕️, mostly ☕️

Ian M. Jones ianmjones

Proudly powered by 🦄 💩 & ☕️, mostly ☕️
Block or report user

Report or block ianmjones

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
@ianmjones
ianmjones / as3cf-update_products_downloadable_files.php
Created Apr 16, 2019 — forked from psaikali/as3cf-update_products_downloadable_files.php
Process WooCommerce products and set correct downloadable files if they've been offloaded by WP Offload Media
View as3cf-update_products_downloadable_files.php
<?php
namespace Mosaika;
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
/**
* Register our custom commands.
@ianmjones
ianmjones / build-as3cf-aws2.sh
Last active Apr 1, 2019
A script for downloading the AWS PHP SDK v2, stripping down to S3 functionality and then applying a custom namespace.
View build-as3cf-aws2.sh
#!/usr/bin/env bash
set -e
if [ ! -d src/amazon-s3-and-cloudfront ]; then
echo 'This script must be run from the repository root.'
exit 1
fi
for PROG in composer find sed
View keybase.md

Keybase proof

I hereby claim:

  • I am ianmjones on github.
  • I am ianmjones (https://keybase.io/ianmjones) on keybase.
  • I have a public key ASAJqnJdznVxMNPRftyDQs0LIF-HFMavw8IBTB1mhcWpvwo

To claim this, I am signing this object:

View run-tests.sh
#!/usr/bin/env bash
cd `dirname $0`
source ./.env
while getopts "u:p:h:d:ct:z:s:vkge:" ARG
do
case ${ARG} in
e) TEST_ENV=$OPTARG;;
View docker-compose.yml
version: '2'
services:
#
# Base services.
#
data:
image: deliciousbrains/data@sha256:6fbc27c3c84c0e4d40b261e2c8246a2065a96916481ab475facfcd6e81548f31
labels:
com.deliciousbrains.service: "data"
com.deliciousbrains.project: "${COMPOSE_PROJECT_NAME}"
View wp-cron-pixie.php
<?php
/**
* @link https://github.com/ianmjones/wp-cron-pixie
* @since 1.0
* @package Cron_Pixie
*
* @wordpress-plugin
* Plugin Name: WP Cron Pixie
* Plugin URI: https://github.com/ianmjones/wp-cron-pixie
@ianmjones
ianmjones / main.js
Last active Apr 8, 2016
WP Cron Pixie's Backbone.js based JavaScript
View main.js
var CronPixie = CronPixie || {};
(function( $, CronPixie ) {
'use strict';
/**
* A mixin for collections/models.
* Based on http://taylorlovett.com/2014/09/28/syncing-backbone-models-and-collections-to-admin-ajax-php/
*/
var AdminAjaxSyncableMixin = {
@ianmjones
ianmjones / class-cron-pixie-_get-schedules.php
Last active Apr 11, 2016
Cron_Pixie::_get_schedules()
View class-cron-pixie-_get-schedules.php
<?php
/**
* Returns list of cron schedules.
*
* @return array
*/
private function _get_schedules() {
// Get list of schedules.
$schedules = wp_get_schedules();
@ianmjones
ianmjones / class-cron-pixie-enqueue-scripts.php
Last active Apr 11, 2016
Cron_Pixie::enqueue_scripts()
View class-cron-pixie-enqueue-scripts.php
<?php
/**
* Enqueues the JS scripts when the main dashboard page is loading.
*
* @param string $hook_page
*/
public function enqueue_scripts( $hook_page ) {
if ( 'index.php' !== $hook_page ) {
return;
}
@ianmjones
ianmjones / class-cron-pixie-dashboard-widget-content.php
Last active Apr 11, 2016
Cron_Pixie::dashboard_widget_content()
View class-cron-pixie-dashboard-widget-content.php
<?php
/**
* Provides the initial content for the widget.
*/
public function dashboard_widget_content() {
?>
<!-- Schedule Item template -->
<script type="text/template" id="cron-pixie-schedule-item-tmpl">
<span class="cron-pixie-schedule-display"><%= display %></span>
<ul class="cron-pixie-events"></ul>
You can’t perform that action at this time.