Skip to content

Instantly share code, notes, and snippets.

View ianmjones's full-sized avatar
Proudly powered by ✨ 🦄 💩 & ☕, mostly ☕

Ian M. Jones ianmjones

Proudly powered by ✨ 🦄 💩 & ☕, mostly ☕
View GitHub Profile
@ianmjones
ianmjones / build-as3cf-aws3.sh
Last active March 26, 2024 08:34
A script for downloading the AWS PHP SDK v3, stripping down to S3 functionality and then applying a custom namespace.
#!/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 unzip
@ianmjones
ianmjones / as3cf-update_products_downloadable_files.php
Created April 16, 2019 10:39 — 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
<?php
namespace Mosaika;
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
/**
* Register our custom commands.
@ianmjones
ianmjones / build-as3cf-aws2.sh
Last active August 28, 2024 03:52
A script for downloading the AWS PHP SDK v2, stripping down to S3 functionality and then applying a custom namespace.
#!/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

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:

#!/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;;
version: '2'
services:
#
# Base services.
#
data:
image: deliciousbrains/data@sha256:6fbc27c3c84c0e4d40b261e2c8246a2065a96916481ab475facfcd6e81548f31
labels:
com.deliciousbrains.service: "data"
com.deliciousbrains.project: "${COMPOSE_PROJECT_NAME}"
@ianmjones
ianmjones / wp-cron-pixie.php
Created April 8, 2016 14:47
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 April 8, 2016 12:48
WP Cron Pixie's Backbone.js based JavaScript
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 April 11, 2016 11:31
Cron_Pixie::_get_schedules()
<?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 April 11, 2016 11:30
Cron_Pixie::enqueue_scripts()
<?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;
}