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
gulp.task('build-typeface', function() { | |
return merge( | |
gulp.src(paths.components) | |
.pipe(cached('components')) | |
// add tabulations to non-empty newlines | |
.pipe(replace(/(?:^|\r\n?|\n)(?![\r\n])/g, '\n\t\t\t')) | |
// replace points[X] with points(X) | |
.pipe(replace(/points\[(\d+)\]/g, 'points($1)')) | |
.pipe(jshint({ |
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
# D'après ce tutoriel : http://www.moncefbelyamani.com/how-to-install-xcode-homebrew-git-rvm-ruby-on-mac/ | |
$ xcode-select --install | |
$ ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" | |
$ brew install git | |
$ brew doctor | |
$ brew install node |
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
textarea { | |
width: 100%; | |
height: 300px; | |
margin: 0; | |
padding: 20px; | |
border: 0; | |
border-radius: 0; | |
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
// through2 is a thin wrapper around node transform streams | |
var through = require('through2'), | |
gutil = require('gulp-util'), | |
esprima = require('esprima'), | |
escodegen = require('escodegen'), | |
estraverse = require('estraverse'), | |
_ = require('lodash'), | |
PluginError = gutil.PluginError; | |
// consts |
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
// ----------------------------------------------------------------- | |
// To be added to CmdUtils API | |
// ----------------------------------------------------------------- | |
// ** {{{ CmdUtils.getUbiquity( ) }}} ** | |
// | |
// Get a reference to Ubiquity. This is used by | |
// {{{ CmdUtils.closeUbiquity() }}} and {{{ CmdUtils.getCommandByName() }}}, but | |
// probably doesn't need to be used directly by command feeds. | |
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
Index: event.js | |
=================================================================== | |
--- event.js (revision 6582) | |
+++ event.js (working copy) | |
@@ -7,7 +7,7 @@ | |
// Bind an event to an element | |
// Original by Dean Edwards | |
- add: function( elem, types, handler, data ) { | |
+ add: function( elem, types, handler, data, noSpecial ) { |
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> | |
<head> | |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> | |
<title>Bubbling test</title> | |
<style> | |
.test li { | |
margin-left: 3em; | |
width: 200px; | |
} |
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 | |
abs = Math.abs, | |
sqrt = Math.sqrt, | |
floor = Math.floor, | |
min = Math.min, | |
V3 = function(x, y, z) { | |
this.x = x; | |
this.y = y; | |
this.z = z; |
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
// Minimalist class (className) manipulation library | |
var klass = { | |
has: function(elem, name) { | |
return (' '+elem.className+' ').indexOf(' '+name+' ') != -1; | |
}, | |
add: function(elem, name) { | |
if(!klass.has(elem, name)) { | |
elem.className += ' '+name; | |
} | |
}, |
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
(function($) { | |
var div = document.createElement('div'), | |
divStyle = div.style, | |
support = $.support, | |
rmatrixFilter = /M\d{2}=([\d+.\-]+)/g; | |
support.transform = | |
divStyle.MozTransform === ''? 'MozTransform' : | |
(divStyle.WebkitTransform === ''? 'WebkitTransform' : |
OlderNewer