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
# safe delete branches | |
# (deletes all MERGED branches, except dev and master) | |
git branch --merged | grep -v "\*" | grep -v master | grep -v dev | xargs -n 1 git branch -d | |
# delete branches | |
# (deletes all branches, except dev and master) | |
git branch | grep -v "\*" | grep -v master | grep -v dev | xargs -n 1 git branch -D |
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
// Assumption: You have a model with a name. | |
comparator: function (User) { | |
if (User.get("name")) { | |
var str = User.get("name"); | |
str = str.toLowerCase(); | |
str = str.split(""); | |
str = _.map(str, function(letter) { return String.fromCharCode(-(letter.charCodeAt(0))) }); | |
return str; | |
}; |