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
| /** | |
| * find recursively in a given folder for a given pattern into file names | |
| * returns an array of matching files | |
| */ | |
| var fs = require('fs'), | |
| path = require('path'), | |
| util = require('util'); | |
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
| define([ | |
| 'jquery' | |
| ], function($) { | |
| 'use strict'; | |
| // extends $.support | |
| // http://stackoverflow.com/questions/3937818/how-to-test-if-the-browser-supports-the-native-placeholder-attribute | |
| $.support.placeholder = (function() { | |
| var input = document.createElement( 'input' ); |
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 life = { | |
| start: function() { | |
| delete this.stop; | |
| }, | |
| stop: function() { | |
| console.log('arg...'); | |
| } | |
| }; | |
| // v2 |
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
| _.mixin({ | |
| // from underscore's examples [http://underscorejs.org/#mixin](http://underscorejs.org/#mixin) | |
| capitalize: function(string) { | |
| return string.charAt(0).toUpperCase() + string.substring(1).toLowerCase(); | |
| }, | |
| ensureApi: function(obj, api) {}, | |
| /** | |
| * add sep betwen 3 numbers: |
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 cache = {}; | |
| var pubsub = { | |
| publish: function(channel, args) { | |
| if (!cache[channel]) { | |
| return; | |
| } | |
| var stack = cache[channel]; |
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
| Backbone.History.prototype.multiRouteSeparator = '|'; | |
| Backbone.History.prototype.loadUrl = function(fragment) { | |
| fragment = this.fragment = this.getFragment(fragment); | |
| // split the fragment according to the defined separator | |
| var fragments = fragment.split(this.multiRouteSeparator); | |
| // test handlers with each fragments | |
| // the function doesn't return anything like the real one | |
| // but it doesn't seems to create problems |
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
| ====================================================== | |
| GITHUB | |
| ====================================================== | |
| recap pour utlisation de git et github : | |
| * * * * * * * * | |
| * CREATION * |
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
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <meta charset="utf-8" /> | |
| <title>Pattern Strategy</title> | |
| </head> | |
| <body> | |
| <script src="./strategy.js"></script> | |
| <script> |
NewerOlder