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
# 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. |
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
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 |