Skip to content

Instantly share code, notes, and snippets.

View hodrigohamalho's full-sized avatar
💭
let's code!

Rodrigo Ramalho hodrigohamalho

💭
let's code!
View GitHub Profile
@hodrigohamalho
hodrigohamalho / kafka-podman.sh
Created October 14, 2025 05:27
kafka-podman
#!/usr/bin/env bash
# Requisitos de config:
# conf/zk/zoo.cfg
# conf/kafka/server-1.properties, server-2.properties, server-3.properties
set -euo pipefail
# ======= Estilo =======
if [[ -t 1 ]]; then
BOLD="\033[1m"; DIM="\033[2m"; RESET="\033[0m"
@hodrigohamalho
hodrigohamalho / leader-rebalance.sh
Created August 6, 2025 13:18
leader-rebalance.sh
#!/bin/bash
set -e
# 🎨 Cores e emojis
RED='\033[0;31m'
GREEN='\033[0;32m'
YELLOW='\033[1;33m'
CYAN='\033[0;36m'
NC='\033[0m' # No Color
@hodrigohamalho
hodrigohamalho / now-ui-error.log
Created November 15, 2023 22:42
now-ui-error.log
~/Desktop/now-ui-dashboard-pro-angular-v1.4.0 ❯
❯ nvm use 20.9.0
Now using node v20.9.0 (npm v10.1.0)
❯ npm install
npm ERR! code ERESOLVE
npm ERR! ERESOLVE could not resolve
npm ERR!
npm ERR! While resolving: @swimlane/[email protected]
npm ERR! Found: [email protected]
npm ERR! node_modules/rxjs
@hodrigohamalho
hodrigohamalho / amq-streams-no-auth.yml
Created September 25, 2023 17:48
amq-streams-no-auth.yml
- name: "Ansible Playbook to install a Kafka cluster (+Zookeeper)"
hosts: all
vars:
ansible_user: ec2-user
ansible_become: true
ansible_ssh_private_key_file: /home/ec2-user/ramalho.cer
become_method: sudo
amq_streams_common_download_node: ""
amq_streams_common_download_dir: "/tmp"
amq_streams_zookeeper_auth_enabled: false
@hodrigohamalho
hodrigohamalho / amq_streams_zookeeper.properties
Created September 21, 2023 23:51
amq_streams_zookeeper.properties
[ec2-user@ip-10-0-6-42 ~]$ cat /etc/amq_streams_zookeeper.properties
# Ansible managed
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
#
@hodrigohamalho
hodrigohamalho / amq-streams-install-failure.log
Created September 21, 2023 23:48
amq-streams-install-failure.log
[ec2-user@ip-10-0-2-41 amq_streams]$ ansible-playbook -i hosts.yml playbooks/amq-streams-no-auth.yml
PLAY [Ansible Playbook to install a Kafka cluster (+Zookeeper)] ****************************************************************************************************************
TASK [Gathering Facts] *********************************************************************************************************************************************************
ok: [ip-10-0-6-42.us-east-2.compute.internal]
ok: [ip-10-0-6-209.us-east-2.compute.internal]
ok: [ip-10-0-8-190.us-east-2.compute.internal]
ok: [ip-10-0-15-152.us-east-2.compute.internal]
ok: [ip-10-0-13-140.us-east-2.compute.internal]
@hodrigohamalho
hodrigohamalho / error.log
Created August 2, 2023 16:42
Salesforce camel error
2023-08-02 13:41:52,478 ERROR [org.apa.cam.imp.eng.AbstractCamelContext] (Quarkus Main Thread) Error starting CamelContext (camel-1) due to exception thrown: Failed to start component salesforce because of org.apache.camel.component.salesforce.api.SalesforceException: {errors:[{"errorCode":"unsupported_grant_type","message":"Login error code:[unsupported_grant_type] description:[grant type not supported]","fields":null}],statusCode:400}: org.apache.camel.FailedToStartComponentException: Failed to start component salesforce because of org.apache.camel.component.salesforce.api.SalesforceException: {errors:[{"errorCode":"unsupported_grant_type","message":"Login error code:[unsupported_grant_type] description:[grant type not supported]","fields":null}],statusCode:400}
at org.apache.camel.impl.engine.AbstractCamelContext.doStartCamel(AbstractCamelContext.java:3272)
at org.apache.camel.impl.engine.AbstractCamelContext.doStartContext(AbstractCamelContext.java:3033)
at org.apache.camel.impl.engine.AbstractCamelCon
@hodrigohamalho
hodrigohamalho / debezium-oracle-error
Last active March 15, 2023 20:05
debezium-oracle-error.log
Preparing truststore
Preparing truststore is complete
Starting Kafka Connect with configuration:
# Bootstrap servers
bootstrap.servers=debezium-cluster-kafka-bootstrap:9092
# REST Listeners
rest.port=8083
rest.advertised.host.name=10.128.2.42
rest.advertised.port=8083
# Plugins
@hodrigohamalho
hodrigohamalho / camel-raw-oauth.java
Created December 1, 2022 17:16 — forked from rafaeltuelho/camel-raw-oauth.java
camel snippet using oauth to get an auth token and use it to request a secured rest service
from("timer://scheduler?period=30s")
.log("get access token")
.to("direct:authService");
from("direct:authService").tracing()
.setHeader(Exchange.HTTP_PATH)
.simple("<auth service context>/oauth2/token")
.setHeader("CamelHttpMethod")
.simple("POST")
.setHeader("Content-Type")
Sub PasswordBreaker()
'Breaks worksheet password protection.
Dim i As Integer, j As Integer, k As Integer
Dim l As Integer, m As Integer, n As Integer
Dim i1 As Integer, i2 As Integer, i3 As Integer
Dim i4 As Integer, i5 As Integer, i6 As Integer
On Error Resume Next
For i = 65 To 66: For j = 65 To 66: For k = 65 To 66
For l = 65 To 66: For m = 65 To 66: For i1 = 65 To 66
For i2 = 65 To 66: For i3 = 65 To 66: For i4 = 65 To 66