charm city linux - jan 2014 - web dev made easy - shell revolution

19
Web Dev Made Easy - Shell Revolution Charm City Linux

Upload: chris-stone

Post on 07-Jul-2015

1.740 views

Category:

Technology


2 download

DESCRIPTION

I gave this 20-30 minute presentation at Charm City Linux on 1/13/2014. I covered my top command line tools that I wouldn't want to do web dev without. The top 3 are mosh, screen and vagrant. I removed Fish before the presentation because the more I thought about it, I could live without it, and probably preferred not to use it.

TRANSCRIPT

Page 1: Charm City Linux - Jan 2014 - Web Dev Made Easy - Shell Revolution

Web Dev Made Easy - Shell Revolution

Charm City Linux

Page 2: Charm City Linux - Jan 2014 - Web Dev Made Easy - Shell Revolution

WHO AM I?•Principal and Co-Founder of E-Moxie - www.emoxie.com •PHP Developer, System Administrator, Tinkerer •Community Guy •Meetup Organizer - Baltimore PHP/Mobile/API (coming soon) •Always looking to maximize efficiencies •Always looking to make life easier (mainly mine) •I’ve been around for awhile, I’ve seen and learned some things !

[email protected] •@cmstone

Page 3: Charm City Linux - Jan 2014 - Web Dev Made Easy - Shell Revolution

INDISPENSABLE TOOLS!

!

!

!

Fish Screen Mosh

Vagrant

Page 4: Charm City Linux - Jan 2014 - Web Dev Made Easy - Shell Revolution

SCREEN

Page 5: Charm City Linux - Jan 2014 - Web Dev Made Easy - Shell Revolution

WHAT IS SCREEN?•Terminal multiplexer •Window manager for the terminal •Has been around since the beginning of time (early 90s I believe) •Ability to create additional “windows” or terminals within one terminal window and switch between them !

Quick Start: •screen -R (Reattach a detached session - if it’s not currently attached) •screen -ls (List current screen sockets and their state) •Ctrl+a D (Detach current screen session) •Ctrl+a C (Create a new window) •Ctrl+a # (Switch to window) •Ctrl+a * (List windows)

Page 6: Charm City Linux - Jan 2014 - Web Dev Made Easy - Shell Revolution

SCREEN QUICK STARTCommand Line •screen (Starts it up) •screen -R (Reattach a detached session - if it’s not currently attached) •screen -D [pid](Force detach, specify pid if multiple, use -r to immediately reattach) •screen -ls (List current screen sockets and their state)

!While in screen •Ctrl+a D (Detach current screen session) •Ctrl+a C (Create a new window) •Ctrl+a # (Switch to window) •Ctrl+a * (List windows)

Page 7: Charm City Linux - Jan 2014 - Web Dev Made Easy - Shell Revolution

MOSH - The MObile SHell

Page 8: Charm City Linux - Jan 2014 - Web Dev Made Easy - Shell Revolution

WHAT IS MOSH?•MIT Computer Science •Fairly new, 2 years old •Supports roaming •Intermittent Connectivity •Local Echo •SSH Replacement •Available for pretty much anything (even iOS and Android) !

Mac: brew install mobile-shell Linux: apt-get install mosh or yum install mosh Windows: Cygwin is experimental

Page 9: Charm City Linux - Jan 2014 - Web Dev Made Easy - Shell Revolution

WHAT IS MOSH?•MIT Computer Science •Fairly new, 2 years old •Supports roaming •Intermittent Connectivity •Local Echo •SSH Replacement •Available for pretty much anything (even iOS and Android) !

Mac: brew install mobile-shell Linux: apt-get install mosh or yum install mosh Windows: Cygwin is experimental

Page 10: Charm City Linux - Jan 2014 - Web Dev Made Easy - Shell Revolution

DOWNFALLS OF MOSH•Not installed by default in most installations •No terminal scrollback (use screen!)

Page 11: Charm City Linux - Jan 2014 - Web Dev Made Easy - Shell Revolution

Zero to Development Hero

Page 12: Charm City Linux - Jan 2014 - Web Dev Made Easy - Shell Revolution

WHAT IS VAGRANT?•Awesome •Life changing •New kid on the block •The #1 tool you should have in your development arsenal •Development tool that every developer and project should be using •Manager for a virtualization provider (VirtualBox, VMWare, etc) •Automates your [development] environment (Puppet or Chef) •Support for Docker containers (Paul)

Page 13: Charm City Linux - Jan 2014 - Web Dev Made Easy - Shell Revolution

WHY VAGRANT•Gets rid of the “it works for me” •EASY and FAST •Everyone on the same page •Closely resembles a production environment •Keeps your computer clean •Low barrier to entry

Page 14: Charm City Linux - Jan 2014 - Web Dev Made Easy - Shell Revolution

THE HARD WAY1. Someone new joins your company or team 2. They need to get their development environment setup 3. It takes two days to one week to get up and running 4. Install an IDE 5. Install MAMP or XAMP or something else that can serve pages 6. Make sure the PHP version is the same 7. Make sure the PHP config is the same 8. Install additional extensions 9. Configure MAMP 10. Always tackle “it works for me” problems in the environment 11. Environment relies on the local machine. Screwed it up? Do it again. 12. Production environment got updated? Let’s make sure everyone updates to the right version, do it again. Sounds fun....

Page 15: Charm City Linux - Jan 2014 - Web Dev Made Easy - Shell Revolution
Page 16: Charm City Linux - Jan 2014 - Web Dev Made Easy - Shell Revolution

THE EASY WAY1. Someone new joins your company or team and they need to get their development environment setup 2. Install IDE 3. Install VirtualBox 4. Install Vagrant 5. Clone git repository 6. Run ‘vagrant up’ 7. Make things

Page 17: Charm City Linux - Jan 2014 - Web Dev Made Easy - Shell Revolution

MY PROCESS1. New person shows 2. Install VirtualBox 3. Install Vagrant 4. Clone git repository 5. Run ‘vagrant up’ 6. Vagrant uses puppet to boostraps the system using a very similar config to production systems 7. Use IDE of choice !

Zero Config for User 1. Apache is using dynamic virtual hosting (Tim) 2. Local ~/development folder is mapped to /var/www in VM 3. *.dev.emoxie.com points to 192.168.1.50 4. Apache maps the * to /var/www/<*>

Page 18: Charm City Linux - Jan 2014 - Web Dev Made Easy - Shell Revolution

WHAT DO I NEED1. Vagrant - vagrantup.com 2. VirtualBox - virtualbox.org 3. PuPHPet - puphpet.com - GREAT Kickstarter to get you going 4. Not a PHP User? http://www.vagrantbox.es

Page 19: Charm City Linux - Jan 2014 - Web Dev Made Easy - Shell Revolution

THANKS!

Reach out to me @cmstone or [email protected]