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
#!/bin/bash | |
# USAGE: svg-to-liquid.sh iconSourcePath icons.liquid | |
# Add the icons.liquid file to your theme snippets then output the icon using {% render 'icons', icon: 'icon-name' %} | |
echo "Converting SVGs to Shopify Liquid Snippet" | |
liquid=$'{% case icon %}\n'; | |
for svg in $1/*.svg; do | |
file="$(basename $svg)"; |
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
while sleep 10; | |
do for f in $(find $1 -print | grep -i global__widget_config); | |
do | |
rm $f; | |
echo $(date +'%T') Deleted $f; | |
done; | |
done; |
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
*, *:before, *:after { | |
box-sizing: border-box; | |
} | |
html { | |
width: 100%; | |
height: 100%; | |
font-family: -apple-system, system-ui, BlinkMacSystemFont, "Segoe UI", Roboto, Ubuntu; | |
color: white; | |
background-color: hsl(210, 27%, 13%); |
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
'.less': | |
'm2less': | |
'prefix': 'm2less' | |
'body': """ | |
/** | |
* _$1.less | |
*/ | |
/* ========================================================================== | |
$1 |
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
// Convert | |
// $window_s: 768px; | |
// $window_m: 960px; | |
// $window_l: 1200px; | |
// to | |
// window.window_s = 768; | |
// window.window_m = 960; | |
// window.window_l = 1200; | |
replace: { |
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 Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
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
// http://paulirish.com/2011/requestanimationframe-for-smart-animating/ | |
// http://my.opera.com/emoller/blog/2011/12/20/requestanimationframe-for-smart-er-animating | |
// requestAnimationFrame polyfill by Erik Möller. fixes from Paul Irish and Tino Zijdel | |
// MIT license | |
(function() { | |
var lastTime = 0; | |
var vendors = ['ms', 'moz', 'webkit', 'o']; |
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
/** | |
* | |
* In real life your time taken to complete a journey = distance/speed. | |
* This emulates that, longer journeys actually take more time, shorter journeys take less time. | |
* | |
* Forked from http://css-tricks.com/snippets/jquery/smooth-scrolling/ | |
* Demo http://codepen.io/jbasoo/pen/LEovc | |
* | |
* Requires jQuery and jQuery Easing | |
* |