Skip to content

Instantly share code, notes, and snippets.

@canering
Forked from joel/gist:3038633
Created September 13, 2016 04:45
Show Gist options
  • Save canering/493a6c63b476a1f871fb29d8cf7c3f12 to your computer and use it in GitHub Desktop.
Save canering/493a6c63b476a1f871fb29d8cf7c3f12 to your computer and use it in GitHub Desktop.
HomeBrew Fix
sudo brew doctor
# Update HomeBrew
cd /usr/local && \
sudo git add . && \
sudo git reset --hard HEAD && \
sudo git pull --rebase
#!/usr/bin/env ruby
class CleaningHomeBrew
BINARIES = ['cmake', 'imagemagick', 'jasper', 'jpeg', 'libevent', 'libtiff', 'little-cms','memcached','mysql','ossp-uuid','pidof','postgresql','redis','sphinx','wget']
class << self
def clean
BINARIES.each { |binary| system "sudo brew cleanup && sudo brew link #{binary} && sudo brew uninstall #{binary} && sudo brew install #{binary}" }
end
end
end
begin
CleaningHomeBrew.clean
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment