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
#!/bin/sh | |
# Taken from and modified | |
# http://devblog.springest.com/a-script-to-remove-old-git-branches/ | |
echo "The following remote branches are fully merged into master and will be removed:" | |
git branch -r --merged master | sed 's/ *origin\///' | grep -v 'master$' | |
read -p "Continue (y/n)?" | |
if [ "$REPLY" == "y" ] ; then # Remove remote fully merged branches | |
git branch -r --merged master | sed 's/ *origin\///' | grep -v 'master$' | xargs -I % git push origin --delete % |
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
""" This is a simple gist to show how to mock | |
private methods. I've got lots of questions | |
regarding this topic. Most people seems confused. | |
Hope it helps. | |
""" | |
import unittest | |
import mock |
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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |