Skip to content

Instantly share code, notes, and snippets.

View esteinborn's full-sized avatar

Eric Steinborn esteinborn

View GitHub Profile
@esteinborn
esteinborn / bling.js
Last active August 29, 2015 14:23 — forked from paulirish/bling.js
/* bling.js */
window.$ = document.querySelectorAll.bind(document)
Node.prototype.on = window.on = function (name, fn) {
this.addEventListener(name, fn)
}
NodeList.prototype.__proto__ = Array.prototype
@mixin breakpoint($size: "", $maxWidth: false, $noMQSelector: "") {
@if $size == "" {
$size: 55em; // Put your "main" or most-used breakpoint here to use it as a default
}
@if $noMQSelector == true {
$noMQSelector: ".oldie"; // this is the default catch all selector, jsut pass true, unquoted.
}
// Default, `min-width` media query
(function() {
var CSSCriticalPath = function(w, d, opts) {
var opt = opts || {};
var css = {};
var pushCSS = function(r) {
if(!!css[r.selectorText] === false) css[r.selectorText] = {};
var styles = r.style.cssText.split(/;(?![A-Za-z0-9])/);
for(var i = 0; i < styles.length; i++) {
if(!!styles[i] === false) continue;
var pair = styles[i].split(": ");
@esteinborn
esteinborn / Useful Head Tags
Last active December 21, 2015 07:49 — forked from brianblakely/gist:581868
Helpful Head Tags
<!DOCTYPE html>
<!-- Helpful things to keep in your <head/>
// Brian Blakely, 360i
// http://twitter.com/brianblakely/
-->
<head>
<!-- Disable automatic DNS prefetching.
/*==========================================================
Open Sans
==========================================================*/
@font-face {
font-family: 'OpenSans';
src: url('../fonts/OpenSans-Light-webfont.eot');
src: url('../fonts/OpenSans-Light-webfont.eot?#iefix') format('embedded-opentype'),
url('../fonts/OpenSans-Light-webfont.woff') format('woff'),
url('../fonts/OpenSans-Light-webfont.ttf') format('truetype'),
@esteinborn
esteinborn / Cowboy - Presentation.tmTheme
Created December 3, 2012 15:54 — forked from cowboy/Cowboy - Presentation.tmTheme
Sublime / TM theme I use for presentations.
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>author</key>
<string>Jacob Rus</string>
<key>comment</key>
<string>Created by Jacob Rus. Based on ‘Slate’ by Wilson Miner</string>
<key>name</key>
<string>Cowboy - Presentation</string>