This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{% paginate collection.products by 20 %} | |
<!-- the top of your collections.liquid --> | |
<!-- START PRODUCTS --> | |
{% for product in collection.products %} | |
<!-- START PRODUCT {{ forloop.index | plus:paginate.current_offset }} --> | |
<div class="product" id="product-{{ forloop.index | plus:paginate.current_offset }}"> | |
{% include 'product' with product %} | |
</div> | |
<!-- END PRODUCT {{ forloop.index | plus:paginate.current_offset }} --> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
require 'open3' | |
require 'fileutils' | |
def run_command(command) | |
puts("+: " + command) | |
Open3.popen2e(command) do |stdin, stdout_stderr, wait_thread| | |
Thread.new do | |
stdout_stderr.each {|l| puts l } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"use strict"; | |
// based on unutbu's stackoverflow answer | |
// https://stackoverflow.com/a/40958702/54829 | |
// which is based on Evan Miller's blog post | |
// http://www.evanmiller.org/ranking-items-with-star-ratings.html | |
function starsort(ratings) { | |
function sum(array) { return array.reduce((x, y) => x + y, 0) }; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
MOVED HERE: | |
https://gist.github.com/naveenkrdy/26760ac5135deed6d0bb8902f6ceb6bd |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const sanityClient = require('@sanity/client'); | |
const crypto = require('crypto'); | |
const { | |
SANITY_API_TOKEN, | |
SANITY_PROJECT_ID, | |
SANITY_DATASET, | |
SHOPIFY_SECRET | |
} = process.env; |