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
// gist.github.com/ryanve/8703402 | |
// Play only one track at a time. | |
(function(doc, tags) { | |
var listen = 'addEventListener', some = tags.some, pause = function(e) { | |
this !== e && !this.ended && !this.paused && !e.ended && !e.paused && e.pause(); | |
}; | |
some && listen in doc && tags.some(function(tag) { | |
var live = doc.getElementsByTagName(tag), solo = function() { | |
some.call(live, pause, this); | |
}; |
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
alias gitr='git' | |
alias gti='git' | |
alias got='git' | |
alias gut='git' | |
alias gi='git' | |
alias g='git' | |
alias gurnt='grunt' | |
alias gr='grunt' |
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
<!DOCTYPE html> | |
<title>.slideshow demo</title> | |
<style> | |
html { font: normal 1em/1.6 sans-serif; background: pink; } | |
body { margin: 0; } | |
</style> | |
<style> | |
.slideshow { | |
text-align: center; | |
margin: 0; |
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
.browse { | |
display: inline; | |
font-size: inherit; | |
} | |
.browse__input { | |
display: inline-block; | |
position: absolute; | |
@include px-rem(padding, .1); | |
@include px-rem(margin, 0, -.5); |
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
<?php | |
# Show source of this file in .txt extension if it exists | |
call_user_func(function() { | |
$txt = __FILE__ . '.txt'; | |
if ( ! file_exists($txt)) | |
return; | |
# update (cache at least 5-min) | |
if (300 < time() - filemtime($txt)) | |
file_put_contents($txt, file_get_contents(__FILE__)); |
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
table.untabulate, | |
.untabulate table, | |
.untabulate thead, | |
.untabulate tbody, | |
.untabulate tfoot, | |
.untabulate th, | |
.untabulate td, | |
.untabulate tr { display:block; } | |
.untabulate tr + tr { margin-top:1em; } |
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
<?php | |
namespace demo; | |
/** | |
* Get or set data. | |
* @param mixed $key | |
* @param mixed $val | |
* @return mixed | |
*/ | |
function data($key = null, $val = null) { |
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
figure[id] > a[href^="#"]:after { | |
content:attr(href); display:table; | |
position:relative; top:-1.4em; bottom:-1.4em; | |
font-weight:bold; text-decoration:none; | |
line-height:1; padding:.2em; margin-bottom:-1.4em; | |
background:#fff; color:#222; | |
} |
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
<?php | |
$is_page = function($pages) { | |
global $post; | |
if (!is_page()) return false; | |
if (is_page($pages)) return true; | |
if (empty($post->post_parent)) return false; | |
$parent = get_post($post->post_parent); | |
if (!$parent || empty($parent->post_name)) return false; | |
$slug = $parent->post_name; |
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
::-webkit-input-placeholder { color:inherit; } | |
:-moz-placeholder { color:inherit; } /* FF 4-18 */ | |
::-moz-placeholder { color:inherit; } /* FF 19+ */ | |
:-ms-input-placeholder { color:inherit; } /* IE 10+ */ |
OlderNewer