This file contains hidden or 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
{ | |
"rules": { | |
"indent": [ | |
2, | |
4 | |
], | |
"quotes": [ | |
2, | |
"single" | |
], |
This file contains hidden or 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 gulp = require('gulp'); | |
var browserSync = require('browser-sync'); | |
var uglify = require('gulp-uglify'); | |
var source = require('vinyl-source-stream'); | |
var buffer = require('vinyl-buffer'); | |
var gutil = require('gulp-util'); | |
var watchify = require('watchify'); | |
var reactify = require('reactify'); | |
var reload = browserSync.reload; | |
var sourcemaps = require('gulp-sourcemaps'); |
This file contains hidden or 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
echo 'Installing terminal stuffs' | |
echo 'show hidden files' | |
defaults write com.apple.finder AppleShowAllFiles -boolean true ; killall Finder | |
if [ -x /usr/local/bin/brew ]; then | |
echo 'Brew' | |
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" | |
fi |
var source = source + '?cache=' + new Date().getTime(); // avoid cache
This file contains hidden or 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
:autocmd BufWritePost <buffer> make |
Javascript implementation of levenshtein distance.
function levenshtein(a,b) {
var matrix = [];
var cost = 0;
// cols 1,2,...,n-1,n
for(var i = 0; i <= b.length; i++) {
matrix[i] = [i];
/!\ for training purpose, work in progress ...
javascript implementation :
input: even length and fist half et second half sorted (ex: [1,2,4,8,3,5,6,9])
var merge = function(d) {
var c = new Array(d.length+1).join('0').split('').map(parseFloat);
var a = d.slice(0, d.length/2);
This file contains hidden or 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
/^((\+|00)33\s?|0)[1-9](\s?\d{2}){4}$/g | |
// 0241784541 | |
// 06 45 12 14 52 | |
// +33228011588 |