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
_.each(['Collection'], function(name) { | |
var collection = Backbone[name]; | |
collection.prototype.addChangeListener = function(callback) { | |
this.on('all', callback) | |
} | |
collection.prototype.removeChangeListener = function(callback) { | |
this.off('all', callback); | |
} |
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
class User extends AbstractType | |
{ | |
public function buildForm(FormBuilderInterface $builder, array $options) | |
{ | |
$builder | |
->add('name', 'text') | |
->add('email', 'email') | |
->add('password', 'password'); | |
} |
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') | |
, source = require('vinyl-source-stream') | |
, browserify = require('browserify') | |
, reactify = require('reactify') | |
gulp.task('bundle', function() { | |
browserify({ | |
entries: ['./public/scripts/dd/bootstrap.js'], | |
transform: ['reactify'] | |
}) |
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 fs = require("fs"); | |
module.exports = { | |
play: function(req, res) { | |
var path = "video.mp4"; | |
var stat = fs.statSync(path); | |
var total = stat.size; | |
if (req.headers["range"]) { | |
var range = req.headers.range; |
NewerOlder