Skip to content

Instantly share code, notes, and snippets.

View guilhermereis1's full-sized avatar
💲
The infinity is for the few

Guilherme Reis guilhermereis1

💲
The infinity is for the few
  • Brasil
View GitHub Profile

Semantic Commit Messages

See how a minor change to your commit message style can make you a better programmer.

Format: <type>(<scope>): <subject>

<scope> is optional

Example

@guilhermereis1
guilhermereis1 / rails http status codes
Created December 7, 2021 23:03 — forked from mlanett/rails http status codes
HTTP status code symbols for Rails
HTTP status code symbols for Rails
Thanks to Cody Fauser for this list of HTTP responce codes and their Ruby on Rails symbol mappings.
Status Code Symbol
1xx Informational
100 :continue
101 :switching_protocols
102 :processing
@guilhermereis1
guilhermereis1 / status_tag.css.scss
Created July 14, 2021 13:45 — forked from yoonwaiyan/status_tag.css.scss
Status Tag CSS extracted from ActiveAdmin. Can be applied in any scss with "status_tag" class with the appropriate class name for the colors.
.status_tag {
background: darken(#cacaca, 15%);
color: #fff;
text-transform: uppercase;
letter-spacing: 0.15em;
padding: 3px 5px 2px 5px;
font-size: 0.8em;
&.ok, &.published, &.complete, &.completed, &.green { background: #8daa92; }
&.warn, &.warning, &.orange { background: #e29b20; }
@guilhermereis1
guilhermereis1 / rspec_model_testing_template.rb
Created June 24, 2021 17:43 — forked from PWSdelta/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:
@guilhermereis1
guilhermereis1 / Call FullCalendar
Created June 4, 2019 20:53 — forked from anderson-mota/Call FullCalendar
Inicializa o plugin Full Calendar e traduz a nomenclatura de datas para o formato ptBr.
function loadCalendar(eventSources){
$('#calendar').fullCalendar({
monthNames: ['Janeiro', 'Fevereiro', 'Março', 'Abril', 'Maio', 'Junho', 'Julho', 'Agosto', 'Setembro',
'Outubro', 'Novembro', 'Dezembro'],
monthNamesShort: ['Jan', 'Fev', 'Mar', 'Abr', 'Mai', 'Jun', 'Jul', 'Aug', 'Set', 'Out', 'Nov', 'Dez'],
dayNames: ['Domingo', 'Segunda', 'Terça', 'Quarta', 'Quinta', 'Sexta', 'Sábado'],
dayNamesShort: ['Dom', 'Seg', 'Ter', 'Qua', 'Qui', 'Sex', 'Sab'],
titleFormat: {
month: 'MMMM yyyy',