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
/** | |
* Update the player duration | |
*/ | |
updateDuration = function(playlist) { | |
// update the duration | |
player.duration(totalDuration(playlist)); | |
}; |
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
for i in *; do | |
if [ -d "$i" ]; then | |
cd $i; | |
if [ -f "package.json" ]; then | |
zelda ../; | |
fi; | |
cd ..; | |
fi; | |
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
0 info it worked if it ends with ok | |
1 verbose cli [ '/Users/gkatsevman/.nvm/v0.10.24/bin/node', | |
1 verbose cli '/Users/gkatsevman/.nvm/v0.10.24/bin/npm', | |
1 verbose cli 'install', | |
1 verbose cli 'flex-sdk' ] | |
2 info using [email protected] | |
3 info using [email protected] | |
4 verbose readDependencies using package.json deps | |
5 verbose cache add [ 'flex-sdk', null ] | |
6 verbose cache add name=undefined spec="flex-sdk" args=["flex-sdk",null] |
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
test('patchCanPlayType patches canplaytype with our function, conditionally', function() { | |
var oldAV = vjs.ANDROID_VERSION, | |
video = document.createElement('video'), | |
canPlayType = vjs.TEST_VID.constructor.prototype.canPlayType, | |
patchedCanPlayType, | |
unpatchedCanPlayType; | |
vjs.ANDROID_VERSION = 4.0; | |
vjs.Html5.patchCanPlayType(); |
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
<title>backbone-nested amd require</title> | |
<script data-main="amd-require.js" src="../vendor/requirejs/require.js"></script> |
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 readTep(evt) { | |
var three; | |
taps.push((new Date()).getTime()); | |
taps = taps.slice(-3); | |
if (taps.length === 3) { | |
three = taps.reduce(function(p, c, i) { | |
return p && Math.abs(c - (taps[i - 1] || c)) < 50; | |
}, true); | |
if (three) { |
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 http = require('http'); | |
var server = http.createServer(function(req, res) { | |
console.log('foo'); | |
res.end('foo'); | |
}, function(req, res) { | |
console.log('bar'); | |
res.end('bar'); | |
}); | |
server.listen(5555); |
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 foo(id) { | |
var deferred = q.defer(); | |
bar(id) | |
.then(function(obj) { | |
var anotherDeferred = q.defer(); | |
log('fail'); |
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
define(function(require, exports, module) { | |
var $ = require('jquery'); | |
}); |
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 Toggleable = function(a, b) { | |
this._a = a; | |
this._b = b; | |
}; | |
Toggleable.prototype.valueOf = function() { return this._a; }; | |
Toggleable.prototype.toggle = function() { | |
if (this.valueOf() == this._a) { |