Skip to content

Instantly share code, notes, and snippets.

View gurgelrenan's full-sized avatar
:octocat:

Renan Gurgel gurgelrenan

:octocat:
View GitHub Profile
inputs = %w[
CollectionSelectInput
DateTimeInput
FileInput
GroupedCollectionSelectInput
NumericInput
PasswordInput
RangeInput
StringInput
TextInput
<% flash.each do |type, message| %>
<div class="alert <%= bootstrap_class_for(type) %> fade in">
<button class="close" data-dismiss="alert">×</button>
<%= message %>
</div>
<% end %>
@gurgelrenan
gurgelrenan / git-lg
Created April 23, 2014 22:13
The best Git Log
git config --global alias.lg "log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit"

Make it real

Ideas are cheap. Make a prototype, sketch a CLI session, draw a wireframe. Discuss around concrete examples, not hand-waving abstractions. Don't say you did something, provide a URL that proves it.

Ship it

Nothing is real until it's being used by a real user. This doesn't mean you make a prototype in the morning and blog about it in the evening. It means you find one person you believe your product will help and try to get them to use it.

Do it with style

@gurgelrenan
gurgelrenan / rspec_model_testing_template.rb
Last active August 29, 2015 14:27 — forked from SabretWoW/rspec_model_testing_template.rb
Rails Rspec model testing skeleton & cheat sheet using rspec-rails, shoulda-matchers, shoulda-callbacks, and factory_girl_rails. Pretty much a brain dump of examples of what you can (should?) test in a model. Pick & choose what you like, and please let me know if there are any errors or new/changed features out there. Reddit comment thread: http…
# This is a skeleton for testing models including examples of validations, callbacks,
# scopes, instance & class methods, associations, and more.
# Pick and choose what you want, as all models don't NEED to be tested at this depth.
#
# I'm always eager to hear new tips & suggestions as I'm still new to testing,
# so if you have any, please share!
#
# @kyletcarlson
#
# This skeleton also assumes you're using the following gems:
@gurgelrenan
gurgelrenan / palitos.c
Created November 12, 2015 02:15
Palitos
#include <stdio.h>
int is_par(int number);
void jogo_par_ou_impar();
void jogo_nim();
int main(int argc, const char * argv[]) {
int matricula;
int continuar_jogando = 1;
@gurgelrenan
gurgelrenan / lambdas.rb
Last active December 30, 2015 11:39 — forked from thatrubylove/6.rb
#Some examples with lambdas
sum = ->(num_list) { num_list.reduce(:+) }
square = ->(number ) { number * number }
squares = ->(num_list) { num_list.map {|num| square.(num) } }
sum_squares = ->(num_list) { sum.(squares.(num_list)) }
square_sum = ->(num_list) { square.(sum.(num_list)) }
gem 'minitest'
require 'minitest/autorun'

Screencasting Framework

The following document is a written account of the Code School screencasting framework. It should be used as a reference of the accompanying screencast on the topic.

Why you should care about screencasting?

You're probably aren't going to take the time to read this document if you're not interested, but there are a lot of nice side effects caused by learning how to create quality screencasts.

  1. Communicating more effectively - At Envy Labs we produce screencasts for our clients all the time. Whether it's demoing a new feature or for a presentation for an invester, they're often much more effective and pleasent than a phone call or screen sharing.
@gurgelrenan
gurgelrenan / rubyconf2016.md
Last active September 26, 2016 23:39
Review sobre algumas palestras que vi na Rubyconf 2016

Lições aprendidas sobre qualidade de software

  • Todo mundo gosta muito de trabalhar em projetos novos, mas manter os existentes sempre consideram chato
  • Pressure -> SLOP -> LATE
  • Débitos tecnicos, raiz de todo mal
  • https://en.wikipedia.org/wiki/Iterative_design
  • PR deve conter no máximo 400 Linhas de código para uma boa revisão
  • Não tenha medo de melhorar o código
  • Hope is not a plan