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
// requires | |
/* | |
* https://github.com/filamentgroup/grunticon | |
* https://www.npmjs.org/package/grunt-text-replace | |
*/ | |
'use strict'; | |
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
// <rant> to actual rant | |
// (requires modern browsers) | |
var rants = document.getElementsByTagName('rant'); | |
for (i=0;i<rants.length;i++) { | |
var rant = new SpeechSynthesisUtterance(rants[i].innerHTML); | |
window.speechSynthesis.speak(rant); | |
} |
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
document.addEventListener('keyup', function (e) { | |
var keyCode = e.keyCode || e.which, | |
arrow = { left: 37, up: 38, right: 39, down: 40 }; | |
switch (keyCode) { | |
case arrow.left: | |
console.log(keyCode); | |
break; | |
case arrow.up: |
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
/* REQUIRES http://modernizr.com/download/#-addtest-json-script_defer-load */ | |
(function(window, document, Modernizr, undefined) { | |
'use strict'; | |
Modernizr.addTest('jQueryVersion', function() { | |
return ( | |
Modernizr.json && | |
Modernizr.scriptdefer && |
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
import React from 'react'; | |
import PropTypes from 'prop-types'; | |
import classNames from 'classnames'; | |
const ANIMATION_DURATION = 1000; | |
class BatchDropZone extends React.Component { | |
static propTypes = { |
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 = { | |
options: { | |
separator: ';' | |
}, | |
dist: { | |
src: ['src/**/*.js'], | |
dest: 'dist/<%= pkg.name %>.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
/* | |
* Steps | |
* 1. Rename your gulpfile.js to gulpfile.babel.js | |
* 2. Add babel to your package.json (npm install -D babel) | |
* 3. Start writing ES6 in your gulpfile! | |
*/ | |
import gulp from 'gulp'; // ES6 imports! | |
import sass from 'gulp-sass'; | |
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
/** | |
* Filter out hard-coded width, height attributes on all images in WordPress. | |
* https://gist.github.com/4557917 | |
* | |
* This version applies the function as a filter to the_content rather than send_to_editor. | |
* Changes made by filtering send_to_editor will be lost if you update the image or associated post | |
* and you will slowly lose your grip on sanity if you don't know to keep an eye out for it. | |
* the_content applies to the content of a post after it is retrieved from the database and is "theme-safe". | |
* (i.e., Your changes will not be stored permanently or impact the HTML output in other themes.) | |
* |
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
/** | |
* The pseudo-element 'content' property doesnt accept normal (») style | |
* HTML entities. These variables below easy the pain of looking up the HEX codes... | |
* | |
* Referenced from http://www.danshort.com/HTMLentities/ | |
* | |
* TODO: Add all the other entities? Worth it? Some day? Maybe? | |
*/ | |
// Punctuation |
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://paulirish.com/2011/requestanimationframe-for-smart-animating/ | |
// http://my.opera.com/emoller/blog/2011/12/20/requestanimationframe-for-smart-er-animating | |
// requestAnimationFrame polyfill by Erik Möller. fixes from Paul Irish and Tino Zijdel | |
// MIT license | |
(function() { | |
var lastTime = 0; | |
var vendors = ['ms', 'moz', 'webkit', 'o']; |
OlderNewer