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 22, 2021
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 / rfc.md
Created May 15, 2021
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

View index.php
<?php
require_once 'vendor/autoload.php';
if ($argc < 2) {
echo "Usage: php index.php ProjectName\n";
exit;
}
$projectName = $argv[1];
$client = new \Github\Client(
View bcrypt.go
package main
import (
"golang.org/x/crypto/bcrypt"
"fmt"
)
func main() {
password := []byte("MyDarkSecret")
hashedPasswordFromPHP := []byte("$2y$10$zlo5xhAXy5oyfjQPykUHP.tcnxdJmKHNBWgOssYKIcPm4iyHRe/1e");
View start_work.sh
#!/bin/bash
export GITHUB_REPO="user/repo"
export GITHUB_USERNAME=$(cat ~/.githubrc 2> /dev/null | grep user.login | cut -d ":" -f2 | xargs)
export GITHUB_PASSWORD=$(cat ~/.githubrc 2> /dev/null | grep user.password | cut -d ":" -f2 | xargs)
if [ -z "$GITHUB_USERNAME" ]
then
read -p "Type your Github username: " GITHUB_USERNAME
echo "user.login: $GITHUB_USERNAME" >> ~/.githubrc
fi
View gist:7312242
<?php
namespace DoctrineNaPratica\Model;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity
* @ORM\Table(name="User")
*/
class User
View start_review.sh
#!/bin/bash
command_exists () {
type "$1" &> /dev/null ;
}
export GITHUB_REPO="user/repo"
export GITHUB_USERNAME=$(cat ~/.githubrc 2> /dev/null | grep user.login | cut -d ":" -f2 | xargs)
export GITHUB_PASSWORD=$(cat ~/.githubrc 2> /dev/null | grep user.password | cut -d ":" -f2 | xargs)
if [ -z "$GITHUB_USERNAME" ]
View can.go
//this way?
func CanSubscribe(userID int, courseID int) bool {
}
//this way?
func CanSubscribe(userID int, courseID int) error {
//if can't subscribe return an error
//if can return nil
//if there's an error, like a database connection error, return the error itself