Skip to content

Instantly share code, notes, and snippets.

Avatar
Proudly powered by 🦄 💩 & , mostly

Ian M. Jones ianmjones

Proudly powered by 🦄 💩 & , mostly
View GitHub Profile
@ianmjones
ianmjones / build-as3cf-aws3.sh
Last active Jul 25, 2020
A script for downloading the AWS PHP SDK v3, stripping down to S3 functionality and then applying a custom namespace.
View build-as3cf-aws3.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 unzip
@ianmjones
ianmjones / build-as3cf-aws2.sh
Last active Mar 10, 2020
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
@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.
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}"
@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>
View class-cron-pixie-construct.php
<?php
/**
* Cron_Pixie constructor.
*
* Registers all action and filter hooks if user can use widget.
*
* @param array $plugin_meta
*/
public function __construct( $plugin_meta = array() ) {
if ( empty( $plugin_meta ) ) {
You can’t perform that action at this time.