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

Learn to Love the Terminal

Learn to Love the Terminal

Brad Parbs

March 05, 2016
Tweet

More Decks by Brad Parbs

Other Decks in Technology

Transcript

  1. # W C L A N C

    View full-size slide

  2. I ’ M B R A D PA R B S
    Developer at WebDevStudios
    http://brad.party
    twitter: @BradParbs
    github: @BradP
    # W C L A N C

    View full-size slide

  3. what the heck
    even is the
    command line
    # W C L A N C

    View full-size slide

  4. It’s all the same
    (kinda)
    # W C L A N C

    View full-size slide

  5. H O W T O G E T T H E R E
    • Mac - Terminal
    • Win - CMD
    • Really, though:
    • Mac - iTerm2
    • Win - Git Bash
    # W C L A N C

    View full-size slide

  6. B U T W H AT I F I B R E A K I T
    • rm -rf / is scary
    • modern terminals keep you safe
    • it is a bit scary, but play around
    # W C L A N C

    View full-size slide

  7. B A S I C U N I X C O M M A N D S
    • ls
    • ls -las
    # W C L A N C

    View full-size slide

  8. B A S I C U N I X C O M M A N D S
    • cd
    • cd ..
    • cd ~
    # W C L A N C

    View full-size slide

  9. B A S I C U N I X C O M M A N D S
    • pwd
    # W C L A N C

    View full-size slide

  10. B A S I C U N I X C O M M A N D S
    • mkdir
    • mkdir -p
    # W C L A N C

    View full-size slide

  11. B A S I C U N I X C O M M A N D S
    • rmdir
    # W C L A N C

    View full-size slide

  12. B A S I C U N I X C O M M A N D S
    • cp
    • mv
    # W C L A N C

    View full-size slide

  13. B A S I C U N I X C O M M A N D S
    • man
    # W C L A N C

    View full-size slide

  14. http://explainshell.com/

    View full-size slide

  15. # !
    • What is Bash?
    • Who uses it?
    • How does it work?
    # W C L A N C

    View full-size slide

  16. Y O U R F I R S T B A S H S C R I P T
    # W C L A N C

    View full-size slide

  17. Y O U R F I R S T B A S H S C R I P T
    # W C L A N C

    View full-size slide

  18. # W C L A N C

    View full-size slide

  19. # W C L A N C

    View full-size slide

  20. T I M E T O P U T I T I N T O A C T I O N
    • I use VVV & vv
    • I use Sublime Text
    • I save a lot of things for each project
    • I want to stay organized
    # W C L A N C

    View full-size slide

  21. # W C L A N C

    View full-size slide

  22. # W C L A N C

    View full-size slide

  23. # W C L A N C

    View full-size slide

  24. http://www.shellcheck.net/

    View full-size slide

  25. E V E N P H P C A N W O R K !
    # W C L A N C

    View full-size slide

  26. W P C L I
    • It’s awesome, catch Ryan Duff’s talk @ 9am
    • (may need a time machine or WordPress.tv)
    # W C L A N C

    View full-size slide

  27. W P C L I + B A S H S C R I P T M A G I C
    • Go through list of directories on server, run update
    commands
    • Backup database, move file to archive folder
    • Anything
    # W C L A N C

    View full-size slide

  28. T O O L S I L I K E T O U S E
    • Homebrew http://brew.sh
    • Windows:
    • http://scoop.sh/
    • https://chocolatey.org/
    # W C L A N C

    View full-size slide

  29. # W C L A N C

    View full-size slide

  30. # W C L A N C

    View full-size slide

  31. T O O L S I L I K E T O U S E
    • zsh
    • oh-my-zsh
    # W C L A N C

    View full-size slide

  32. # W C L A N C

    View full-size slide

  33. O H - M Y - Z S H P L U G I N S
    • brew
    • brew-cask
    • catimg
    • git
    • git-extras
    • github
    • osx
    • sublime
    • vagrant
    • z
    # W C L A N C

    View full-size slide

  34. # W C L A N C

    View full-size slide

  35. # W C L A N C

    View full-size slide

  36. T O O L S I L I K E T O U S E
    • tig
    # W C L A N C

    View full-size slide

  37. D O T F I L E S
    github.com/bradp/dotfiles
    # W C L A N C

    View full-size slide

  38. M O R E T O O L S
    http://a.brrad.com/cli # W C L A N C

    View full-size slide

  39. I D E A S F O R S C R I P T S
    • auto setup project files
    • run test suites
    • post-process scripts / styles
    • verify services are running
    • clean up folders
    • open applications / tools on startup
    • create gifs from movie subtitles
    • generate static json files from directories
    • anything
    # W C L A N C

    View full-size slide

  40. Q U E S T I O N S
    Twitter: @BradParbs
    mail: [email protected]
    posts / etc: http://brad.party
    # W C L A N C
    buy the shirt I’m wearing from Rami: teechip.com/worndpress

    View full-size slide

  41. # W C L A N C

    View full-size slide