Skip to content

Instantly share code, notes, and snippets.

//** Vertical Rhythm **//
// By Chris Eppstein, with adjustments by Eric Meyer
// The IE font ratio is a fact of life. Deal with it.
!ie_font_ratio = 16px / 100%
// The base line height is the basic unit of line hightness.
!base_line_height ||= 18px
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Detect Credit Card Type</title>
</head>
<body>
#!/bin/bash
#
# Copyright 2011, Tim Branyen @tbranyen <tim@tabdeveloper.com>
# Dual licensed under the MIT and GPL licenses.
#
# Automatically clone single or multiple repos into a folder,
# great for setting up a git projects folder.
#
# Install: curl http://t.no.de/gist/github.sh | sh
#
@nimbupani
nimbupani / draw-svg.js
Created June 7, 2011 20:33 — forked from johan/draw-svg.js
Draw an SVG bit by bit
var steps = 0 // steps drawn on the current element, so far
, info = document.getElementById('next_step')
, svgs = [].slice.call(document.getElementsByTagName('svg'))
, svg, walker, current;
function lexSVGPath(d) {
function command(seg) {
var cmd = seg.match(/[a-z]/i), arg, cnt;
if (cmd) {
cmd = cmd[0]; // which subcommand
@nimbupani
nimbupani / HTML language
Created November 22, 2011 17:00 — forked from kornelski/HTML language
TextMate HTML language tweaked to support unquoted attributes
{ scopeName = 'text.html.basic';
firstLineMatch = '<!DOCTYPE|doctype<(?i:html)|<\?(?i:php)';
fileTypes = ( 'html', 'htm', 'shtml', 'xhtml', 'phtml', 'php', 'inc', 'tmpl', 'tpl', 'ctp' );
foldingStartMarker = '(?x)
(<(?i:head|body|table|thead|tbody|tfoot|tr|div|select|fieldset|style|script|ul|ol|li|form|dl|section|article|header|footer|nav|aside)\b.*?>
|<!--(?!.*--\s*>)
|^<!--\ \#tminclude\ (?>.*?-->)$
|<\?(?:php)?.*\b(if|for(each)?|while)\b.+:
|\{\{?(if|foreach|capture|literal|foreach|php|section|strip)
|\{\s*($|\?>\s*$|//|/\*(.*\*/\s*$|(?!.*?\*/)))
@nimbupani
nimbupani / cat.js
Created December 5, 2011 00:54 — forked from padolsey/cat.js
Improving Jeremy Keith's CAT news example from http://24ways.org/2011/conditional-loading-for-responsive-designs
var cat = {};
/**
* cat.NewsBox
* Retrieves news from Google
*/
cat.NewsBox = (function(){
function NewsBox(searchTerm, injectFn) {
this.searchTerm = searchTerm;
@nimbupani
nimbupani / hack.sh
Created March 31, 2012 16:55 — forked from erikh/hack.sh
OSX For Hackers
#!/usr/bin/env sh
##
# This is script with usefull tips taken from:
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
#
# install it:
# curl -sL https://raw.github.com/gist/2108403/hack.sh | sh
#
@nimbupani
nimbupani / gist:2770321
Created May 22, 2012 17:09 — forked from paulirish/gist:2731401
draft post on a11y

Jacob Thornton has an inspiring slide deck on accessibility that brings to fore all the concerns that web developers have with implementing features around accessibility.

For a very long time, developers have been told about making websites 'accessible'. Like it is a faucet that should be turned on or off. Till [Victor Tsaran's demonstration of using a screenreader][] (which was in 2007 - a very long time since accessibility evangelism began) - very few web developers had any idea of the real immediate impact of implementing accessibility features.

It is also interesting that very few developers even knew that blind users of screen readers read at such an extraordinary speed that very few sighted users are capable of. What are some of the other abilities that disabled users of the web use to their advantage?

People like Jason Kiss and Steve Faulkner who detail the [behavior and suppo

@nimbupani
nimbupani / yaml.txt
Created December 29, 2011 23:00 — forked from anonymous/yaml.txt
a really useless fucking yaml cheat sheet
Collection indicators:
'? ' : Key indicator.
': ' : Value indicator.
'- ' : Nested series entry indicator.
', ' : Separate in-line branch entries.
'[]' : Surround in-line series branch.
'{}' : Surround in-line keyed branch.
Scalar indicators:
'''' : Surround in-line unescaped scalar ('' escaped ').
'"' : Surround in-line escaped scalar (see escape codes below).
@nimbupani
nimbupani / gist-clone.js
Created September 30, 2011 17:59 — forked from tbranyen/gist-clone.js
clone all gists
#!/usr/bin/env node
var request = require("request");
var exec = require("child_process").exec;
if (process.argv.length < 3) {
console.log("Missing username argument");
}
var username = process.argv[2];