Skip to content

Instantly share code, notes, and snippets.

View javasteve99's full-sized avatar

Steve Hickey javasteve99

View GitHub Profile
@frontendbeast
frontendbeast / sm-annotated.html
Last active June 25, 2020 13:57 — forked from hdragomir/sm-annotated.html
The deferred font loading logic for Smashing Magazine, updated to include IE8 support. http://www.smashingmagazine.com/
<script type="text/javascript">
(function () {
"use strict";
// once cached, the css file is stored on the client forever unless
// the URL below is changed. Any change will invalidate the cache
var css_href = './index_files/web-fonts.css';
// a simple event handler wrapper
function on(el, ev, callback) {
if (el.addEventListener) {
el.addEventListener(ev, callback, false);
@dergachev
dergachev / GIF-Screencast-OSX.md
Last active May 2, 2024 05:55
OS X Screencast to animated GIF

OS X Screencast to animated GIF

This gist shows how to create a GIF screencast using only free OS X tools: QuickTime, ffmpeg, and gifsicle.

Screencapture GIF

Instructions

To capture the video (filesize: 19MB), using the free "QuickTime Player" application:

@bramstein
bramstein / subpixel-word-spacing-detect.js
Last active September 5, 2015 07:34
Detect sub-pixel word- and letter-spacing.
var subpixelWordSpacing = false;
if (document.defaultView && document.defaultView.getComputedStyle) {
// Store the original word spacing on the document element
var originalWordSpacing = document.defaultView.getComputedStyle(document.documentElement, null).wordSpacing;
// Set the word-spacing to half a pixel
document.documentElement.style.wordSpacing = '0.5px';
// This will return either 0px or 1px if sub-pixel word-spacing is not supported, otherwise