Skip to content

Instantly share code, notes, and snippets.

View jpennell's full-sized avatar

James Pennell jpennell

  • Electronic Arts
  • Waterloo, Ontario, Canada
View GitHub Profile
@jpennell
jpennell / Homebrew install specific version
Created December 1, 2012 22:08 — forked from gcatlin/gist:1847248
Install specific version of Homebrew formula
brew update
brew versions FORMULA
cd `brew --prefix`
git checkout HASH Library/Formula/FORMULA.rb # use output of "brew versions"
brew install FORMULA
brew switch FORMULA VERSION
git checkout -- Library/Formula/FORMULA.rb # reset formula
## Example: Using Subversion 1.6.17
#
@jpennell
jpennell / README.md
Created September 8, 2012 01:53
General-purpose Yes/No prompt function ("ask") [Bash]

This is a general-purpose function to ask Yes/No questions in Bash, either with or without a default answer. It keeps repeating the question until it gets a valid answer.