Skip to content

Instantly share code, notes, and snippets.

#!/usr/bin/env bash
#
# es_node_smoketest.sh — basic functionality test suite for an Elasticsearch
# node pod running on Kubernetes.
#
# Usage: ./es_node_smoketest.sh <namespace> <pod-name>
# Example: ./es_node_smoketest.sh elastic-system my-cluster-es-default-0
#
# Assumptions (per setup):
# - Reached via `kubectl exec` into the pod, curl to localhost:9200
@alex1712
alex1712 / Disaster Recovery - RabbitMQ Federation.md
Created April 28, 2026 06:14
Disaster Recovery - RabbitMQ Federation.md

Disaster Recovery

This chapter describes the recommended DR architecture for the RabbitMQ cluster across two data centers: two independent RabbitMQ clusters — one per DC — connected via Exchange Federation. The active cluster handles normal traffic; the standby cluster is idle and continuously synchronizes.

DR Architecture Overview

flowchart LR
    subgraph DC_A["🏢 DC-A (Primary, active)"]
 P1[Node]
@alex1712
alex1712 / useRtcPeerConnection.ts
Created November 28, 2022 12:43
Creating a RtcPeerconnection and handling the webRtc signalling in a react hook
import {
ICECandidate,
ICECandidateOrigin,
SdpAnswer,
SdpOffer,
} from "@tatami-web/domain";
import { RefObject, useCallback, useEffect, useRef, useState } from "react";
import { useNavigate } from "react-router-dom";
import {
cleanDeviceSelection,
@alex1712
alex1712 / AWSClientFactory.scala
Created June 27, 2017 09:55
AWS Signed client for elastic4s (5.4.x) using aws-request-signer (https://github.com/ticofab/aws-request-signer)
import java.time.{LocalDateTime, ZoneId}
import com.amazonaws.auth.{AWSCredentialsProvider, BasicAWSCredentials, InstanceProfileCredentialsProvider}
import com.amazonaws.internal.StaticCredentialsProvider
import com.amazonaws.util.IOUtils
import com.sksamuel.elastic4s.ElasticsearchClientUri
import com.sksamuel.elastic4s.http.{HttpClient, NoOpRequestConfigCallback}
import io.ticofab.AwsSigner
import org.apache.http.client.methods.HttpRequestWrapper
import org.apache.http.impl.nio.client.HttpAsyncClientBuilder