View m2-widget-refresh.sh
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; |
View style.css
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%); |
View m2less.cson
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 |
View Gruntfile.js
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: { |
View 0_reuse_code.js
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 |
View rAF.js
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']; |
View vtSmoothScroll.js
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 | |
* |