Skip to content

Instantly share code, notes, and snippets.

View sandromello's full-sized avatar

Sandro Mello sandromello

View GitHub Profile
@sandromello
sandromello / manifest.yaml
Created December 6, 2023 18:26
Hoop Self Hosted Yaml
---
# Source: hoop-chart/templates/secret-configs.yaml
apiVersion: v1
kind: Secret
metadata:
name: hoop-config
type: Opaque
stringData:
XTDB_ADDRESS: "http://127.0.0.1:3001"
POSTGRES_DB_URI: "postgresql://<user>:<pwd>@<host>:5432/<db>"
@sandromello
sandromello / hoop-gateway-helm.yaml
Last active September 18, 2023 19:13
Hoop Gateway Helm Template
# Source: hoop-chart/templates/secret-configs.yaml
apiVersion: v1
kind: Secret
metadata:
name: hoop-config
type: Opaque
stringData:
XTDB_ADDRESS: "http://127.0.0.1:3001"
POSTGRES_DB_URI: "postgresql://[PG_USER]:[PG_PASSWORD]@[PG_HOST]:[PG_PORT]/[PG_DB]"
API_URL: "[HOOP_GATEWAY_DNS_NAME]"
@sandromello
sandromello / hoopagent-secretsmanager.md
Last active July 18, 2023 14:09
hoopagent-secretsmanager.md

On a Linux VM

  1. Install the cli
curl -s -L https://releases.hoop.dev/release/install-cli.sh | sh
  1. Create the systemd unit
@sandromello
sandromello / hoop-as-a-lib.md
Last active June 9, 2023 20:22
Example how to load C lib from GO

Build the C Lib

go build -o agent.so -buildmode=c-shared main.go

Python

No dependencies required

@sandromello
sandromello / main.py
Created September 2, 2022 15:13
Runops Webhooks Receiver
from flask import Flask, request
from svix.webhooks import Webhook, WebhookVerificationError
app = Flask(__name__)
# obtained in the svix web panel
# https://docs.runops.io/docs/webhooks/#receiving-webhooks
signing_secret = ''
@app.route("/runops", methods=['POST'])
@sandromello
sandromello / test.sh
Created January 19, 2022 15:22
test.sh
echo $1 $2
@sandromello
sandromello / contract-cancel.md
Created February 3, 2021 21:16
contract-cancel.md
@sandromello
sandromello / averbacao-tag.sh
Last active December 14, 2020 14:24
averbacao-tag
ACCESSTOKEN=
curl 'https://integration.nonprod.taginfraestrutura.com.br/receivable/consent/optin' \
--header "Authorization: Bearer ${ACCESSTOKEN}" \
--header 'Content-Type: application/json' \
--data-raw '{
"optIns": [
{
"beneficiary":"72963718000194",
"assetHolder": "16036234000129",
"acquirer": "31688539000109",
@sandromello
sandromello / smtp-send.go
Created November 4, 2020 16:38
Smtp Send Example
package main
import (
"bytes"
"crypto/tls"
"errors"
"fmt"
"net"
"net/smtp"
"text/template"

Token Input

input:
  token:
    sub: foo
    group: tenant-admin
    tenant: tn-3293298
  method: GET
 path: /v1/saga/