Skip to content

Instantly share code, notes, and snippets.

Avatar
:octocat:
always learning

Elton Minetto eminetto

:octocat:
always learning
View GitHub Profile
@eminetto
eminetto / rfc.md
Created May 15, 2021 15:42
Template de RFC
View rfc.md

Título

Descrição do problema

Devemos explicar o problema claramente e identificar detalhes adicionais que a equipe precise saber. Devemos aqui descrever o contexto, o que foi feito até agora e o estado atual.

A descrição também serve como uma trilha à qual podemos voltar no futuro para entender o raciocínio que tínhamos na época e ver quais restrições e requisitos mudaram.

Possíveis abordagens

@eminetto
eminetto / eleicao.go
Created October 2, 2022 21:50
eleicao.go
View eleicao.go
package main
import (
"encoding/json"
"fmt"
"log"
"net/http"
"time"
)
@eminetto
eminetto / eleicao_color.go
Created October 2, 2022 22:15
eleicao_color.go
View eleicao_color.go
package main
import (
"encoding/json"
"fmt"
"log"
"net/http"
"time"
"github.com/charmbracelet/lipgloss"
@eminetto
eminetto / service_test.go
Created September 28, 2022 11:56
service_test.go
View service_test.go
package service_test
import (
"testing"
"github.com/PicPay/example"
)
func TestFindAll(t *testing.T) {
s := example.NewService()
all, err := s.FindAll()
@eminetto
eminetto / service.go
Created September 28, 2022 11:55
service.go
View service.go
package service
//NewService create new service
func NewService() *Service {
return &Service{}
}
//FindAll
func (s *Service) FindAll() ([]*entity.Privilege, error) {
acl := s.getDefaultPrivileges()
@eminetto
eminetto / rfc.md
Created May 22, 2021 13:04
Template of RFCs
View rfc.md

Title

Problem description

We must explain the problem clearly and identify additional details that the team needs to know. We must here describe the context, what we did so far, and the current state.

The description also serves as a trail that we can go back to in the future to understand the reasoning we had at the time and see what restrictions and requirements have changed.

Possible approaches

@eminetto
eminetto / api.go
Last active September 8, 2022 23:37
api.go
View api.go
const TIMEOUT = 30 * time.Second
//Start a new http server with graceful shutdown and default parameters
func Start(l *logger.Logger, port string, handler http.Handler, options ...ServerOption) error {
srv := &http.Server{
ReadTimeout: TIMEOUT,
WriteTimeout: TIMEOUT,
Addr: ":" + port,
Handler: handler,
}
@eminetto
eminetto / profundo.c
Created September 8, 2022 23:13
Módulo profundo
View profundo.c
int open(const char* path, int flags, mode_t permissions);
int close(int fd);
ssize_t read(int fd, void* buffer, size_t count);
ssize_t write(int fd, const void* buffer, size_t count);
off_t lseek(int fd, off_t offset, int referencePosition);
@eminetto
eminetto / raso.java
Created September 8, 2022 23:09
modulo raso
View raso.java
FileInputStream fileStream = new FileInputStream(fileName);
BufferedInputStream bufferedStream = new BufferedInputStream(fileStream);
ObjectInputStream objectStream = new ObjectInputStream(bufferedStream);
@eminetto
eminetto / architectural-kata.md
Last active July 29, 2022 18:22
All Stuff, No Cruft
View architectural-kata.md

All Stuff, No Cruft

O organizador de conferências precisa de um sistema de gerenciamento para as conferências que ele administra, tanto para palestrantes quanto para participantes.

Usuários

Centenas de palestrantes, dezenas de funcionários do evento, milhares de participantes

Requisitos: