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

Produtividade Ninja: Como ZSH e Fabric Mudaram minha forma de trabalhar

Produtividade Ninja: Como ZSH e Fabric Mudaram minha forma de trabalhar

mateusrevoredo

March 21, 2015
Tweet

More Decks by mateusrevoredo

Other Decks in Technology

Transcript

  1. MATEUS REVOREDO * TECNÓLOGO EM ANÁLISE EM DESENVOLVIMENTO DE SISTEMAS

    * MESTRANDO EM ENGENHARIA DE SOFTWARE * TRABALHANDO COM TI DESDE OS 13 ANOS * APPLE FANBOY * PROGRAMADOR PHP * CERTIFICADO MICROSOFT
  2. "Zsh is a shell designed for interactive use, although it

    is also a powerful scripting language." — http://www.zsh.org/
  3. INSTALADO POR PADRÃO NO MAC * * JUST TYPE "ZSH"

    FACILMENTE INSTALÁVEL NO LINUX
  4. Z

  5. +

  6. "Fabric é uma biblioteca Python e ferramenta de linha de

    comando para simplificar o uso de SSH para administração do sistemas" — http://www.fabfile.org/
  7. fab -H localhost,linuxbox host_type [localhost] run: uname -s [localhost] out:

    Darwin [linuxbox] run: uname -s [linuxbox] out: Linux
  8. from fabric.operations import local as lrun, run from fabric.contrib.files import

    exists from fabric.api import * from fabric.state import env @task def vagrantbox(): env.hosts = ['127.0.0.1:2222'] env.user = 'vagrant' env.password = 'vagrant' @task def install(): execute(install_zsh) execute(install_ohmyzsh) execute(clone_dotfiles_repository) execute(run_dotbot) @task def install_zsh(): sudo('yum -y install zsh') @task def install_ohmyzsh(): run('wget --no-check-certificate http://install.ohmyz.sh -O - | sh') @task def clone_dotfiles_repository(): run('git clone --recursive https://github.com/mateusrevoredo/dotfiles.git ~/.dotfiles') @task def run_dotbot(): with cd('~/.dotfiles'): run('sh install')
  9. WOW

  10. ?