Two-way binding just means that:
Backbone doesn't have a "baked-in" implementation of 2 option (although you can certainly do it using event listeners)
In Backbone, we can easily achieve option 1 by binding a view's "render" method to its model's "change" event. To achieve option 2, you need to also add a change listener to the input element, and call model.set in the handler.
example code:
if (os.hostname() === 'host_name') {
const memwatch = require('memwatch-next');
const heapdump = require('heapdump');
console.log('_SYSTEM_ activating:[memwatch]');
console.log('_SYSTEM_ activating:[heapdump]');
memwatch.on('leak', function(info) {
let heapsnapshot = '/path/leak_' + Date.now() + '.heapsnapshot';
console.log('MEMWATCH [%s]'.bgBlue, JSON.stringify(info));
console.log('HEAPDUMP [%s]'.bgBlue, heapsnapshot);
heapdump.writeSnapshot(heapsnapshot);
});
}
~/.gitconfig
[diff]
external = /usr/local/bin/git-diff.sh
tool = meld
[merge]
tool = meld
[push]
default = simple
/usr/local/bin/git-diff.sh
#!/bin/bash
meld "$2" "$5" > /dev/null 2>&1
..then use git diff HEAD