A Pen by Austin Pray on CodePen.
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
function smoothScroll(el, to, duration) { | |
if (duration < 0) { | |
return; | |
} | |
var difference = to - $(window).scrollTop(); | |
var perTick = difference / duration * 10; | |
this.scrollToTimerCache = setTimeout(function() { | |
if (!isNaN(parseInt(perTick, 10))) { | |
window.scrollTo(0, $(window).scrollTop() + perTick); | |
smoothScroll(el, to, duration - 10); |
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
box-shadow:10px 10px 0px rgba(0,0,0,.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
<?php | |
$id = the_ID(); | |
while ( have_posts() ) : the_post(); | |
$gp_args = array( | |
'post_type' => 'page', | |
'post_parent' => $id, | |
'order' => 'ASC', | |
'orderby' => 'menu_order', | |
'posts_per_page' => -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
/* | |
* redrawKnob() | |
* teeny tiny jquery plugin: adds a redraw method to knob | |
* REQUIRES: jquery.knob | |
* @austinpray 2013-09-29 | |
*/ | |
(function( $ ) { | |
$.fn.redrawKnob = function( options ) { | |
// defaults | |
var settings = $.extend({ |
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
var time = 0; | |
var diff = 1000; | |
var minTime = 0; | |
var maxTime = 100000; | |
function easeOutQuad(t, b, c, d) {return -c * (t/=d)*(t-2) + b;} | |
for( var i = 0, len = diff; i <= len; i++ ) { | |
(function(s){ | |
setTimeout(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
@function set-text-color($color) { | |
@if (lightness( $color ) > 40) { | |
@return black; | |
} | |
@else { | |
@return 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
// HiDPI mixin. Default value set to 1.3 to target Google Nexus 7 (http://bjango.com/articles/min-device-pixel-ratio/) | |
@mixin hidpi($ratio: 1.3) { | |
@media only screen and (-webkit-min-device-pixel-ratio: $ratio), | |
only screen and (min--moz-device-pixel-ratio: $ratio), | |
only screen and (-o-min-device-pixel-ratio: #{$ratio}/1), | |
only screen and (min-resolution: #{round($ratio*96)}dpi), | |
only screen and (min-resolution: #{$ratio}dppx) { | |
@content; | |
} | |
} |
Difficulty modes stack.
- Drink anytime Kevin Spacey's character talks about food, literal or metaphorically.
- Drink twice whenever any other character talks about food metaphorically.
- Drink every time someone cancels all their appointments.
- Drink every time Spacey knocks twice on a hard surface.
- Drink every time South Carolina is mentioned.
OlderNewer