Skip to content

Instantly share code, notes, and snippets.

View domtaylor's full-sized avatar

delta9 domtaylor

View GitHub Profile
// create a bookmark and use this code as the URL, you can now toggle the css on/off
// thanks+credit: https://dev.to/gajus/my-favorite-css-hack-32g3
javascript: (function() {
var elements = document.body.getElementsByTagName('*');
var items = [];
for (var i = 0; i < elements.length; i++) {
if (elements[i].innerHTML.indexOf('* { background:#000!important;color:#0f0!important;outline:solid #f00 1px!important; background-color: rgba(255,0,0,.2) !important; }') != -1) {
items.push(elements[i]);
}
}
@0xlino
0xlino / shopify-liquid-cheatsheet.liquid
Created July 25, 2018 12:03
Shopify Liquid Cheatsheet
Shopify objects that contain attributes that can be dynamically put on the page. For example, the product object contains an attribute called title that can be used to output the title of a product.
The handle is used to access the attributes of a Liquid object. By default, it is the object’s title in lowercase with any spaces and special characters replaced by hyphens (-). Every object in Liquid (product, collection, blog, menu) has a handle.
Collections & Products
Collection ►
all_types ►
Returns a list of all the product types for a collection
@levelsio
levelsio / Is it now Ramadan.php
Last active June 6, 2018 01:58
"Is it now Ramadan?" function in PHP
# by @levelsio
#
# MIT licensed
#
# make sure you enable php_intl on PHP
# you can do by uncommenting ;extension=intl or ;extension=php_intl
# and installing php-intl, e.g. sudo apt-get install php-intl
#
# made for Nomad List to give people a notice if they go to a place
# where it is currently Ramadan
@davelowensohn
davelowensohn / gist:98b386c58ba09c00fa552e00a47d93ab
Last active December 6, 2023 17:15 — forked from carolineschnapp/gist:9122054
Order form to use in a page or collection template.
{% comment %}
Source: https://gist.github.com/davelowensohn/98b386c58ba09c00fa552e00a47d93ab
Forked from: https://gist.github.com/carolineschnapp/9122054
If you are not on a collection page, do define which collection to use in the order form.
Use the following assign statement, replace 'your-collection-handle-here' with your collection handle.
{% assign collection = collections.your-collection-handle-here %}
Use the assign statement outside of this comment block at the top of your template.
{% endcomment %}
{% paginate collection.products by 100 %}
@carolineschnapp
carolineschnapp / gist:9122054
Last active March 7, 2024 08:53
Order form to use in a page or collection template.
{% comment %}
Source: https://gist.github.com/carolineschnapp/9122054
If you are not on a collection page, do define which collection to use in the order form.
Use the following assign statement, replace 'your-collection-handle-here' with your collection handle.
{% assign collection = collections.your-collection-handle-here %}
Use the assign statement outside of this comment block at the top of your template.
{% endcomment %}
{% paginate collection.products by 100 %}
@ScottPhillips
ScottPhillips / .htaccess
Created February 2, 2012 04:30
Common .htaccess Redirects
#301 Redirects for .htaccess
#Redirect a single page:
Redirect 301 /pagename.php http://www.domain.com/pagename.html
#Redirect an entire site:
Redirect 301 / http://www.domain.com/
#Redirect an entire site to a sub folder
Redirect 301 / http://www.domain.com/subfolder/