A storm Homebrewin'

C104c0724758cd86c79205032b8bc528?s=47 Emma Fabre
February 24, 2016

A storm Homebrewin'

Useful things I wish I'd known sooner about Homebrew

C104c0724758cd86c79205032b8bc528?s=128

Emma Fabre

February 24, 2016
Tweet

Transcript

  1. A STORM HOMEBREWIN'

  2. WHO AM I

  3. WHO AM I ➤ Maxime Fabre

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

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

    oui Monsieur ➤ Closer to my 30s than I'd like
  6. 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
  7. None
  8. I EM WEB DEVLUPR

  9. $ brew install

  10. None
  11. None
  12. nobody loves me anymore :(

  13. /usr/local/bin/php /usr/bin/php MACPORTS HOMEBREW

  14. $ brew install money-in-my-account

  15. None
  16. BUT WAIT THERE'S... MORE?

  17. BUT WAIT THERE'S... MORE? ➤ brew services management

  18. BUT WAIT THERE'S... MORE? ➤ brew services management ➤ brew

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

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

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

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

    version locking and switching ➤ brew applications management ➤ brew synchronize dependencies ➤ brew tips ➤ brew coffee
  23. 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
  24. 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?
  25. BREW SERVICES

  26. $ sudo services elasticsearch restart SERVICES ELSEWHERE

  27. MEANWHILE ON OSX $ launchctl

  28. MEANWHILE ON OSX $ launchctl $ launchctl load ~/Library/LaunchAgents/homebrew.mxcl.php56.plist

  29. $ brew tap homebrew/services GETTING BREW SERVICES

  30. $ 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
  31. $ brew start mysql $ brew restart --all $ brew

    stop php70 && brew start php56 MANAGING SERVICES
  32. $ sudo brew start mysql SETTING UP GLOBAL SERVICES

  33. LOCAL SERVICES RUN ON LOGIN GLOBAL SERVICES RUN ON BOOT

  34. alias services="brew services"

  35. services ls services s mysql services r nginx alias services="brew

    services"
  36. BREW VERSIONS

  37. $ brew tap homebrew/versions GETTING BREW VERSIONS

  38. $ brew install php56 php70 INSTALLING MULTIPLE MAJORS

  39. $ brew install php56 php70 INSTALLING MULTIPLE MAJORS

  40. $ brew search ruby ruby homebrew/versions/ruby182 homebrew/versions/ruby192 homebrew/versions/ruby193 homebrew/versions/ruby20 VIEWING

    AVAILABLE MAJORS
  41. $ brew tap homebrew/versions $ brew install ruby192 INSTALLING A

    MAJOR $ brew install homebrew/versions/ruby192
  42. $ brew unlink ruby $ brew link ruby192 SWITCHING BETWEEN

    MAJORS
  43. None
  44. None
  45. None
  46. $ brew install php56

  47. LOCKING MINORS $ brew pin php56 $ brew unpin php56

  48. LOCKING MINORS $ brew pin php56 $ brew unpin php56

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

    $ brew tap-pin homebrew/php $ brew tap-unpin homebrew/php
  50. $ php --version PHP 5.6.66 (buggy) (built: Feb 31 2051

    10:18:58)
  51. $ 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
  52. $ brew switch php56 5.6.17 REVERTING UPDATE

  53. BREW APPS

  54. None
  55. $ brew install chrome iterm atom

  56. None
  57. $ brew tap caskroom/cask

  58. $ brew cask install google-chrome INSTALLING APPLICATIONS

  59. $ brew cask install google-chrome INSTALLING APPLICATIONS $ brew tap

    caskroom/versions $ brew cask install google-chrome-dev phpstorm-eap
  60. $ brew tap caskroom/fonts $ brew cask install font-inconsolata ALSO

    MANAGES FONTS
  61. BREW BUNDLE

  62. None
  63. )

  64. $ brew tap homebrew/bundle GETTING BREW BUNDLE

  65. $ touch ~/Brewfile CREATING YOUR BUNDLE

  66. # List needed taps tap "homebrew/versions" tap "caskroom/cask" tap "homebrew/php"

    tap "homebrew/nginx" WHAT GOES IN A BREWFILE?
  67. # 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?
  68. # 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?
  69. $ brew bundle

  70. $ brew bundle dump CREATING A BREWFILE FROM INSTALLED DEPENDENCIES

    $ brew bundle check CHECKING IF EVERYTHING FROM THE BREWFILE IS INSTALLED AND UP TO DATE
  71. None
  72. None
  73. $ brew install mackup $ mackup backup

  74. None
  75. # 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
  76. BREW TIPS

  77. $ 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
  78. $ brew leaves php56 composer git 1. LISTING ONLY OWN

    DEPENDENCIES
  79. $ brew search vagrant > Nothing 2. SEARCHING RELATED PACKAGES

  80. $ 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
  81. $ brew install php56 --something --something 3. CHECK POSSIBLE BUILD

    OPTIONS
  82. $ 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
  83. $ brew install php56-pthreads 4. INSTALLING DEVELOPMENT VERSIONS

  84. $ brew reinstall php56-pthreads (--devel|--HEAD) 4. INSTALLING DEVELOPMENT VERSIONS

  85. BREW QUESTIONS?

  86. $ 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/
  87. 5. BREW ELSEWHERE: LINUX

  88. $ 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
  89. None