Skip to content

Instantly share code, notes, and snippets.

View miguelgraz's full-sized avatar

Miguel Schmitz Grazziotin miguelgraz

View GitHub Profile

Keybase proof

I hereby claim:

  • I am miguelgraz on github.
  • I am miguelgraz (https://keybase.io/miguelgraz) on keybase.
  • I have a public key whose fingerprint is A7D1 1049 A67C 8DE7 534E 904A 8D80 9DEC 3ECD 8264

To claim this, I am signing this object:

@miguelgraz
miguelgraz / gist:44d41cc8269bb12542f1
Last active August 29, 2015 14:16
Remove locally branches already removed on remote
The script checks out your master branch and compares the deleted branches
git checkout master; git pull origin master; git fetch --all -p; git branch -vv | grep gone | awk '{ print $1 }' | xargs -n 1 git branch -d
All credits to http://stackoverflow.com/a/28020809/645223
unless File.exist?('Gemfile')
File.write('Gemfile', <<-GEMFILE)
source 'https://rubygems.org'
gem 'rails', github: 'rails/rails'
gem 'arel', github: 'rails/arel'
gem 'sqlite3'
GEMFILE
system 'bundle'
end