Upgrade to Pro — share decks privately, control downloads, hide ads and more …

A storm Homebrewin'

Emma Fabre
February 24, 2016

A storm Homebrewin'

Useful things I wish I'd known sooner about Homebrew

Emma Fabre

February 24, 2016
Tweet

More Decks by Emma Fabre

Other Decks in Programming

Transcript

  1. WHO AM I ➤ Maxime Fabre ➤ I'm Français oui

    oui Monsieur ➤ Closer to my 30s than I'd like
  2. WHO AM I ➤ Maxime Fabre ➤ I'm Français oui

    oui Monsieur ➤ Closer to my 30s than I'd like ➤ Occasionally do photos, music, and stuff
  3. BUT WAIT THERE'S... MORE? ➤ brew services management ➤ brew

    version locking and switching ➤ brew applications management
  4. BUT WAIT THERE'S... MORE? ➤ brew services management ➤ brew

    version locking and switching ➤ brew applications management ➤ brew synchronize dependencies
  5. BUT WAIT THERE'S... MORE? ➤ brew services management ➤ brew

    version locking and switching ➤ brew applications management ➤ brew synchronize dependencies ➤ brew tips
  6. BUT WAIT THERE'S... MORE? ➤ brew services management ➤ brew

    version locking and switching ➤ brew applications management ➤ brew synchronize dependencies ➤ brew tips ➤ brew coffee
  7. BUT WAIT THERE'S... MORE? ➤ brew services management ➤ brew

    version locking and switching ➤ brew applications management ➤ brew synchronize dependencies ➤ brew tips ➤ brew coffee ➤ brewce campbell
  8. BUT WAIT THERE'S... MORE? ➤ brew services management ➤ brew

    version locking and switching ➤ brew applications management ➤ brew synchronize dependencies ➤ brew tips ➤ brew coffee ➤ brewce campbell ➤ brew you PC?
  9. $ brew services list Name Status User Plist mysql started

    anahkiasen ~/Library/LaunchAgents/homebrew.mxcl.mysql.plist nginx started root /Library/LaunchDaemons/homebrew.mxcl.nginx.plist php70 stopped LISTING AVAILABLE SERVICES
  10. $ brew start mysql $ brew restart --all $ brew

    stop php70 && brew start php56 MANAGING SERVICES
  11. $ brew tap homebrew/versions $ brew install ruby192 INSTALLING A

    MAJOR $ brew install homebrew/versions/ruby192
  12. LOCKING MINORS $ brew pin php56 $ brew unpin php56

    $ brew tap-pin homebrew/php $ brew tap-unpin homebrew/php
  13. LOCKING MINORS $ brew pin php56 $ brew unpin php56

    $ brew tap-pin homebrew/php $ brew tap-unpin homebrew/php
  14. $ brew info php56 PHP Version 5.6 /usr/local/Cellar/php56/5.6.18 (330 files,

    50M) * Built from source with: --with-thread-safety --without-apache --with-phpdbg /usr/local/Cellar/php56/5.6.17 (327 files, 49M) Built from source with: --with-thread-safety --without-apache --with-phpdbg REVERTING UPDATE
  15. $ brew cask install google-chrome INSTALLING APPLICATIONS $ brew tap

    caskroom/versions $ brew cask install google-chrome-dev phpstorm-eap
  16. )

  17. # Utilities brew "curl" brew "git" brew "node" # Server

    brew "nginx" brew "mysql" # PHP brew "php70", args: ['with-thread-safety', 'without-apache'] brew "php70-pthreads" brew "composer" WHAT GOES IN A BREWFILE?
  18. # Applications cask "atom" cask "phpstorm-eap" cask "iterm2-beta" cask "vagrant"

    cask "virtualbox" # Quicklook cask "qlmarkdown" cask "quicklook-csv" cask "quicklook-json" WHAT GOES IN A BREWFILE?
  19. $ brew bundle dump CREATING A BREWFILE FROM INSTALLED DEPENDENCIES

    $ brew bundle check CHECKING IF EVERYTHING FROM THE BREWFILE IS INSTALLED AND UP TO DATE
  20. # Get Homebrew $ /usr/bin/ruby -e "$(curl -fsSL ...install)" #

    Restored dotfiles and Brewfile $ brew install mackup $ mackup restore $ brew tap homebrew/bundle $ brew bundle IF YOUR COMPUTER CRASHES AGAIN
  21. $ brew list autoconf curl gnupg libffi mackup pcre php70-pthreads

    tesseract automake czmq gobject-introspection libgpg-error makedepend php56 php70-redis tree blackfire-agent fontconfig harfbuzz libksba mcrypt php56-crypto pixman ttfautohint blackfire-php56-zts fontforge htop-osx libpng mhash php56-igbinary pkg-config unar boost freetype hub libsodium mysql php56-intl pngquant unixodbc 1. LISTING ONLY OWN DEPENDENCIES
  22. $ brew desc (-s|-n|-d) vagrant otto: Development and deployment system

    designed as the successor to Vagrant vassh: Vagrant Host-Guest SSH Command Wrapper/Proxy/Forwarder 2. SEARCHING RELATED PACKAGES
  23. $ brew options php56 --with-cgi Enable building of the CGI

    executable (implies --without-fpm) -with-thread-safety Build with thread safety --without-apache Disable building of shared Apache 2.0 Handler module --with-phpdbg Enable building of the phpdbg SAPI executable (PHP 5.4 and above) Include Libxml2 support via Homebrew 3. CHECK POSSIBLE BUILD OPTIONS
  24. $ brew done anahkiasen
 anahkiasen
 anahkiasen
 anahkiasen
 anahkiasen
 anahkiasen
 anahkiasen


    anahkiasen
 anahkiasen facebook.com/
 twitter.com/
 github.com/
 flickr.com/
 last.fm/user/
 steamcommunity.com/id/
 blogs.wefrag.com/
 soundcloud.com/
 trakt.tv/users/
  25. $ pact Usage: "pact install <package names>" to install given

    packages "pact remove <package names>" to remove given packages "pact update <package names>" to update given packages "pact show" to show installed packages "pact find <patterns>" to find packages matching patterns "pact describe <patterns>" to describe packages matching patterns "pact packageof <commands or files>" to locate parent packages "pact invalidate" to invalidate pact caches (setup.ini, etc.) Options: --mirror, -m <url> : set mirror --invalidate, -i : invalidates pact caches (setup.ini, etc.) --force, -f : force the execution 5. BREW ELSEWHERE: WINDOWS