Skip to content

Instantly share code, notes, and snippets.

@martyboggs
martyboggs / index.html
Last active August 29, 2015 14:10
supports point too now!
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Moving Path Handles</title>
<script type="text/javascript" src="http://paperjs.org/static/js/paper.js"></script>
<script type="text/paperscript" canvas="canvas">
var handle;
// Create a circle shaped path at the center of the view,
// with a radius of 100:
@martyboggs
martyboggs / wordpress-email.php
Last active January 18, 2019 02:20
set up a wordpress email (action must match hook)
<!-- functions.php -->
<?php
add_action('wp_enqueue_scripts', function () {
wp_enqueue_script('main', plugins_url( 'main.js', __FILE__ ), ['jquery'], '1');
wp_localize_script('main', 'php_vars', [
'ajax_url' => admin_url('admin-ajax.php'),
'ajax_nonce' => wp_create_nonce('horses-outsmarting-sharks'),
]);
});
@martyboggs
martyboggs / colorways-products.html
Created November 22, 2018 07:56
Shopify Change Colorways into Products
<!-- theme.liquid - add asset before </body> Make sure the js file exists -->
{{ 'bcpo-collection-variants.js' | asset_url | script_tag }}
<!-- sections/collection-template.liquid - inside .products -->
<script style="display: none">
var bcpo_qv_products = [];
</script>
<!-- snippets/product-grid-item.liquid - add class to .box.product -->
id-{{ product.id }}
@martyboggs
martyboggs / best-custom-product-options-customization.html
Last active August 21, 2023 13:55
Best Custom Product Options (Shopify App) CSS Customizations https://www.relentlessapps.com
<!--
Below are some CSS snippets that you can put in your theme.
To add them, navigate to your Shopify admin page.
Click Online Store
Click the Actions dropdown
Choose Edit code. This will take you to a code editor.
We recommend copying the code snippet to your theme.liquid file between the <head> and </head> tags.
-->