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
{ | |
"anonymous": false, | |
"inputs": [ | |
{ | |
"indexed": true, | |
"internalType": "uint256", | |
"name": "campaignId", | |
"type": "uint256" | |
}, | |
{ |
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
// Outputs the template used | |
// Usage: echo get_current_template(true); | |
// Credits: http://www.kevinleary.net/get-current-theme-template-filename-wordpress/ | |
function define_current_template( $template ) { | |
$GLOBALS['current_theme_template'] = basename($template); | |
return $template; | |
} | |
function get_current_template( $echo = false ) { |
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
$statesNames : gridle_get_states_names(); | |
%alignleft, | |
.alignleft { | |
float: left; | |
@each $name in $statesNames { | |
&--#{$name} { | |
@include gridle_state($name) { | |
float: left; | |
} |
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/sh | |
#this is where your files will be put | |
mkdir originals | |
# I run mozjpeg for everyfile in this dir, adding the suffix .tmp, and move the original file in /originals | |
for f in ./*.jpg; | |
do | |
mozjpeg -optimize -outfile $f.tmp $f; | |
mv $f originals/$f; |
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
/* Add this to your css for debuggin purpose */ | |
body:after { | |
content: "no mq"; | |
position: fixed; | |
bottom: 0; | |
right: 0; | |
z-index: 999; | |
padding: 2px 5px; | |
background-color: rgba(0,0,0,.7); | |
color: white; |
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
// Position fixed: pattern: https://github.com/shichuan/javascript-patterns/blob/master/jquery-patterns/window-scroll-event.html#L36 | |
// RequestAnimationFrame Shim | |
window.animFrame = (function () { | |
return window.requestAnimationFrame || | |
window.webkitRequestAnimationFrame || | |
window.mozRequestAnimationFrame || | |
function (callback) { | |
window.setTimeout(callback, 15); | |
}; | |
})(); |
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
// Log all the methods of yourFunction object | |
console.log(Object.getOwnPropertyNames(yourFunction).filter(function (p) { | |
return typeof yourFunction[p] === 'function'; | |
})); |
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
Show hidden characters
[ | |
{ | |
"args": | |
{ | |
"extend": false, | |
"to": "eol" | |
}, | |
"command": "move_to" | |
}, | |
{ |
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
/* | |
* Responsive video container | |
* http://www.smashingmagazine.com/2014/02/27/making-embedded-content-work-in-responsive-design/ | |
*/ | |
.video-container { | |
position: relative; | |
padding-bottom: 56.25%; | |
padding-top: 35px; | |
height: 0; | |
overflow: hidden; |
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
// Outputs the template used | |
// Usage: echo get_current_template(true); | |
// Credits: http://www.kevinleary.net/get-current-theme-template-filename-wordpress/ | |
function define_current_template( $template ) { | |
$GLOBALS['current_theme_template'] = basename($template); | |
return $template; | |
} | |
function get_current_template( $echo = false ) { |
NewerOlder