Skip to content

Instantly share code, notes, and snippets.

View MarceloCajueiro's full-sized avatar

Marcelo G. Cajueiro MarceloCajueiro

View GitHub Profile
@zhengjia
zhengjia / capybara cheat sheet
Created June 7, 2010 01:35
capybara cheat sheet
=Navigating=
visit('/projects')
visit(post_comments_path(post))
=Clicking links and buttons=
click_link('id-of-link')
click_link('Link Text')
click_button('Save')
click('Link Text') # Click either a link or a button
click('Button Value')
@cavalle
cavalle / warden.rb
Created August 25, 2010 10:46
Testing Warden/Devise with Steak
# Create a file `spec/acceptance/support/warden.rb' with the following
# contents:
Spec::Runner.configure do |config|
config.include Warden::Test::Helpers, :type => :acceptance
config.after(:each, :type => :acceptance) { Warden.test_reset! }
end
# Or, if you're using RSpec 2 / Rails 3, the contents should be the following
# instead:
@viniciusteles
viniciusteles / gist:556029
Created August 29, 2010 06:20
Sete Atitudes para Hackear a Indústria de Software
Sete Atitudes para Hackear a Indústria de Software
By Klaus Wuestefeld
1) Torne-se excelente.
Seja realmente bom em alguma coisa. Não fique só choramingando ou
querendo progredir às custas dos outros. Não pense q pq vc sentou 4
anos numa faculdade ouvindo um professor falar sobre software q vc
sabe alguma coisa. Jogador de futebol não aprende a jogar bola tendo
@mateusg
mateusg / devise.pt-BR.yml
Last active June 6, 2025 20:27 — forked from alexandreaquiles/devise.pt-BR.yml
pt-BR translations for Devise
# encoding: UTF-8
# pt-BR translations for Devise
pt-BR:
devise:
confirmations:
confirmed: "Sua conta foi confirmada com sucesso. Você está logado."
send_instructions: "Dentro de minutos, você receberá um e-mail com instruções para a confirmação da sua conta."
send_paranoid_instructions: "Se o seu endereço de e-mail estiver cadastrado, você receberá uma mensagem com instruções para confirmação da sua conta."
failure:
already_authenticated: "Você já está logado."
@MarceloCajueiro
MarceloCajueiro / crontab -e
Created July 15, 2011 22:00
Cron with RVM to run a rake task
0 0 * * * cd /data/project/; bash -c 'source /usr/local/rvm/bin/rvm && rake -s task' > /tmp/task.log 2>&1
@spicycode
spicycode / tmux.conf
Created September 20, 2011 16:43
The best and greatest tmux.conf ever
# 0 is too far from ` ;)
set -g base-index 1
# Automatically set window title
set-window-option -g automatic-rename on
set-option -g set-titles on
#set -g default-terminal screen-256color
set -g status-keys vi
set -g history-limit 10000
@piscisaureus
piscisaureus / pr.md
Created August 13, 2012 16:12
Checkout github pull requests locally

Locate the section for your github remote in the .git/config file. It looks like this:

[remote "origin"]
	fetch = +refs/heads/*:refs/remotes/origin/*
	url = [email protected]:joyent/node.git

Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/* to this section. Obviously, change the github url to match your project's URL. It ends up looking like this:

@MarceloCajueiro
MarceloCajueiro / gist:4733148
Last active September 19, 2016 19:57
[JOB] RoR Remoto @ IntegraGRP

[JOB] RoR Remoto @ IntegraGRP

Nós estamos procurando desenvolvedores Ruby on Rails para trabalhar remoto. Procuramos pessoas que buscam sucesso, motivadas, com visão e paixão por aquilo que fazem. Se você é apaixonado por programação, gosta de trabalhar em um ambiente ágil e desafiador junte-se a nossa equipe.

Suas tarefas:

  • Adquirir e manter conhecimentos atualizados de Ruby on Rails
  • Codificar em nossos projetos com máxima qualidade tanto no backend quanto no frontend
  • Beneficiar e melhorar a experiência de nossos usuários com o que há de melhor para web
  • Participar ativamente do processo de desenvolvimento extremamente ágil com lançamentos diários
@MarceloCajueiro
MarceloCajueiro / gist:4944334
Last active September 30, 2018 18:18
git work flow

Atualizando o branch de trabalho

Supondo que se está no branch de trabalho chamado work

git checkout master

git pull origin master

git checkout work

@jspillers
jspillers / vcr_webmock_and_live_http_simultaneously.rb
Created June 9, 2015 20:13
Sandbox test to get VCR, WebMock, and "real" http all working side by side in the same spec suite
require 'rubygems'
require 'rspec'
require 'webmock'
require 'vcr'
require 'pry'
# in a Rails app, this would be in an initializer
WebMock.disable_net_connect!(
allow_localhost: true,
net_http_connect_on_start: true