Skip to content

Instantly share code, notes, and snippets.

GitHub Drop ICE

Zach Leatherman zachleat

GitHub Drop ICE
View GitHub Profile
zachleat / jquery.scrolly.js
Created Apr 5, 2011
jQuery scrolly special event
View jquery.scrolly.js
* Changes by Zach Leatherman (@zachleat)
* from James Padolsey Special Scroll Events
* -------------------------------------------------------
* Dual licensed under the MIT and GPL licenses.
zachleat / gist:980895
Created May 19, 2011
HTML5 Boilerplate Issue #378 (No Compatibility View button, tested in IE7/IE8/IE9)
View gist:980895
<!--[if IE ]><![endif]-->
<!doctype html>
<!-- -->
<!--[if lt IE 7 ]> <html class="no-js ie6" lang="en"> <![endif]-->
<!--[if IE 7 ]> <html class="no-js ie7" lang="en"> <![endif]-->
<!--[if IE 8 ]> <html class="no-js ie8" lang="en"> <![endif]-->
<!--[if (gte IE 9)|!(IE)]><!--> <html class="no-js" lang="en"> <!--<![endif]-->
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
zachleat / gist:2008932
Created Mar 9, 2012
Prevent zoom on focus
View gist:2008932
// * iOS zooms on form element focus. This script prevents that behavior.
// * <meta name="viewport" content="width=device-width,initial-scale=1">
// If you dynamically add a maximum-scale where no default exists,
// the value persists on the page even after removed from viewport.content.
// So if no maximum-scale is set, adds maximum-scale=10 on blur.
// If maximum-scale is set, reuses that original value.
// * <meta name="viewport" content="width=device-width,initial-scale=1.0,maximum-scale=2.0,maximum-scale=1.0">
// second maximum-scale declaration will take precedence.
// * Will respect original maximum-scale, if set.
// * Works with int or float scale values.
zachleat / gist:4695349
Last active Dec 12, 2015
Talk abstract for Nebraska Code Camp 2013: Tool or Die (A Web Developer's Workflow)
View gist:4695349
“Tool and die makers are a class of machinists who work primarily in
toolroom environments—…often in an environment with flexible, semipermeable
boundaries from production work.”
These are the people that make the tools to make the products. This was the
environment I grew up in—watching my father work as a tool and die maker.
He could make anything! But more importantly, he knew the value of good
tools—even if you had to construct them yourself.
Tools are important and tooling for Web Development is improving! I'll go
zachleat / jquery.postmessage.js
Created Apr 10, 2013
postMessage polyfill for IE < 8 that uses and queues messages so they aren't lost while polling. Requires a JSON.parse polyfill (like JSON.js).
View jquery.postmessage.js
* jQuery postMessage - v1.0 - 8/26/2011
* Copyright (c) 2011 "zachleat" Zach Leatherman
* Copyright (c) 2009 "Cowboy" Ben Alman
* Dual licensed under the MIT and GPL licenses.
/* Forked from
zachleat / gist:5405752
Created Apr 17, 2013
Modernizr/ Issue #31
View gist:5405752
/* Modernizr 2.6.2 (Custom Build) | MIT & BSD
* Build:
window.Modernizr = (function( window, document, undefined ) {
var version = '2.6.2',
zachleat / gist:5407068
Last active Dec 16, 2015
Differences between Pure Internet Explorers and IE Compatibility Modes
View gist:5407068

Or, yet more evidence that you should use feature detection instead of browser/user agent sniffing.


Not supported in IE9 but works in IE10-as-IE9

  • Unprefixed CSS transform. Should require -ms-transform but doesn’t require it.


zachleat / reading_time.rb
Last active Oct 21, 2020
Read this in X minutes Liquid Filter Plugin (for Jekyll)
View reading_time.rb
# Outputs the reading time
# Read this in “about 4 minutes”
# Put into your _plugins dir in your Jekyll site
# Usage: Read this in about {{ page.content | reading_time }}
module ReadingTimeFilter
def reading_time( input )
words_per_minute = 180
zachleat / gist:6114627
Created Jul 30, 2013
position: sticky Notes
View gist:6114627

Supported (does not work on table headers):

  • Chrome Canary 30 (behind about:flags “experimental Web Platform features”)
  • Chrome 28 (behind about:flags “experimental WebKit features”)

Supported (works on table headers):

  • iOS 6.1

Not Supported:

  • iOS 5.1
  • Firefox 22 (Mac)