Skip to content

Instantly share code, notes, and snippets.

View williamkoller's full-sized avatar
💻

William Koller williamkoller

💻
View GitHub Profile
@williamkoller
williamkoller / main.go
Created May 27, 2025 12:23
SOLID em go
package main
import (
"fmt"
"strings"
"time"
)
// ============================================================================
// 1. SINGLE RESPONSIBILITY PRINCIPLE (SRP)
@williamkoller
williamkoller / aws_cost_lambda_vs_ec2_golang.md
Last active April 23, 2025 16:56
Previsão de Custos: AWS Lambda vs EC2/ECS com Golang

Previsão de Custos: AWS Lambda vs EC2/ECS com Golang

Este documento compara os custos e fatores operacionais de executar aplicações Golang na AWS utilizando Lambda e EC2/ECS, considerando:

  • Uso de memória
  • Uso de CPU
  • Redis (com Asynq)
  • Escrita em disco
  • Processamento de filas com Asynq

📘 Escalando Amazon Aurora com Lambda e EventBridge

🧩 Visão Geral

Em workloads variáveis, escalar o Amazon Aurora Serverless v2 nos horários certos pode reduzir custos e melhorar a performance.

Combinando AWS Lambda + Amazon EventBridge, é possível automatizar o ajuste de capacidade da Aurora de forma programada, com baixo custo de manutenção.


@williamkoller
williamkoller / readme.md
Created April 16, 2025 20:36
custos aws x gcp

Comparativo AWS x GCP para upload de arquivos (PDF, DOC, etc.)

  1. Equivalentes AWS x GCP
Função AWS GCP
Função serverless AWS Lambda Cloud Functions
Container serverless AWS Fargate Cloud Run
Serviço com instância ECS on EC2 Compute Engine (GCE)
@williamkoller
williamkoller / keybindings.json
Last active July 26, 2024 14:49
key bindings vscode - 26/07/2024
// Place your key bindings in this file to override the defaultsauto[]
[
{
"key": "ctrl+shift+d",
"command": "editor.action.copyLinesDownAction",
"when": "editorTextFocus && !editorReadonly"
},
{
"key": "ctrl+shift+alt+down",
"command": "-editor.action.copyLinesDownAction",
@williamkoller
williamkoller / settings.json
Last active July 26, 2024 14:50
settings.json vscode - 26/07/2024
{
"application.shellEnvironmentResolutionTimeout": 100,
"breadcrumbs.enabled": true,
"codesnap.backgroundColor": "transparent",
"codesnap.transparentBackground": true,
"codesnap.boxShadow": "0 0 0",
"editor.selectionClipboard": true, // Only for Linux
export const formatDateToBR = (date: Date): string => {
return new Intl.DateTimeFormat('pt-BR').format(date)
}
export const formatDateToISO = (date: Date): string => {
return date.toDateString().split('T')[0]
}
export const formatDateToBRShort = (date: Date): string => {
return new Intl.DateTimeFormat('pr-BR', {
@williamkoller
williamkoller / Test in hab postman
Created November 17, 2022 14:15
Test in hab postman
var res = pm.response.json();
pm.environment.set('access_token', res.access_token);
@williamkoller
williamkoller / ssh.md
Created October 5, 2022 23:36 — forked from EdnilsonRobert/ssh.md
Múltiplas chaves SSH para GitHub e GitLab

Múltiplas chaves SSH para GitHub e GitLab

1. Gerar Chaves SSH

ssh-keygen -t rsa -C "[email protected]" -b 4096 -f ~/.ssh/id_rsa_github
ssh-keygen -t rsa -C "[email protected]" -b 4096 -f ~/.ssh/id_rsa_gitlab

2. Copiar chaves para GitHub e GitLab

@williamkoller
williamkoller / .zshrc
Last active July 26, 2024 14:47
config zshrc - 26/07/2024
# If you come from bash you might have to change your $PATH.
# export PATH=$HOME/bin:$HOME/.local/bin:/usr/local/bin:$PATH
# Path to your Oh My Zsh installation.
export ZSH="$HOME/.oh-my-zsh"
# Set name of the theme to load --- if set to "random", it will
# load a random theme each time Oh My Zsh is loaded, in which case,
# to know which specific one was loaded, run: echo $RANDOM_THEME
# See https://github.com/ohmyzsh/ohmyzsh/wiki/Themes