Skip to content

Instantly share code, notes, and snippets.

// Media Queries in Sass 3.2
//
// These mixins make media queries a breeze with Sass.
// The media queries from mobile up until desktop all
// trigger at different points along the way
//
// And important point to remember is that and width
// over the portrait width is considered to be part of the
// landscape width. This allows us to capture widths of devices
// that might not fit the dimensions exactly. This means the break
@deleteme
deleteme / gist:4162194
Created November 28, 2012 16:02 — forked from madrobby/gist:4161897
Retina screen media query
@media (min--moz-device-pixel-ratio: 1.5),
(-o-min-device-pixel-ratio: 3/2),
(-webkit-min-device-pixel-ratio: 1.5),
(min-device-pixel-ratio: 1.5),
(min-resolution: 144dpi),
(min-resolution: 1.5dppx) {
/* Retina rules! */
}
window.exports={};
window.imported={};
// synchronous require for CommonJS
function require(name){
if (!window.imported[name]){
var xhrObj = createXMLHTTPObject();
// open and send a synchronous request
xhrObj.open('GET', name + ".js", false);
xhrObj.send('');
@deleteme
deleteme / CssRule.js
Created March 24, 2012 22:37 — forked from mseeley/CssRule.js
Easily alter CSS rules via JS
// Allows programmatic altering of CSS rules. Turn this class into a flyweight by enabling modification of the underlying rule property.
function CssRule (selector, stylesheet) {
var rules = stylesheet.rules,
len = rules.length,
i = 0,
rule = null;
for (i; i < len; i++) {
rule = rules[i];
if (rule.selectorText === selector) {
@deleteme
deleteme / .ackrc
Created May 24, 2011 16:59 — forked from squarelover/.ackrc
My ~/.ackrc
--ignore-dir=vendor
--ignore-dir=db/server
--ignore-dir=log
--ignore-dir=tmp
--ignore-dir=db/*
--ignore-dir=doc/*
--ignore-dir=coverage
--type-add=ruby=.haml,.rake,.rsel,.sass,.thor,.erb,Gemfile,.feature
--type-set=cucumber=.feature
[extensions]
fetch =
[ui]
ssh = ssh -C
username = Wes Rogers <wes@cocodesign.com>
[extensions]
hgext.extdiff =
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title>All work and no play makes Jack a dull boy.</title>
<style type="text/css" media="screen">