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
<html><head> | |
<!--[if lt IE 8]><script type="text/javascript"> | |
alert('Ooops, you are using an old browser. Please come back with a more recent one.'); | |
document.location.href="http://thewebyoumiss.com/?referer=example.com" | |
+"&preview=example.com/images/preview.png" | |
+"&preview=youtube.com/qs545qsd"; | |
</script><![endif]--> | |
</head><body> | |
<p>The fantastic app you could miss with old browsers.</p> | |
</body></html> |
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
/* ***** BEGIN LICENSE BLOCK ***** | |
* Version: MPL 1.1/GPL 2.0/LGPL 2.1 | |
* | |
* The contents of this file are subject to the Mozilla Public License Version | |
* 1.1 (the "License"); you may not use this file except in compliance with | |
* the License. You may obtain a copy of the License at | |
* http://www.mozilla.org/MPL/ | |
* | |
* Software distributed under the License is distributed on an "AS IS" basis, | |
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License |
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
Installer/compiler NodeJS : http://nodejs.org | |
Puis dans la console : | |
# Karma runner | |
npm install -g karma | |
# Framework de test | |
npm install -g karma-mocha | |
npm install -g karma-chai | |
npm install -g karma-effroi |
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) { | |
// Chargement des modules Grunt nécessaires | |
grunt.loadNpmTasks('grunt-contrib-clean'); | |
grunt.loadNpmTasks('grunt-contrib-watch'); | |
grunt.loadNpmTasks('grunt-svgicons2svgfont'); | |
grunt.loadNpmTasks('grunt-svg2ttf'); | |
grunt.loadNpmTasks('grunt-ttf2eot'); | |
grunt.loadNpmTasks('grunt-ttf2woff'); | |
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.src(...) | |
.pipe(gutil.forwardErrors(pluginA())) | |
.pipe(gutil.forwardErrors(pluginB())) | |
.pipe(gutil.forwardErrors(pluginC())) | |
.on('error', function () { | |
throw new Error("Do not send to production!"); | |
}); |
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
#!/bin/bash | |
# Install the project | |
git clone [email protected]:ChtiJS/chtijs.francejs.org chtijs | |
cd chtijs | |
# Testing the Grunt build | |
git checkout master | |
npm install --quiet | |
time for a in {1..10}; do grunt dist; done |
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
#!/usr/bin/env node | |
//module.exports = function(){ | |
var http = require("http"); | |
var optimist = require("optimist"); | |
var cheerio = require("cheerio"); | |
var path = require("path"); | |
var uglifyjs = require('uglifyjs'); | |
var uglifycss = require('uglifycss'); | |
var url = require('url'); |
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 gRetain(options) { | |
var stream = new Stream.Writable({objectMode:true}) | |
, fileMap = {} | |
, timeout | |
, size = 0 | |
; | |
options.limit = options.limit || 0; | |
options.delay = options.delay || 300; |
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 STYLE_ATTRIBUTE = 'TEXT-STYLE-NAME'; | |
var styleMatches = function (item, styleName) { | |
if (!item || item.attributes === undefined || item.attributes[STYLE_ATTRIBUTE] === undefined) { | |
return false; | |
} | |
return item.attributes[STYLE_ATTRIBUTE].match(styleName); |
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 xbbcode2html(str, options) { | |
var all = options.all || false; | |
var cleanup = options.cleanup || false; | |
var secure = options.secure || false; | |
var tags = [ | |
'span', 'kbd', 'var', 'del', 'ins', 'div', 'strong', 'em', 'dfn', 'cite', | |
'q', 'blockquote', 'p', 'br', 'a', 'ol', 'ul', 'li', 'abbr', 'acronym', | |
'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'hr', 'pre', 'address', 'img', 'tr', | |
'th', 'td', 'table', 'caption', 'thead', 'tfoot', 'tbody', 'dl', 'dd', 'dt', | |
'map', 'area', 'code', 'samp', 'sub', 'sup' |