Skip to content

Instantly share code, notes, and snippets.

@JimmyRittenborg
JimmyRittenborg / compress.liquid
Last active June 17, 2023 12:11
HTML Compressor in Shopify Liquid
{% comment %}
Input
{% endcomment %}{% capture _content %}{{ content }}{% endcapture %}{% comment %}
Remove redundant closing tags
{% endcomment %}{% assign _endings = "html head body li dt dd p rt rp optgroup option colgroup caption thead tbody tfoot tr td th" | split: " " %}{% for _element in _endings %}
{% capture _end %}</{{ _element }}>{% endcapture %}
@stewartknapman
stewartknapman / shopify_checkout_reset.css
Last active June 6, 2017 06:12
A reset of the Shopify checkout stylesheet.
/*
* Shopify checkout reset
*/
/* Reset base elements */
body, h1, h2, h3, h4, h5, h6, p, h1 span.subtitle, h3.divider, #welcome, #container, #container.slim, #main, #container.slim #main, #content, #header, #container.slim #header, #header h1,
#info-bar, #footer, .footer p, #container.slim #footer, #overview, #overview h2, #overview a, #products, #done, #wallet, div.wallet-highlight, #cost, #order-num, #success, #steps, #thumbs,
#thumbs div, #thumbs td, .slim #thumbs td, #thumbs h3, #thumbs h3 span, #thumbs span, #overview .hint, #payment-type, #payment-type li, #payment-type li:hover, li.text-payment, .center,
#addresses, #email, #email label, #email input, #shipping-same label, .address-notification, #gateway-logos, #gateway-logos img, #pay-with, #pay-with h3, #payment, #or, #payment-methods li,
#payment-methods input, #credit-card-valid, img.credit-card, .field-with-errors, .field-with-errors input, .field-with-errors .error-message, .severe-error, .gleft, .gright, label,
@mhawksey
mhawksey / gist:1442370
Last active February 25, 2024 12:01
Google Apps Script to read JSON and write to sheet
function getJSON(aUrl,sheetname) {
//var sheetname = "test";
//var aUrl = "http://pipes.yahoo.com/pipes/pipe.run?_id=286bbb1d8d30f65b54173b3b752fa4d9&_render=json";
var response = UrlFetchApp.fetch(aUrl); // get feed
var dataAll = JSON.parse(response.getContentText()); //
var data = dataAll.value.items;
for (i in data){
data[i].pubDate = new Date(data[i].pubDate);
data[i].start = data[i].pubDate;
}