Skip to content

Instantly share code, notes, and snippets.

View jbsulli's full-sized avatar

Joshua Sullivan jbsulli

  • Truepill
  • Austin, TX, USA
View GitHub Profile
@jbsulli
jbsulli / node-cli.md
Last active November 25, 2020 05:27
How to create a node command line integration module
@chrisjhoughton
chrisjhoughton / enforce-http.liquid.js
Last active February 14, 2024 07:49
How to build an ajax form on Shopify. See http://inside.sauce.ly/how-to-build-an-ajax-login-form-on-shopify/ for the full blog post.
/*
* Ensure the http protocol is always used on the myshopify.com domains.
* Uses liquid to input the correct URL.
*/
if (window.location.href.match(/https:\/\/.*.myshopify.com/) && top === self) {
window.location.href = window.location.href.replace(/https:\/\/.*.myshopify.com/, 'http://{{ shop.domain }}');
}