Skip to content

Instantly share code, notes, and snippets.

View gurgelrenan's full-sized avatar
:octocat:

Renan Gurgel gurgelrenan

:octocat:
View GitHub Profile
@gurgelrenan
gurgelrenan / postmortem.md
Created January 29, 2018 21:06 — forked from mlafeldt/postmortem.md
Example Postmortem from SRE book, pp. 487-491

Shakespeare Sonnet++ Postmortem (incident #465)

Date

2015-10-21

Authors

  • jennifer
  • martym
@gurgelrenan
gurgelrenan / query.rb
Created November 2, 2016 20:33 — forked from r00k/query.rb
Not so hard after all.
def self.popular_this_week
Podcast.
joins(:downloads).
select("podcasts.*, COUNT(podcast_id) as download_count").
where("downloads.created_at >= ?", 1.week.ago.utc).
group("podcasts.id").
order("download_count DESC")
end
  • AppCLeaner
  • Audacity
  • Caffeine
  • Daisy Disk
  • Chorme
  • Iterm
  • OmmWriter
  • Postico
  • ScreenHero
  • Skype
@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
@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 / config.md
Last active October 11, 2019 13:07
Configuração básica do git

Configurações do GIT

Instalando

  • sudo apt-get install git-core (Ubuntu)
  • brew install git (OSX)

Configurações

  1. git config --global user.name "Your Actual Name"
@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:

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 / 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"