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-aws2.sh
Last active April 18, 2024 16:05
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
@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.

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 / 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;
}
@ianmjones
ianmjones / class-cron-pixie-dashboard-widget-content.php
Last active April 11, 2016 11:29
Cron_Pixie::dashboard_widget_content()
<?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>
@ianmjones
ianmjones / class-cron-pixie-construct.php
Last active April 11, 2016 10:40
Cron_Pixie::__construct
<?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 ) ) {