floripa on rails - dev workflow

Post on 21-Jan-2018

79 Views

Category:

Technology

4 Downloads

Preview:

Click to see full reader

TRANSCRIPT

H fRede: __________

Senha: __________

hosted by supported by

● 19:30 Terminal● 20:00 Coding● 20:45 Debugging● 21:00 Sharing● 21:30 Happy hour

A

T

● Shell basics (Jônatas)● Tmux (Weverton)T

T● What is a

multiplexer?● First steps● Plugins via TPM● Tips and tricks

@wevtimoteo

@jonatasdp

● Readline shortcuts● Aliases● Functions● Special variables !!,!$

B

● (CTRL - a) Begin of line● (CTRL - e) End of line● (ESC + b) Backward one word● (ESC + L) Forward one word● (CTRL - s) Search● (CTRL - r) Reverse search● (CTRL - p) Previous line history

R

● alias vim=nvim● alias be='bundle exec'● alias bi='bundle install'● alias g!="git commit -am"● alias g+="git add"● alias g-="git rm"

M

kill $(ps aux | grep 'rails' | awk '{print $2}')

function k9(){

kill $(ps aux | grep $1 | awk '{print $2}')

}

k9 rails

B f

!! -> last line

!$ -> last parameter

$! -> first function argument

$* -> all function arguments

B

vim my/file/with/a/deep/path.rb

git add !$

git commit !$ -m “Add deep path file”

!! -> last line

!$ -> last parameter

B

C

● Vim (Weverton e Lucas)● Guard (Weverton)● TDD (Mats)● Benchmarking (Karla)

C

V ● Vi, Vim or Neovim?● Vimtutor● VimL● Plugins management?

Pathogen, Vundle, Plugged

● Tips and tricks

G● What is guard?● guard/listen gem● Guardfile DSL ● Tips and tricks

@wevtimoteo

TDD● What is TDD?● Why TDD?● When not to use TDD● Tips and tricks

@g8M guih /guih

TDD● What is TDD?● Why TDD?● When not to use TDD● Tips and tricks

@g8M guih /guih

TDD● What is TDD?● Why TDD?● When not to use TDD● Tips and tricks

@g8M guih /guih

require 'new_relic/agent/method_tracer' class Transformer include ::NewRelic::Agent::MethodTracer… def select_events … end

def process_events … end

def update_events … end

add_method_tracer :select_events, 'Custom/select_events' add_method_tracer :process_events, 'Custom/process_events' add_method_tracer :update_events, 'Custom/update_events'end

require 'benchmark'class Updater... def update ... end...endclass NewUpdater def update ... end...end...Benchmark.bm do |x| x.report("New Updater") { NewUpdater.new.load(events);nil } x.report("Actual Updater") { Updater.new.load(events);nil }end

$ ruby bench_update_events.rb

user system total real Actual Updater: 1.533333 0.016667 1.550000 ( 1.503462) New Updater: 1.050000 0.000000 1.050000 ( 0.735473)

● IRB and Pry (Jônatas)● Code search (Parazito)

with `ag` and `grep`

● Basic usage● Search in a specific file● Search the current directory for

all files● Recursively search directories● Insensitive case● Highlight match with color● Number of occurrences in a file● grep and regex● curl and grep

@parazito

● REPL● binding.pry● cd object● ls● show-method● exit-program

P@jonatasdp

S

● Linters (Jônatas, Rafael)● Better commit messages (Henrich)● Gitlab workflow (Brodock �)● Code Review (Jaison)● Docker (Pery)

S

● What is this?● Why use?● Ruby Style Guide

R C

● gem pronto● Add runners ● Repository integration● formatters● Running

Prafael.besen@geekhunter.com.br

● Setup docker & docker-compose for rails

● Using Docker with Rails

● Tips and tricks● Useful Aliases

D@perylemke

github.com/perylemke

top related