Skip to content

Instantly share code, notes, and snippets.

View AugustMiller's full-sized avatar
🌳

August Miller AugustMiller

🌳
View GitHub Profile

Keybase proof

I hereby claim:

  • I am augustmiller on github.
  • I am awmiller (https://keybase.io/awmiller) on keybase.
  • I have a public key ASBgbxeFHc-8kvRHREGvnJy2bEqD5s8caibq0ohbwJnm4wo

To claim this, I am signing this object:

@AugustMiller
AugustMiller / TestAdjuster.php
Last active January 9, 2020 09:53
Simple Commerce Adjuster implementation
<?php
/**
* Example Adjuster.
* Place in: `/myplugin/adjusters/Test.php` (and rename as such)
*
* @link https://oof.studio/
* @copyright Copyright (c) 2018 oof. Studio
*/
namespace oofbar\test\adjusters;
@AugustMiller
AugustMiller / deploy.php
Last active April 15, 2019 05:19
Boilerplate Deployer config for a Craft 3 project https://deployer.org
<?php
namespace Deployer;
require 'recipe/composer.php';
// Project name
set('application', 'my-project');
// Project repository
set('repository', '[email protected]:organization/repo.git');
@AugustMiller
AugustMiller / image-resizer.liquid
Last active March 9, 2018 06:04
A roundabout way of re-building image URLs in Shopify without the `img_url` helper. Supports size declarations, but not cropping settings.
{% comment %}
Set up `transform` string for inclusion in a URL:
{% endcomment %}
{% if size %}
{% assign transform = size | prepend: '_' %}
{% else %}
{% assign transform = '' %}
{% endif %}
@AugustMiller
AugustMiller / serialize-form-as-object.coffee
Created September 26, 2017 01:48
Convert jQuery's `serializeArray` output into an object that better matches the structure of an HTTP request or POST body.
module.exports = (serializeArrayResult) ->
obj = {}
arr = serializeArrayResult
for pair in arr
if obj[pair.name] isnt undefined
if !Array.isArray obj[pair.name]
# Convert existing single value to an array:
obj[pair.name] = [obj[pair.name]]
@AugustMiller
AugustMiller / CustomKirbyValetDriver.php
Created June 27, 2017 00:36
Kirby Driver for Valet, with support for running the application in a subfolder of the project.
<? class CustomKirbyValetDriver extends ValetDriver
{
/**
* Determine if the driver serves the request.
*
* @param string $sitePath
* @param string $siteName
* @param string $uri
* @return void
*/
@AugustMiller
AugustMiller / SfscPlugin.php
Last active April 24, 2017 21:05
Sprout Form + Solspace Calendar
<? namespace Craft;
class SfscPlugin extends BasePlugin
{
public function getName()
{
return Craft::t('Event Attendance');
}
public function getVersion()
@AugustMiller
AugustMiller / banner.html
Created April 17, 2017 21:35
oof. Studio Banner
<!--
@@@@@@ @@@@@@ @@@@@@@@ @@@@@@ @@@@@@@ @@@ @@@ @@@@@@@ @@@ @@@@@@
@@@@@@@@ @@@@@@@@ @@@@@@@@ @@@@@@@ @@@@@@@ @@@ @@@ @@@@@@@@ @@@ @@@@@@@@
@@! @@@ @@! @@@ @@! !@@ @@! @@! @@@ @@! @@@ @@! @@! @@@
!@! @!@ !@! @!@ !@! !@! !@! !@! @!@ !@! @!@ !@! !@! @!@
@!@ !@! @!@ !@! @!!!:! !!@@!! @!! @!@ !@! @!@ !@! !!@ @!@ !@!
!@! !!! !@! !!! !!!!!: !!@!!! !!! !@! !!! !@! !!! !!! !@! !!!
!!: !!! !!: !!! !!: !:! !!: !!: !!! !!: !!! !!: !!: !!!
:!: !:! :!: !:! :!: :!: !:! :!: :!: !:! :!: !:! :!: :!: !:!
<? namespace Craft;
class HelpersPlugin extends BasePlugin
{
public function getName()
{
return Craft::t('Helpers');
}
public function getVersion()
@AugustMiller
AugustMiller / HelpersPlugin.php
Last active February 19, 2019 00:53
Basic asset cache busting plugin for Craft CMS.
<? namespace Craft;
# craft/plugins/helpers/HelpersPlugin.php
class HelpersPlugin extends BasePlugin
{
public function getName()
{
return Craft::t('Helpers');
}