Skip to content

Instantly share code, notes, and snippets.

View biliboss's full-sized avatar

Gabriel Fonseca biliboss

  • DevMagic
  • Praia Grande, São Paulo - Brazil
View GitHub Profile
@biliboss
biliboss / git-merged-remove.sh
Last active November 28, 2016 16:48 — forked from macmladen/git-merged-remove.sh
Remove merged remote branches in repository.
#!/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 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
@biliboss
biliboss / 0_reuse_code.js
Created March 7, 2014 19:29
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console