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
/** | |
* http://lea.verou.me/2011/01/styling-children-based-on-their-number-with-css3/ | |
*/ | |
/* one item */ | |
li:first-child:nth-last-child(1) { | |
width: 100%; | |
} | |
/* two items */ |
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
//calculate the SVG Path for an arc | |
//src: http://stackoverflow.com/questions/5736398/how-to-calculate-the-svg-path-for-an-arc-of-a-circle/18473154#18473154 | |
function polarToCartesian(centerX, centerY, radius, angleInDegrees) { | |
var angleInRadians = (angleInDegrees-90) * Math.PI / 180.0; | |
return { | |
x: centerX + (radius * Math.cos(angleInRadians)), | |
y: centerY + (radius * Math.sin(angleInRadians)) | |
}; |
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
https://www.w3.org/TR/wai-aria-practices/#aria_ex | |
https://medium.com/@Heydon/flexbox-grid-finesse-4d22b80bfee1#.4e0u7wess |
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
Paul Irish : Performance audit of the new Reddit mobile site | |
Issue link : https://github.com/reddit/reddit-mobile/issues/247 |
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
# grunt-newer: | |
# Check for newer @import .less files example | |
# See: https://github.com/tschaub/grunt-newer/issues/29 | |
newer: { | |
options: { | |
/** | |
* when changing a less file, we run an addional check on all the *.less files to see if they are @importing a modified *.less file, and if so we include it in the files which less task should execute. | |
*/ | |
override: function(details, shouldIncludeCallback) { |
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
/** | |
* Take a basic template and return a populated result | |
* Required until our use of mustache is greenlit | |
*/ | |
var Renderer = function () { | |
var startPattern = '{{', | |
endPattern = '}}', | |
tagPattern = /\{\{([#,\/])([\w,.]*\}\})/, //matches all opening or closing list tags | |
instance = this; |
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
/** | |
* Generate the tick values for a given axis | |
* Reference: https://github.com/mbostock/d3/blob/master/src/svg/axis.js | |
*/ | |
function getAxisTicks(axis) { | |
var scale1 = axis.scale(), | |
tickArguments_ = axis.ticks(), | |
tickValues = axis.tickValues(), | |
ticks; | |
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
module.exports = function(grunt) { | |
var path = require('path'); | |
grunt.initConfig({ | |
//... | |
express : { | |
options : { | |
port : 80, | |
hostname : '*', | |
server : path.resolve(__dirname, 'server.js') |
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
/*! | |
* Loose Lorem Ipsum replacer | |
*/ | |
(function(window, document, $, undefined) { | |
'use strict'; | |
var loremIpsum = ["lorem", "ipsum", "dolor", "sit", "amet", "consectetur", "adipiscing", "elit", "sed", "do", "eiusmod", "tempor", "incididunt", "ut", "labore", "et", "dolore", "magna", "aliqua", "ut", "enim", "ad", "minim", "veniam", "quis", "nostrud", "exercitation", "ullamco", "laboris", "nisi", "aliquip", "ex", "ea", "commodo", "consequat", "duis", "aute", "irure", "in", "reprehenderit", "voluptate", "velit", "esse", "cillum", "eu", "fugiat", "nulla", "pariatur", "excepteur", "sint", "occaecat", "cupidatat", "non", "proident", "sunt", "culpa", "qui", "officia", "deserunt", "mollit", "anim", "id", "est", "laborum", "at", "vero", "eos", "et", "accusamus", "iusto", "odio", "dignissimos", "ducimus", "qui", "blanditiis", "praesentium", "voluptatum", "deleniti", "atque", "corrupti", "quos", "dolores", "quas", "molestias", "excepturi", "sint", "occaecati", "cupiditate", "non", "provident", "similique", "sunt", "in" |
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 express = require("express"), | |
serveIndex = require('serve-index'), | |
connectSSI = require('connect-ssi'), | |
app = module.exports = express(); | |
// serve directory listings | |
app.use(serveIndex(__dirname, {'icons': true})); | |
//catch shtml files and parse them | |
app.use(connectSSI({ |
NewerOlder