This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// based on the oocss by stubbornella (Nicole Sullivan) | |
// @link https://github.com/stubbornella/oocss/blob/master/core/grid/grids.css | |
// @source https://gist.github.com/1021575 | |
// Definition | |
=oocss_grid_line | |
overflow: hidden | |
*overflow: visible | |
*zoom: 1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// @link https://gist.github.com/1048659 | |
// @module sprite grid helper | |
// default route to the image directory | |
$sprite_base_path: '/images' !default | |
// default grid size | |
$sprite_icon_size: 16 !default | |
// @example | |
// $sprite_icon_size: 16 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var s = 'hello world!'; | |
function callback (match, index, text) { | |
console.log(match, index, text); | |
return match.toUpperCase(); | |
} | |
s.replace(/l/g, callback); | |
// output |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// media | |
// @link https://github.com/stubbornella/oocss/blob/master/core/media/media.css | |
=oocss_media_clearfix | |
overflow: hidden | |
*overflow: visible | |
zoom: 1 | |
=oocss_media | |
.media | |
+oocss_media_clearfix |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
table { | |
width: 100%; | |
font-family: Helvetica, Arial, sans-serif | |
} | |
table th { font-weight: bold } | |
table th, | |
table td { | |
border: 1px solid #333; | |
padding: 2px 4px; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
table { | |
width: 100%; | |
font-family: Helvetica, Arial, sans-serif | |
} | |
table th { font-weight: bold } | |
table th, | |
table td { | |
border: 1px solid #333; | |
padding: 2px 4px; | |
-moz-transition: padding .3s; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
grep -lir "text you want to find" * |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var SmoothScroll = function () { | |
'use strict'; | |
var self = this, | |
$topReference = $('html, body'), | |
$window = $(window) | |
; | |
function targetPosition(targetHash) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// var nestedArr = ['a', 'b', 'c', {'foo': 'bar'}]; | |
// convertArrayToHash(nestedArr); // output: {a: 'b', c: {'foo': 'bar'}} | |
function convertArrayToHash (array) { | |
var hash = {}, key = ''; | |
$(array).each(function (index, value) { | |
if (index % 2) { | |
hash[key] = value; | |
} else { | |
key = value; | |
} |