Skip to content

Instantly share code, notes, and snippets.

View aarongustafson's full-sized avatar
👋
he/him/his

Aaron Gustafson aarongustafson

👋
he/him/his
View GitHub Profile
@aarongustafson
aarongustafson / video-avi-fallback.html
Created March 30, 2017 20:11
Pondering fallback content
<video>
<source src="my.avi" type="video/avi">
<p>Your browser doesn’t support AVI, but you can
<a href="my.avi" download>download this movie</a></p>
</video>
@aarongustafson
aarongustafson / gist_tag.rb
Last active January 2, 2017 14:29 — 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.
# 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'
@aarongustafson
aarongustafson / formSaver-clear.js
Last active October 14, 2016 14:06
Saves form data to `localStorage`
if ( window.localStorageAvailable )
{
window.localStorage.removeItem( 'FORM URL GOES HERE' );
}
<!--[if gt IE 8]><!-->
IE 9+ and all non-IE browsers see this text.
<!--<![endif]-->
{
"$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"siteName": {
"type": "string",
"metadata": {
"description": "The name of the web app that you wish to create."
}
},
{
"$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"siteName": {
"type": "string",
"metadata": {
"description": "The name of the web app that you wish to create."
}
},
{
"$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"siteName": {
"type": "string",
"metadata": {
"description": "The name of the web app that you wish to create."
}
},
var render = function (encoding) {
return function (page, req, res) {
if (encoding && !req.acceptsEncodings(encoding)) {
return false;
}
var content = getContent(page, encoding);
if (content) {
res.set('Content-Encoding', encoding);
res.set('Content-Type', 'text/html');
res.end(content, encoding ? 'binary' : null);
var gulp = require('gulp');
gulp.task('watch', function() {
gulp.watch('source/scss/**', ['styles']);
gulp.watch('source/js/**', ['scripts']);
gulp.watch('source/images/**', ['images']);
gulp.watch('source/templates/**', ['html']);
gulp.watch('source/data/**', ['html']);
gulp.watch('source/webconfigs/**/*', ['webconfigs']);
gulp.watch('deploy/*.html', ['a11y']);
var gulp = require('gulp'),
newer = require('gulp-newer'),
imagemin = require('gulp-imagemin'),
notify = require('gulp-notify'),
webp = require('gulp-webp');
gulp.task('images', function() {
var source = './source/images',
destination = './deploy/i';