Skip to content

Instantly share code, notes, and snippets.

View thiagozs's full-sized avatar
:octocat:
Have a nice day

Thiago Zilli Sarmento thiagozs

:octocat:
Have a nice day
View GitHub Profile
@thiagozs
thiagozs / go_expr_example.go
Created August 25, 2026 14:30
Golang Expr example
package main
import (
"fmt"
"math"
"github.com/expr-lang/expr"
"github.com/expr-lang/expr/vm"
)
@thiagozs
thiagozs / flameshot_ubuntu2604_wayland.md
Created May 7, 2026 17:12
flameshot with ubuntu 26.04 wayland

Use multiple screens

bash -c -- "QT_QPA_PLATFORM=xcb flameshot gui"
@thiagozs
thiagozs / init-cluster-rabbitmq.sh
Last active February 23, 2026 16:59
Init cluster rabbitmq
#!/bin/sh
set -e
echo "#########################################"
echo "### INIT SCRIPT VERSION: 2026-02-23-v6 ###"
echo "#########################################"
get_container_id() {
docker ps --filter "name=$1" --format "{{.ID}}" | head -n 1
}
@thiagozs
thiagozs / rabbitmq.conf
Created February 23, 2026 13:38
Rabbitmq config docker compose cluster
cluster_formation.peer_discovery_backend = dns
cluster_formation.dns.hostname = tasks.rabbitmq
cluster_partition_handling = autoheal
loopback_users.guest = false
log.console = true
log.console.level = info
@thiagozs
thiagozs / guia_encargos_iof.md
Created February 4, 2026 12:30
Guia encargos e IOF

Guia de Consulta: Encargos e IOF no Cartão de Crédito (Brasil)

Este documento resume as fórmulas e alíquotas oficiais aplicadas pelas instituições financeiras, conforme as normas do Banco Central (BCB) e da Receita Federal.

1. IOF (Imposto sobre Operações Financeiras)

O IOF varia conforme o tipo de movimentação:

A. Compras Internacionais (Transação Individual)

@thiagozs
thiagozs / saga_example.go
Last active February 2, 2026 12:48
SAGA example system, steps and engine for execution
package main
import (
"context"
"fmt"
"log/slog"
"os"
"reflect"
"sync"
"time"
@thiagozs
thiagozs / canvas_eco_launch.md
Created October 15, 2025 18:42
Game designer Canvas - Eco Launh

Game Design Canvas — Jogo: "Eco Launch"

1. Game Concept

Nome: Eco Launch Inspiração: Angry Birds e Cut the Rope

Objetivo: Salvar animais de uma floresta poluída, lançando sementes que regeneram o ambiente e libertam os bichos presos.

Ideia: Um puzzle ecológico que combina física, estratégia e conscientização ambiental.

@thiagozs
thiagozs / create_user_with_home.sh
Last active November 3, 2025 13:15
Create user home with password linux
#!/usr/bin/env bash
#
# Script para criar um usuário no Ubuntu e configurar o diretório HOME
# Autor: Thiago Zilli Sarmento
# Uso:
# sudo ./create_user_with_home.sh <nome_usuario> [grupo_adicional]
#
# Exemplo:
# sudo ./create_user_with_home.sh asapadm sudo
#
@thiagozs
thiagozs / clamav_freshclam_no_sudo.md
Created August 14, 2025 17:22
ClamAV Freshclam sem sudo

Configurando ClamAV Freshclam para rodar sem sudo

Este guia mostra como permitir que o usuário thiagozs execute o freshclam sem precisar de permissões de root, corrigindo o erro:

ERROR: Failed to open log file /var/log/clamav/freshclam.log: Permission denied
ERROR: Problem with internal logger (UpdateLogFile = /var/log/clamav/freshclam.log).
ERROR: initialize: libfreshclam init failed.
ERROR: Initialization error!