Skip to content

Instantly share code, notes, and snippets.

@joe-dempsey
joe-dempsey / Shopify add color swatches to collection pages.txt
Created June 4, 2018 12:29
Shopify add color swatches/dots to collection pages.
{% capture option_titles %}Color,color,Colour,colour{% endcapture %}
{% assign option_titles = option_titles | split:',' %}
{% for option in product.options %}
{% if option_titles contains option %}
{% capture option_index %}option{{ forloop.index }}{% endcapture %}
{% assign option_values = product.variants | map: option_index | uniq %}
{% if option_values.size != 1 %}
{% for opt in option_values %}
@BenMorel
BenMorel / viewport-units-ios.scss
Last active March 11, 2022 13:15
SCSS mixin to support vh and vw units on all iOS Safari versions. Based on an idea by Patrick Burtchaell's: https://gist.github.com/pburtchaell/e702f441ba9b3f76f587
/**
* Fix for vw, vh, vmin, vmax on iOS 7.
* http://caniuse.com/#feat=viewport-units
*
* This fix works by replacing viewport units with px values on known screen sizes.
*
* iPhone 6 and 6 Plus cannot run iOS 7, so are not targeted by this fix.
* Target devices running iOS 8+ will incidentally execute the media query,
* but this will still produce the expected result; so this is not a problem.
@carolineschnapp
carolineschnapp / Add Color Swatches using hex values.md
Last active May 11, 2022 18:39
Add Color swatches to #Brooklyn theme. Use hexadecimal values or images.

What we want

We want to go from this:

Alt text

... to that:

Alt text

@steveosoule
steveosoule / miva-customer-order-history-report.sql
Created May 1, 2014 20:45
Miva Merchant - Customer Order History Report
SELECT
customer.login AS "Account Login",
customer.pw_email AS "Account Email",
customer.ship_fname AS "Ship. First Name",
customer.ship_lname AS "Ship. Last Name",
customer.ship_email AS "Ship. Email",
customer.ship_comp AS "Ship. Company",
customer.ship_phone AS "Ship. Phone",
customer.ship_fax AS "Ship. Fax",
@blackfalcon
blackfalcon / git-feature-workflow.md
Last active April 13, 2024 07:33
Git basics - a general workflow

Git-workflow vs feature branching

When working with Git, there are two prevailing workflows are Git workflow and feature branches. IMHO, being more of a subscriber to continuous integration, I feel that the feature branch workflow is better suited, and the focus of this article.

If you are new to Git and Git-workflows, I suggest reading the atlassian.com Git Workflow article in addition to this as there is more detail there than presented here.

I admit, using Bash in the command line with the standard configuration leaves a bit to be desired when it comes to awareness of state. A tool that I suggest using follows these instructions on setting up GIT Bash autocompletion. This tool will assist you to better visualize the state of a branc

@malarkey
malarkey / Contract Killer 3.md
Last active May 8, 2024 16:02
The latest version of my ‘killer contract’ for web designers and developers

When times get tough and people get nasty, you’ll need more than a killer smile. You’ll need a killer contract.

Used by 1000s of designers and developers Clarify what’s expected on both sides Helps build great relationships between you and your clients Plain and simple, no legal jargon Customisable to suit your business Used on countless web projects since 2008

…………………………

@ashsmith
ashsmith / .gitignore
Last active April 22, 2022 00:06
Magento 1.x .gitignore
# Never save database creditentials in your repo. Keep a dummy copy with a different name eg "local.xml.dev"
app/etc/local.xml
downloader
# If you'd like to keep the downloader, use the following instead:
# downloader/.cache
# downloader/cache.cfg
# downloader/connect.cfg
# All of the var folders can be excluded.