Skip to content

Instantly share code, notes, and snippets.

@gurdotan
gurdotan / gist:3986841
Created October 31, 2012 12:42
Backbone View event bubbling
_.extend(Backbone.View.prototype, {
bubbleEventsTo : function(targetView) {
this.on("all", function() {
Backbone.View.prototype.trigger.apply(targetView, arguments);
});
return this;
})
@gurdotan
gurdotan / gist:3596190
Created September 2, 2012 09:27
Git 3-way merge with meld
### Add the following to HOME/tools/bin/gitmerge
#!/bin/sh
meld $2 $1 &
sleep 0.5
meld $1 $3 &
sleep 0.5
meld $2 $4 $3
### Make it executable
@gurdotan
gurdotan / gist:1661805
Created January 23, 2012 08:40
SSH history autocomplete
complete -W "$(echo $(grep '^ssh ' ~/.bash_history | sort -u | sed 's/^ssh //'))" ssh
@gurdotan
gurdotan / gist:1219199
Created September 15, 2011 13:19
git-diffall installation
cd ~
mkdir tools
cd tools
git clone https://github.com/thenigan/git-diffall.git
sudo ln -s ~/tools/git-diffall/git-diffall /usr/bin/git-diffall