Skip to content

Instantly share code, notes, and snippets.

View bdunlap's full-sized avatar

Ben Dunlap bdunlap

View GitHub Profile
@bdunlap
bdunlap / resend-order-webhook.php
Created May 11, 2012 13:56
Resends a Shopify order to a webhook target
<?php
define('API_KEY', 'YOUR API KEY HERE');
define('SECRET', 'YOUR SECRET HERE');
define('STORE_DOMAIN', 'YOUR STORE DOMAIN HERE');
define('WEBHOOK_TARGET', 'your webhook URL here');
ini_set('display_errors', 'On');
ini_set('html_errors', 'Off');
error_reporting(-1);
@bdunlap
bdunlap / weber-office-chants.html
Created September 14, 2011 05:14
First pass at organizing, into HTML, the "office" section of the new Fr. Weber collection on musicasacra.com. The content inside the "format_text" div, which begins at line 19, will probably copy-and-paste straight into a Wordpress page.
<html>
<head>
<link rel="stylesheet" href="http://musicasacra.com/wordpress/wp-content/themes/thesis/style.css?101409-232152" type="text/css" media="screen, projection" />
<link rel="stylesheet" href="http://musicasacra.com/wordpress/wp-content/themes/thesis/custom/layout.css?061010-201105" type="text/css" media="screen, projection" />
<!--[if lte IE 7]><link rel="stylesheet" href="http://musicasacra.com/wordpress/wp-content/themes/thesis/lib/css/ie.css?090909-05006" type="text/css" media="screen, projection" /><![endif]-->
<link rel="stylesheet" href="http://musicasacra.com/wordpress/wp-content/themes/thesis/custom/custom.css" type="text/css" media="screen, projection" />
</head>
<body class="page page-template-default">
<div id="container">
<div id="page">
@bdunlap
bdunlap / resend-webhook.php
Created September 7, 2011 15:26
Given a Shopify order ID, pulls the order JSON from Shopify API and resends the order to an arbitrary webhook URL.
<?php
$settings = array(
'store-domain' => 'YOUR SHOPIFY DOMAIN HERE',
'api-key' => 'YOUR API KEY HERE',
'api-secret' => 'YOUR API SECRET HERE',
'webhook-url' => 'YOUR WEBHOOK URL HERE, INCLUDING "KEY" PARAMETER IF APPLICABLE',
);
ini_set('display_errors', 'On');
error_reporting(-1);