Skip to content

Instantly share code, notes, and snippets.

👋
he/him/his

Aaron Gustafson aarongustafson

👋
he/him/his
Block or report user

Report or block aarongustafson

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View webp-service-worker.js
"use strict";
self.addEventListener('fetch', function(event) {
var request = event.request,
url = request.url,
url_object = new URL( url ),
re_jpg_or_png = /\.(?:jpg|png)$/,
supports_webp = false, // pessimism
webp_url;
@aarongustafson
aarongustafson / gist_tag.rb
Last active Jan 2, 2017 — forked from BinaryMuse/gist_tag.rb
A Liquid tag for Jekyll sites that allows embedding Gists and showing code for non-JavaScript enabled browsers and readers.
View gist_tag.rb
# A Liquid tag for Jekyll sites that allows embedding Gists and showing code for non-JavaScript enabled browsers and readers.
# by: Brandon Tilly
# Source URL: https://gist.github.com/1027674
# Post http://brandontilley.com/2011/01/31/gist-tag-for-jekyll.html
#
# Example usage: {% gist 1027674 gist_tag.rb embed %} //embeds a gist for this plugin
require 'cgi'
require 'digest/md5'
require 'net/https'
View fonts.js
...
// test for font-face version to load via Data URI'd CSS
// Basically, load WOFF unless it's android's default browser, which needs TTF, or ie8-, which needs eot
var fonts = ns.files.css.fontsWOFF,
ua = win.navigator.userAgent;
// android webkit browser, non-chrome
if( ua.indexOf( "Android" ) > -1 && ua.indexOf( "like Gecko" ) > -1 && ua.indexOf( "Chrome" ) === -1 ){
fonts = ns.files.css.fontsTTF;
}
You can’t perform that action at this time.