Skip to content

Instantly share code, notes, and snippets.

View sibelius's full-sized avatar
🦈
give me a feedback https://entria.feedback.house/sibelius

Sibelius Seraphini sibelius

🦈
give me a feedback https://entria.feedback.house/sibelius
View GitHub Profile
@sibelius
sibelius / RelayStorybook.tsx
Created July 15, 2025 17:15
RelayStorybook
import type { ReactNode } from 'react';
import React, { useEffect, useState } from 'react';
import { RelayEnvironmentProvider } from 'react-relay';
import type { IEnvironment } from 'relay-runtime';
import { createMockEnvironment, MockPayloadGenerator } from 'relay-test-utils';
type RelayStorybookProps = {
children: ReactNode;
mockResolvers: Record<string, unknown>;
suspense: boolean;
@sibelius
sibelius / errors.tx
Created July 11, 2025 12:01
errors ao realizar pagamento
export const errors = {
ABORTED_SETTLEMENT_TIMEOUT: 'AB03',
ERROR_CREDITOR_AGENT: 'AB09',
TIMEOUT_DEBTOR_AGENT: 'AB11',
INVALID_CREDITOR_ACCOUNT_NUMBER: 'AC03',
BLOCKED_ACCOUNT: 'AC06',
CLOSED_CREDITOR_ACCOUNT_NUMBER: 'AC07',
INVALID_CREDITOR_ACCOUNT_TYPE: 'AC14',
TRANSACTION_NOT_SUPPORTED: 'AG03',
NOT_ALLOWED_BOOK_TRANSFER: 'AG12',
@sibelius
sibelius / ispbs.json
Last active July 7, 2025 18:27
list of all ispbs
[
{
"name": "BCO DO BRASIL S.A.",
"isbp": "00000000",
"compe": "001"
},
{
"name": "BRB - BCO DE BRASILIA S.A.",
"isbp": "00000208",
"compe": "070"
@sibelius
sibelius / roadmap-crud-fullstack.md
Created May 26, 2025 01:03
roadmap crud fullstack

Backend

  • create a node boilerplate
  • create a data model (sql table or nosql collection)
  • create endpoints using koa (POST, PATCH, GET, DELETE)
  • expose data model in these endpoints
  • dockerfile to create a docker image
  • deploy in a vps using docker compose, or using k8s deployment + service
  • add integration tests using supertest
  • create a basic login/auth using email + pwd bcrypt
@sibelius
sibelius / fintech-problems-roadmap.md
Last active May 24, 2025 18:25
roadmap of problems to solve in a Fintech

Here is a short list of problems to solve in "any" Fintech

  • KYC
  • Ledger
  • Scaling
  • Reliability
  • Latency
  • Security
  • Data Consistency
  • Integration with many external systems
@sibelius
sibelius / file-loader.js
Created March 9, 2025 14:50
tsx with node
import { transform } from '@swc/core';
import fs from 'fs/promises';
import path from 'path';
import { fileURLToPath } from 'url';
const cwd = process.cwd();
export async function load(url, context, defaultLoad) {
if (url.endsWith('.tsx')) {
const filePath = fileURLToPath(url);
@sibelius
sibelius / download-cert-chain.ts
Created February 26, 2025 12:13
download cert chain
import fs from "fs";
import path from "path";
import forge from "node-forge";
const cwd = process.cwd();
function computeFingerprint(cert: forge.pki.Certificate): string {
const asn1Cert = forge.pki.certificateToAsn1(cert);
const der = forge.asn1.toDer(asn1Cert).getBytes();
const md = forge.md.sha1.create();
@sibelius
sibelius / mongodb-cronjob.yaml
Created January 31, 2025 15:07
Mongodb cronjob backup
apiVersion: batch/v1
kind: CronJob
metadata:
name: mongodb-backup-woovi-dev
namespace: mongodb-backup-dev
spec:
schedule: "0 1 * * *"
concurrencyPolicy: Forbid
jobTemplate:
spec:
@sibelius
sibelius / mongodb1-deployment.yaml
Created January 31, 2025 15:02
basic mongodb k8s deployment
apiVersion: apps/v1
kind: Deployment
metadata:
labels:
name: mongodb1
name: mongodb1
namespace: woovi-mongo-dev
spec:
replicas: 1
strategy:
@sibelius
sibelius / mongodb-rs.sh
Created November 13, 2024 18:09
mongodb-rs.sh
args="$@"
docker-compose up -d $args
sleep 5
updateEtcHost() {
local content=$1
if grep -q "$content" /etc/hosts; then