Skip to content

Instantly share code, notes, and snippets.

View bjankord's full-sized avatar
🎵
Chillin'

Brett Jankord bjankord

🎵
Chillin'
View GitHub Profile
@remy
remy / gist:350433
Created March 31, 2010 14:58
Storage polyfill
if (typeof window.localStorage == 'undefined' || typeof window.sessionStorage == 'undefined') (function () {
var Storage = function (type) {
function createCookie(name, value, days) {
var date, expires;
if (days) {
date = new Date();
date.setTime(date.getTime()+(days*24*60*60*1000));
expires = "; expires="+date.toGMTString();
@adactio
adactio / datalist.html
Created January 9, 2011 17:24
Progressive enhancement with datalist
<!DOCTYPE html>
<title>Datalist test</title>
<meta charset="utf-8">
<form>
<label for="source">How did you hear about us?</label>
<datalist id="sources">
<select name="source">
<option>please choose...</option>
<option value="television">Television</option>
<option value="radio">Radio</option>
@chrisjacob
chrisjacob / README.md
Created February 18, 2011 03:44
Setup GitHub Pages "gh-pages" branch and "master" branch as subfolders of a parent project folder ("grandmaster").

Intro

Description: Setup GitHub Pages "gh-pages" branch and "master" branch as subfolders of a parent project folder ("grandmaster").

Author: Chris Jacob @_chrisjacob

Tutorial (Gist): https://gist.github.com/833223

The Result

@artero
artero / launch_sublime_from_terminal.markdown
Last active January 25, 2024 16:57 — forked from olivierlacan/launch_sublime_from_terminal.markdown
Launch Sublime Text 2 from the Mac OS X Terminal

Launch Sublime Text 2 from the Mac OS X Terminal

Sublime Text 2 ships with a CLI called subl (why not "sublime", go figure). This utility is hidden in the following folder (assuming you installed Sublime in /Applications like normal folk. If this following line opens Sublime Text for you, then bingo, you're ready.

open /Applications/Sublime\ Text\ 2.app/Contents/SharedSupport/bin/subl

You can find more (official) details about subl here: http://www.sublimetext.com/docs/2/osx_command_line.html

Installation

@CristinaSolana
CristinaSolana / gist:1885435
Created February 22, 2012 14:56
Keeping a fork up to date

1. Clone your fork:

git clone git@github.com:YOUR-USERNAME/YOUR-FORKED-REPO.git

2. Add remote from original repository in your forked repository:

cd into/cloned/fork-repo
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
git fetch upstream
@m90
m90 / matchMedia version
Created April 24, 2012 15:50
modernizr media query testing and hair pulling
window.matchMedia = window.matchMedia || (function(doc, undefined){
var bool,
docElem = doc.documentElement,
refNode = docElem.firstElementChild || docElem.firstChild,
// fakeBody required for <FF4 when executed in <head>
fakeBody = doc.createElement('body'),
div = doc.createElement('div');
div.id = 'mq-test-1';
@elwinschmitz
elwinschmitz / define-breakpoints-once.html
Created April 25, 2012 08:24
Define media-query breakpoints only once
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Single point of breakpoint-definition</title>
<style>
/*
Baseline:
*/
@connrs
connrs / qsa-polyfill-ie7.js
Created May 18, 2012 09:49
IE7 querySelectorAll polyfill
if (!document.querySelectorAll) {
document.querySelectorAll = function(selector) {
var doc = document,
head = doc.documentElement.firstChild,
styleTag = doc.createElement('STYLE');
head.appendChild(styleTag);
doc.__qsaels = [];
styleTag.styleSheet.cssText = selector + "{x:expression(document.__qsaels.push(this))}";
window.scrollBy(0, 0);
@adamlogic
adamlogic / compass_and_css_sprites.md
Created September 1, 2012 15:26
Compass and CSS Sprites, Explained

Compass and CSS Sprites, Explained

Last week I attempted to use the CSS sprites feature of Compass for the second or third time. It's been a struggle each time, but the power and potential is there, so I keep coming back. This time was a bit different, though, because I finally decided to stop relying on the docs and dive into the code.

Before I go into the nitty-gritty, let's take a step back and talk about why I

@apticknor
apticknor / css-stats-ack.sh
Last active April 26, 2023 15:48 — forked from pjkix/css-stats-ack.sh
shell script to generate some css file statistics
#!/bin/bash
## Generate CSS Statistics and determine the health of your css
##
## Usage
## bash /path/to/css-stats-ack.sh
## bash /path/to/css-stats-ack.sh > file.txt
##
## TODO - add support for SCSS
##