Skip to content

Instantly share code, notes, and snippets.

@chrisb
chrisb / gist:4d6a09c6cc1ca2e1b14e
Last active November 25, 2022 04:15
Homebrew, Ruby, and Rails on OS X 10.10

OS X 10.10 Guide

Here's what I did to get things working.

1. Install Xcode 6

Yep, over at: https://developer.apple.com

2. Install the Command Line Tools (CLT)

@keeguon
keeguon / countries.json
Created April 5, 2012 11:11
A list of countries in JSON
[
{name: 'Afghanistan', code: 'AF'},
{name: 'Åland Islands', code: 'AX'},
{name: 'Albania', code: 'AL'},
{name: 'Algeria', code: 'DZ'},
{name: 'American Samoa', code: 'AS'},
{name: 'AndorrA', code: 'AD'},
{name: 'Angola', code: 'AO'},
{name: 'Anguilla', code: 'AI'},
{name: 'Antarctica', code: 'AQ'},
@carolineschnapp
carolineschnapp / gist:1573451
Created January 7, 2012 01:51
customer/login.liquid
{% layout settings.customer_layout %}
<div id="template">
<div id="customer">
<div class="template_header">
<h2 class="title">Customer Login</h2>
</div>
{% form 'customer_login' %}
{{ form.errors | default_errors }}
@davecap
davecap / collections.liquid.html
Last active February 11, 2025 15:00
"Infinite" scrolling in Shopify collections
{% 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 }} -->
<script>
// (c) Copyright 2016 Caroline Schnapp. All Rights Reserved. Contact: [email protected]
// See https://docs.shopify.com/themes/customization/navigation/link-product-options-in-menus
var Shopify = Shopify || {};
Shopify.optionsMap = {};
Shopify.updateOptionsInSelector = function(selectorIndex) {
@everycopy
everycopy / gist:1064675
Created July 5, 2011 11:28
Shopify products by type in a collection
{% assign collection = collections.future-empire %}
<h1>Products</h1>
{% for product_type in collection.all_types %}
<section class="group">
<h2>{{ product_type }}</h2>
{% for product in collection.products %}
{% if product.type == product_type | handleize %}
<a href="{{ product.url }}" title="{{ product.title }}">
<figure>
<img src="{{ product.featured_image | product_img_url: 'medium' }}" alt="{{ product.title }}">
@carolineschnapp
carolineschnapp / gist:1003334
Created June 1, 2011 21:10
Related Products using metafields - to add to product.liquid
<!-- Solution brought to you by Caroline Schnapp -->
<!-- See this: http://wiki.shopify.com/Related_Products -->
{% assign image_size = 'compact' %}
{% assign heading = 'Other fine products' %}
{% if product.metafields.recommendations.productHandles %}
<h3>{{ heading }}</h3>
<ul class="related-products"></ul>