Skip to content

Instantly share code, notes, and snippets.

env = (function() {
var flags = {}, ua = navigator.userAgent, el = document.createElement('div'), video = document.createElement('video'), audio = document.createElement('audio'), root = document.documentElement, i
function flag(names) {
names = names.split(' ')
for (i = 0; i < names.length; i++)
flags[names[i]] = true
}
function classnames() {
var names = [], name
for(name in flags) if (flags.hasOwnProperty(name))
# General
output_style = :expanded
relative_assets = true
line_comments = false
project_path = File.dirname(__FILE__) + "/"
utils_dir = project_path + "utils/"
# Sass Paths
http_path = "/"
compiletype = environment
project_path = File.dirname(__FILE__) + "/"
utils_dir = "utilities/"
utils_path = project_path + utils_dir
# callback - on_sprite_saved
# http://compass-style.org/help/tutorials/configuration-reference/
on_sprite_saved do |filename|
if File.exists?(filename)
if (compiletype == :production)
@maddesigns
maddesigns / spancount.js
Created December 2, 2012 16:46 — forked from bejes/spancount.js
Simple jquery plugin to insert spans in text and a defined character limit
/**
* Plugin function to insert spans into text:
* usage
* $(document).ready(function() {
* $('p.charcount').charSpanCount(); });
* or $(document).ready(function() {
* $('p.charcount').charSpanCount({'charcount' : 15});
* });
*/
(function($) {
@maddesigns
maddesigns / CssRule.js
Created March 23, 2012 18: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) {
@maddesigns
maddesigns / file_input_example.css
Created December 9, 2011 15:38 — forked from nathansmith/file_input_example.css
Markup to Hide a File Input
.fake_file_input {
background: url(../images/fake_file_input.png) no-repeat;
cursor: pointer;
width: 150px;
height: 30px;
overflow: hidden;
position: relative;
display: inline-block;
*display: inline;
*zoom: 1;