Skip to content

Instantly share code, notes, and snippets.

View AndrewHD's full-sized avatar

Andrew Hanson-Dvoracek AndrewHD

View GitHub Profile
@ccashwell
ccashwell / getDiscountCode.html
Last active January 19, 2023 15:25
Autofill Discount Code from Shopify URL
<script>
/* Put this in theme.liquid, preferably right before "</body>" */
(function() {
var discountParam = document.location.search.match(/discount=(\w+)/);
if (discountParam && discountParam.length > 1) {
document.cookie = discountParam[0];
}
})();
</script>
@chockenberry
chockenberry / finder_icons.sh
Last active February 10, 2024 19:05
A simple shell script to turn the Finders desktop icons on and off
#!/bin/sh
defaults read com.apple.finder CreateDesktop > /dev/null 2>&1
enabled=$?
if [ "$1" = "off" ]; then
if [ $enabled -eq 1 ]; then
defaults write com.apple.finder CreateDesktop false
osascript -e 'tell application "Finder" to quit'
open -a Finder

HotPlate

You have a 16x16 grid of which the 4 centermost cells are always 100 degrees and the cornermost cells are always 0 degrees. All other cells start at 50 degrees.

For example, a 6x6 grid would look like this:

|  0  | 50  | 50  | 50  | 50  |  0  |
| 50  | 50  | 50  | 50  | 50  | 50  |

| 50 | 50 | 100 | 100 | 50 | 50 |

@carolineschnapp
carolineschnapp / collection-listing-using-linklist.liquid
Created August 13, 2010 19:48
Listing all collections in the shop