Skip to content

Instantly share code, notes, and snippets.

View djalmaaraujo's full-sized avatar
🌊
Working from home

Djalma Araújo djalmaaraujo

🌊
Working from home
View GitHub Profile
@exonomyapp
exonomyapp / Coolify Orchestrated PostgreSQL Cluster.md
Last active May 5, 2025 12:06
Coolify Orchestrated PostgreSQL Cluster

Coolify Orchestrated DB Cluster

In this project, our goal is to establish a robust and scalable infrastructure for a PostgreSQL database with high availability, seamless security, and integrated monitoring and alerting systems.

Introduction

We'll leverage tools like Patroni, Consul, Vault, Prometheus, Grafana, and Cert-Manager to ensure a comprehensive, modern solution. Coolify will act as our orchestration platform, managing various services and simplifying deployments. We aim to not only build a highly available database cluster but also provide a learning experience for interns that demonstrates best practices in DevOps, security, and observability.

The backbone of our infrastructure will focus on a distributed, high-availability PostgreSQL cluster. To ensure reliability, we’ll introduce Patroni for automating failover, Consul for service coordination, and Vault for managing sensitive information. Monitoring will be handled by Prometheus and visualized u

@djalmaaraujo
djalmaaraujo / API.md
Last active February 28, 2024 22:30

CBTRG API

API com foco na integração dos sistemas do Conselho Brasileiro de Terapia de Reprocessamento Generativo com outros sistemas externos.

O endereço de origem é https://api.cbtrg.com.br/ para todos endpoints abaixo.

  • GET /api/v1/membership/:register_number

    Retorna dados públicos sobre uma filiação. Dados básicos: Número de Registro e Validade da Filiação. Não serão retornados outros dados para proteção dos dados do filiado.

@dereknguyen269
dereknguyen269 / setup_railson_mac_m1.md
Last active May 25, 2023 14:31
Setup project rails 4.2.x and ruby 2.5.x on Mac M1

I've some problem when setup project with:

  • Rails 4.2.10
  • Ruby 2.5.3
  • Postgresql 13

My steps:

Install Homebrew

@kelvinst
kelvinst / create-ruby-gem.md
Last active March 18, 2025 12:17
Como criar uma gem ruby?

Como criar uma gem ruby?

Escolhi tratar sobre esse assunto hoje simplesmente porque foi uma das primeiras coisas que me perguntei "como eu faço isso?" no mundo ruby. Acredito que muita gente se pergunte a mesma coisa e espero que eu possa ajudar em algo para elas. 😀

O que é uma gem?

Bem, se você é um programador java, você chama sua gem de jar, se você é um programador C#, você chama de dll. Resumindo, é uma lib, uma biblioteca contendo códigos que você pode reaproveitar importando em outros projetos.

E usar gems no ruby é muito fácil, se você já deu uma brincada com rails por exemplo, é só você adicionar o código gem 'nome_da_gem' no arquivo Gemfile que está no root, depois executar o comando bundle install para baixar sua gem do repositório e pronto, só sair usando a biblioteca!

# Retorna dados sobre o pregão
http://www.bmfbovespa.com.br/Pregao-Online/ExecutaAcaoCarregarDados.asp?CodDado=IBOV,ticker&CA=undefined
# Retorna ações e seus últimos valores negociados
http://www.bmfbovespa.com.br/Pregao-OnLine/ExecutaAcaoCarregarDados.asp?CodDado=Ticker
# Retorna o histórico do dia de um papel
http://www.bmfbovespa.com.br/Pregao-Online/ExecutaAcaoCarregarDadosPapeis.asp?CodDado=petr4
# Retorna dados de um papel
@xcommerce-gists
xcommerce-gists / getAccessToken-request-cURL
Last active August 2, 2019 09:19
PayPalAccessOpenIDConnectOAuth.cURL
curl https://api.paypal.com/v1/identity/openidconnect/tokenservice \
-u "<your_app_id>:<your_app_secret>" \
-d "client_id=&grant_type=authorization_code&code=<code>&redirect_uri=<urlencoded_return_url>"
@samdeane
samdeane / fixgit.sh
Created August 19, 2012 13:26
Script to move a git repo containing absolute gitdir and worktree submodule paths
#!/usr/bin/env bash
# Fix up a git repo containing submodules that have absolute paths which have changed.
#
# Note that this doesn't do the *proper* fix, which is to turn the absolute paths into
# relative paths. This is possible, but would require a lot more logic because the relative
# paths would be different in each case.
#
# What it does instead is a pragmatic workaround, which is to search & replace the old
# path with a new (and presumably correct) one. This will get you up and running again.
@gabrielstuff
gabrielstuff / each_with_index.js
Created March 3, 2012 16:00 — forked from burin/each_with_index.coffee
each_with_index handlebars helper, adds an {{index}} prop accessible from within the block
// {{#each_with_index records}}
// <li class="legend_item{{index}}"><span></span>{{Name}}</li>
// {{/each_with_index}}
Handlebars.registerHelper("each_with_index", function(array, fn) {
var total = array.length;
var buffer = "";
for (var i = 0, j = array.length; i < j; i++) {
var item = array[i];
@mateusg
mateusg / devise.pt-BR.yml
Last active June 6, 2025 20:27 — forked from alexandreaquiles/devise.pt-BR.yml
pt-BR translations for Devise
# encoding: UTF-8
# pt-BR translations for Devise
pt-BR:
devise:
confirmations:
confirmed: "Sua conta foi confirmada com sucesso. Você está logado."
send_instructions: "Dentro de minutos, você receberá um e-mail com instruções para a confirmação da sua conta."
send_paranoid_instructions: "Se o seu endereço de e-mail estiver cadastrado, você receberá uma mensagem com instruções para confirmação da sua conta."
failure:
already_authenticated: "Você já está logado."