Skip to content

Instantly share code, notes, and snippets.

View chriscoyier's full-sized avatar

Chris Coyier chriscoyier

View GitHub Profile
@chriscoyier
chriscoyier / Long-Shadow-CSS3-in-Sass.markdown
Created September 4, 2013 20:25
A Pen by Dang Van Thanh.
@chriscoyier
chriscoyier / A-Pen-by-Chris-Coyier.markdown
Last active December 22, 2015 07:59
A Pen by Chris Coyier.
@chriscoyier
chriscoyier / Circle-Expando-Buttons.markdown
Created August 20, 2013 21:03
A CodePen by Chris Coyier.
@chriscoyier
chriscoyier / 500-coffee-cup-icons.markdown
Last active December 21, 2015 08:59
A CodePen by Val Head.
@chriscoyier
chriscoyier / index.html
Created August 15, 2013 14:57
A CodePen by Brian Phillips. Clickable Pen with Logo Reveal - I admit, it's a bit cheesy, but it was fun to make
<h1>Click Me</h1>
<div class="pen">
<div id="point"></div>
<div class="sheen"></div>
<div id="clicker"></div>
<div id="drop">
<div class="center"></div>
</div>
</div>
@chriscoyier
chriscoyier / index.html
Created August 15, 2013 14:57
A CodePen by Brian Phillips. Clickable Pen with Logo Reveal - I admit, it's a bit cheesy, but it was fun to make
<h1>Click Me</h1>
<div class="pen">
<div id="point"></div>
<div class="sheen"></div>
<div id="clicker"></div>
<div id="drop">
<div class="center"></div>
</div>
</div>
# ???
RedirectMatch 301
// Spam comments with super long URLs
function rkv_url_spamcheck( $approved , $commentdata ) {
return ( strlen( $commentdata['comment_author_url'] ) > 50 ) ? 'spam' : $approved;
}
add_filter( 'pre_comment_approved', 'rkv_url_spamcheck', 99, 2 );
@chriscoyier
chriscoyier / gist:5801571
Last active December 18, 2015 14:59 — forked from anonymous/gist:5801482
<?php
$src = '<iframe src="http://player.vimeo.com/video/68302803" width="500" height="281" frameborder="0" webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe>';
$matches = preg_match('/player\.vimeo\.com\/video\/(\d+)/', $src, $match);
if ($matches) {
$id = $match[1];
$apiurl = 'http://vimeo.com/api/v2/video/' . $id . '.json';
$response = file_get_contents($apiurl);
$json = json_decode($response, true);
@chriscoyier
chriscoyier / index.html
Created June 6, 2013 14:01
A CodePen by Chris Coyier. Track form progress with <progress> - Like a simple version of gamification.
<form accept-charset="UTF-8" action="#" class="pro-form" id="pro-form" method="post">
<h1>Progress Form</h1>
<div class="progress-wrap">
<progress max="100" value="0" id="progress"></progress>
<div class="progress-message" id="progress-message">The form, it wants you.</div>
</div>
<input id="subscription_plan_id" name="subscription[plan_id]" type="hidden" value="1">