Skip to content

Instantly share code, notes, and snippets.

@tekin
tekin / weekends.rb
Created June 6, 2011 08:30 — forked from alterisian/weekends.rb
Weekends left til the end of summer
# Author: Ian Moss aka oceanician : http://twitter.com/oceanician
# First Published: https://gist.github.com/1009253
# modulus is your friend! this works because of the way ruby
# modulus behaves when the dvidend is negative.
def friday_after(date)
date +(5 -date.cwday) % 7
end
# Returns all the Fridays between today and the date specified.
git fetch origin other_branch:other_branch
* [new branch] other_branch -> other_branch
git branch
* master
other_branch
git checkout other_branch
# Or, in one swift command:
git checkout -t origin/other_branch