Skip to content

Instantly share code, notes, and snippets.

View esundahl's full-sized avatar

Erik Sundahl esundahl

View GitHub Profile
@esundahl
esundahl / index.html
Created November 16, 2012 23:30
A CodePen by Erik Sundahl. CSS3 Transform Loader
<div class='loading'>!</div>
@esundahl
esundahl / index.html
Created November 16, 2012 23:29
A CodePen by Erik Sundahl. CSS3 Transform Loader
<div class='loading'>!</div>
@esundahl
esundahl / querystring.js
Created November 9, 2012 23:22
javascript function for parsing a url query string
function params (string) {
res = {};
string.replace("?","").split('&').map(
function (q) {
var v = q.split('=');
res[v[0]] = v[1];
});
@esundahl
esundahl / Pastels.itermcolors
Created August 14, 2012 23:51
Pastel iTerm2 Colors
<?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>Ansi 0 Color</key>
<dict>
<key>Blue Component</key>
<real>0.1098039299249649</real>
<key>Green Component</key>
<real>0.1098039299249649</real>
@esundahl
esundahl / border-box
Created July 17, 2012 21:07
Factor Padding Into the Width of DOM Elements
*
-moz-box-sizing: border-box
-webkit-box-sizing: border-box
box-sizing: border-box
line-height: 1.2em
@esundahl
esundahl / custom-dev-tools.css
Created June 30, 2012 21:42
Custom Dev Tools Theme
/**********************************************/
/*
/* IR_Black Skin by Ben Truyman - 2011
/*
/* Based on Todd Werth's IR_Black:
/* http://blog.toddwerth.com/entries/2
/*
/* Inspired by Darcy Clarke's blog post:
/* http://darcyclarke.me/design/skin-your-chrome-inspector/
/*
@esundahl
esundahl / node.gitignore
Created April 19, 2012 16:18
Gitignore Templates
lib-cov
*.seed
*.log
*.csv
*.dat
*.out
*.pid
*.gz
pids
@esundahl
esundahl / style_first_word.js
Created March 30, 2012 22:17
Javascript: jQuery: Style first word plugin
(function($) {
$.fn.styleFirstWord = function(attr) {
if ( typeof attr !== 'object' ) {
attr = {
class: attr || 'firstWord'
};
}
return this.each(function() {
var $this = $(this),
@esundahl
esundahl / env.json
Created March 23, 2012 20:52
This is a quick and dirty little javascript bookmarklet that I wrote to toggle between different development environments
[{
"environments": [
"site.dev",
"site.staging",
"site.com"
]
}]
@esundahl
esundahl / retinaDetect.js
Created March 16, 2012 19:50
Javascript: detect retina display
var retina = window.devicePixelRatio > 1 ? true : false;