Skip to content

Instantly share code, notes, and snippets.

:octocat:

Renan Gurgel gurgelrenan

:octocat:
Block or report user

Report or block gurgelrenan

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@gurgelrenan
gurgelrenan / postmortem.md
Created Jan 29, 2018 — forked from mlafeldt/postmortem.md
Example Postmortem from SRE book, pp. 487-491
View postmortem.md

Shakespeare Sonnet++ Postmortem (incident #465)

Date

2015-10-21

Authors

  • jennifer
  • martym
@gurgelrenan
gurgelrenan / query.rb
Created Nov 2, 2016 — forked from r00k/query.rb
Not so hard after all.
View query.rb
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
View programs.md
  • AppCLeaner
  • Audacity
  • Caffeine
  • Daisy Disk
  • Chorme
  • Iterm
  • OmmWriter
  • Postico
  • ScreenHero
  • Skype
@gurgelrenan
gurgelrenan / rubyconf2016.md
Last active Sep 26, 2016
Review sobre algumas palestras que vi na Rubyconf 2016
View rubyconf2016.md

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
View palitos.c
#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 Sep 5, 2015
Configuração básica do git
View config.md

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 Aug 29, 2015 — forked from kyletcarlson/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…
View rspec_model_testing_template.rb
# 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:
View gist:9219b344645e61e6f375
  • REST + JSON

URI

Example: https://api.mycompany.com/name-if-api/resource

  • https:// (http or https)
  • Domain: api.mycompany.com
  • API Name: name-of-api (optional)
  • Resources e parameters: resource
You can’t perform that action at this time.