Skip to content

Instantly share code, notes, and snippets.

View sandromello's full-sized avatar

Sandro Mello sandromello

View GitHub Profile
@sandromello
sandromello / curl-presidio-v2.sh
Last active April 13, 2026 18:52
curl-presidio.sh
time curl -X POST http://presidio-analyzer:3000/analyze -H "Content-Type: application/json" -d @-<<EOF
{
"language": "en",
"entities": [
"DATE_TIME"
],
"text": "john.doe@hoop.dev\tJohn Doe\t+5511959606844\tjohndoe.com\t192.168.5.10\tNew York\t1990-04-15\t123.456.789-00\tAB123456\t1234 5678 9012 3456\t123\t2027-08\tBank Of America\tDE89 3704 0044 0532 0130 00\t12345-6\tMale\tAmerican\tSoftware Engineer\tHoop Technologies\tFifth Avenue, 123\t04538-132\tGA\tBrazil\t192.168.5.10 john.doe@hoop.dev\tJohn Doe\t+5511959606844\tjohndoe.com\t192.168.5.10\tNew York\t1990-04-15\t123.456.789-00\tAB123456\t1234 5678 9012 3456\t123\t2027-08\tBank Of America\tDE89 3704 0044 0532 0130 00\t12345-6\tMale\tAmerican\tSoftware Engineer\tHoop Technologies\tFifth Avenue, 123\t04538-132\tGA United States 192.168.5.10 john.doe@hoop.dev\tJohn Doe\t+5511959606844\tjohndoe.com\t192.168.5.10\tNew York\t1990-04-15\t123.456.789-00\tAB123456\t1234 5678 9012 3456\t123\t2027-08\tBank Of America\tDE89 3704 0044 0532 0130 00\t1234
@sandromello
sandromello / jump-host-script.sh
Created September 22, 2025 21:36
jump-host-script.sh
#!/bin/bash
set -eo pipefail
LINUX_TARGET_USER=
while IFS= read -r line; do
[ -z "$line" ] && continue
USER_EMAIL=$(echo -n $line | awk '{print $1}')
if [ $USER_EMAIL == "$HOOP_USER_EMAIL" ]; then
LINUX_USER=$(echo -n $line | awk '{print $2}')
config:
POSTGRES_DB_URI: 'postgres://root:default-pwd@hoopgateway-pg/postgres?sslmode=disable'
API_URL: http://localhost:8009
defaultAgent:
enabled: true
postgres:
enabled: true
storageClassName: gp2
@sandromello
sandromello / hoopgateway-values.yml
Created September 10, 2025 12:38
hoopgateway-values-host-mount.yml
config:
POSTGRES_DB_URI: 'postgres://root:default-pwd@hoopgateway-pg/postgres?sslmode=disable'
API_URL: http://localhost:8009
defaultAgent:
enabled: true
postgres:
enabled: true
@sandromello
sandromello / postgres-spec.yml
Last active August 14, 2025 17:56
Postgres Spec
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: postgres-pvc
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 10Gi
@sandromello
sandromello / hoop-gateway-install.sh
Last active July 30, 2025 19:38
hoop-gateway-install.sh
#!/bin/bash
PGPASSWORD=$(LC_ALL=C tr -dc A-Za-z0-9_ < /dev/urandom | head -c 43 | xargs)
set -eo pipefail
function echo_normal() {
echo $'\e[1G----->' "$*"
}
@sandromello
sandromello / test-mongo-script.md
Last active July 2, 2025 12:40
Test Mongo Script

Add test Mongo Scripts into the agent

Open a bash session to the agent and add the following scripts to the /tmp folder

hoop connect bash

cat - > /tmp/mongo1 <<'EOF'
#!/bin/bash
@sandromello
sandromello / wezterm.lua
Created April 2, 2025 17:05
Wezterm Config
local wezterm = require 'wezterm'
local projects = require 'projects'
local act = wezterm.action
local config = {}
config.window_frame = {
-- Berkeley Mono for me again, though an idea could be to try a
-- serif font here instead of monospace for a nicer look?
font = wezterm.font({ family = 'Jetbrains Mono', weight = 'Bold' }),
font_size = 11,
@sandromello
sandromello / projects.lua
Created September 4, 2024 12:49
wezterm config
-- $HOME/.config/wezterm/projects.lua
local wezterm = require 'wezterm'
local module = {}
local function project_dirs()
return {
'~/work/personal/joi2',
'~/work/hoopdev/hoop',
'~/work/hoopdev/documentation',
-- ... keep going, list all your projects
@sandromello
sandromello / lb-controller.tf
Created July 31, 2024 17:47
lb-controller.tf
provider "aws" {
region = local.region
}
data "terraform_remote_state" "eks" {
backend = "s3"
config = {
bucket = "tfstate"
key = "infra/eks"