Skip to content

Instantly share code, notes, and snippets.

View Ribeiro's full-sized avatar
💭
I may be slow to respond.

Geovanny Ribeiro Ribeiro

💭
I may be slow to respond.
  • GTech Software Services
  • Fortaleza(CE) - Brasil
  • 05:21 (UTC -03:00)
  • LinkedIn in/geovanny-ribeiro
View GitHub Profile
@Ribeiro
Ribeiro / using-uuid-as-pk.md
Created June 4, 2025 17:59 — forked from rponte/using-uuid-as-pk.md
Não use UUID como PK nas tabelas do seu banco de dados

Pretende usar UUID como PK em vez de Int/BigInt no seu banco de dados? Pense novamente...

TL;TD

Não use UUID como PK nas tabelas do seu banco de dados.

Um pouco mais de detalhes

@Ribeiro
Ribeiro / ansi.py
Created November 15, 2024 19:10 — forked from ximenesyuri/ansi.py
Easy ansi in Python
ANSI_RESET = "\033[0m"
ANSI_STYLES = {
'BOLD': '1',
'ITALIC': '3',
'UNDERLINE': '4',
'NORMAL': '0'
}
ANSI_COLORS = {
@Ribeiro
Ribeiro / kubernetes-external-secrets on Fargate with IRSA
Created March 22, 2024 17:18 — forked from lukaszbudnik/kubernetes-external-secrets on Fargate with IRSA
Setup godaddy/kubernetes-external-secrets on Fargate with IRSA
AWS_REGION=us-east-2
CLUSTER_NAME=lukaszbudniktest1
eksctl create cluster --name $CLUSTER_NAME --region $AWS_REGION --version 1.16 --fargate
eksctl utils associate-iam-oidc-provider --region $AWS_REGION --cluster $CLUSTER_NAME --approve
# below lines for setting up policy, role, and trust relationship are based on: https://github.com/godaddy/kubernetes-external-secrets/issues/383
EKS_CLUSTER=$CLUSTER_NAME
IAM_ROLE_NAME=eksctl-$EKS_CLUSTER-iamserviceaccount-role
@Ribeiro
Ribeiro / .bashrc
Created February 13, 2024 11:04 — forked from vsouza/.bashrc
Golang setup in Mac OSX with HomeBrew. Set `GOPATH` and `GOROOT` variables in zshell, fish or bash.
# Set variables in .bashrc file
# don't forget to change your path correctly!
export GOPATH=$HOME/golang
export GOROOT=/usr/local/opt/go/libexec
export PATH=$PATH:$GOPATH/bin
export PATH=$PATH:$GOROOT/bin
@Ribeiro
Ribeiro / ClientCredentialsDelegatingHandler.cs
Created February 9, 2024 05:05 — forked from borjasanes/ClientCredentialsDelegatingHandler.cs
Client credentials delegating handler for .NET
using System.Security.Authentication;
using IdentityModel;
using IdentityModel.Client;
using Microsoft.Extensions.Caching.Memory;
using Microsoft.Extensions.Options;
namespace Api.Client.DelegatingHandlers;
public class ClientCredentialsDelegatingHandler : DelegatingHandler
{
@Ribeiro
Ribeiro / AccountRepository.java
Created January 5, 2024 17:06 — forked from rponte/AccountRepository.java
JPA and Hibernate: Simple and Smart way of using PostgreSQL Advisory Locks with JPQL to prevent Lost Update anomaly
package br.com.stackspot.nullbank.withdrawal;
import org.hibernate.LockOptions;
import org.springframework.data.jpa.repository.*;
import org.springframework.stereotype.Repository;
import javax.persistence.LockModeType;
import javax.persistence.QueryHint;
import javax.transaction.Transactional;
import java.util.Optional;
@Ribeiro
Ribeiro / idle.vbs
Last active October 18, 2023 19:58 — forked from lkannan/idle.vbs
Script to prevent your screen to going to sleep and skype going away
set wsc = CreateObject("WScript.Shell")
Do
'Five minutes
WScript.Sleep(5*60*1000)
wsc.SendKeys("{F13}")
Loop
set wsc = CreateObject("WScript.Shell")
Do
@Ribeiro
Ribeiro / gist:6e48f1e7a9808fc320604514300cb0ae
Created October 6, 2023 17:45 — forked from roalcantara/gist:2342555
JAVA > Hibernate > Custom Validator Simple Sample
package com.xpto.domain.model.validator;
import javax.validation.Constraint;
import javax.validation.Payload;
import java.lang.annotation.*;
@Target(ElementType.FIELD)
@Retention(RetentionPolicy.RUNTIME)
@Constraint(validatedBy = PhotoExtensionValidator.class)
@Documented
@Ribeiro
Ribeiro / Key_starUML.md
Created June 6, 2023 22:03 — forked from danielquisbert/Key_starUML.md
Key para starUML
@Ribeiro
Ribeiro / 001_deploy_test.ts
Created April 18, 2023 13:50 — forked from kalouo/001_deploy_test.ts
Smart contracts with Hardhat
import { HardhatRuntimeEnvironment } from 'hardhat/types';
import { DeployFunction } from 'hardhat-deploy/types';
const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) {
const {
deployments: { deploy },
getNamedAccounts,
} = hre;
const { deployer } = await getNamedAccounts();