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 life = { | |
start: function() { | |
delete this.stop; | |
}, | |
stop: function() { | |
console.log('arg...'); | |
} | |
}; | |
// v2 |
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
_.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 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 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 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 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