This file contains 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
/** | |
* Center with calc(), tip from Lea Verou presentation | |
*/ | |
body{ | |
/* housekeeping */ | |
background: #ffa; | |
min-height: 100%; | |
font-family:sans-serif; | |
} |
This file contains 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
# file lives in: | |
# C:\Windows\System32\drivers\etc | |
10.0.2.2 local.domain.on.mac |
This file contains 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 request = require('superagent'); | |
var _ = require('lodash'); | |
var cheerio = require('cheerio'); | |
request.get('http://news.ycombinator.com/', function (res){ | |
var html = res.text, | |
$ = cheerio.load(html), | |
index = 1; | |
var items = $('.title a'); |
This file contains 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
// if svg is unsupported (modernizr test) | |
// look for data-svg-fallback attr | |
// and switch out src on those images | |
(function (Modernizr, $, undefined) { | |
if(!Modernizr.svg){ | |
var $elems = $('img[data-svg-fallback]'); | |
$elems.each(function(index){ | |
var img = $(this); | |
img.attr('src', img.attr('data-svg-fallback')); |
This file contains 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
/** | |
* display:table equal height columns ftw | |
*/ | |
body{ | |
font:1.3em/1.4 sans-serif; | |
} | |
.table{ | |
display:table; | |
} |
This file contains 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
<?php | |
function template_preprocess_html(&$vars) { | |
$params = drupal_get_query_parameters(); | |
$page = &$vars['page']; | |
if($params['iframe'] == true){ | |
if(isset($page['page_top'])){ | |
unset($page['page_top']); | |
} |
This file contains 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
/** | |
* animation one frame | |
* from http://lea.verou.me/2012/12/animations-with-one-keyframe/ | |
*/ | |
body{ | |
background: #f06; | |
text-align:center; | |
} | |
@keyframes dang{ | |
50%{ font-size:9em; } |
This file contains 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
'use strict'; | |
var path = require('path'); | |
var lrSnippet = require('grunt-contrib-livereload/lib/utils').livereloadSnippet; | |
var folderMount = function folderMount(connect, point) { | |
return connect.static(path.resolve(point)); | |
}; | |
module.exports = function(grunt) { |
This file contains 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
// 'bad' browsers - core experience | |
if( 'querySelector' in document && | |
'localStorage' in window && | |
'addEventListener' in window ){ | |
// good - enhanced experience | |
// add fun stuff! | |
} |
This file contains 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
<!doctype html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width"> | |
<title>Untitled</title> | |
<link href="css/app.css" rel="stylesheet" /> | |
</head> | |
<body> |