Skip to content

Instantly share code, notes, and snippets.

@xenophonf
xenophonf / docker-compose.yml
Created September 4, 2025 00:36 — forked from jonas-merkle/docker-compose.yml
Docker Compose configuration for setting up a PostgreSQL container with a health check
# Docker Compose configuration for setting up a PostgreSQL container with a health check
#
# This configuration pulls the latest PostgreSQL image and sets up a health check
# to monitor if the PostgreSQL service is ready to accept connections. The health check
# uses the 'pg_isready' command to check database readiness.
#
# Environment variables are used to configure PostgreSQL credentials and database settings.
services:
postgres:
#!/bin/bash
if [ "$_" = "${BASH_SOURCE}" ]
then
printf 'source this script, do not execute.\n' >&2
exit 1
fi
eval $(minikube docker-env --shell bash)
if [ -n "${DOCKER_CERT_PATH}" ] && [ "${DOCKER_CERT_PATH:0:1}" != '/' ]
Name: postsrsd
Version: 1.4
Release: 3%{?dist}
Summary: A sender-envelope rewriter to comply with SPF forwarding for postfix
License: GPLv2+
URL: https://github.com/roehling/postsrsd
Source0: https://github.com/roehling/%{name}/archive/%{version}.tar.gz
BuildRequires: cmake
@xenophonf
xenophonf / weird-lambda-binaries-recipe.md
Created February 26, 2018 14:05 — forked from smithclay/weird-lambda-binaries-recipe.md
Recipe for Getting Strange Binaries Running in AWS Lambda

Recipe for running strange binaries in AWS Lambda

In general, the command ldd and the environment variable LD_LINKER_PATH is your best friend when running new, untested binaries in Lambda. My process (which I want to get around to automating one day, maybe using Packer), goes like this:

  1. Run an EC2 instance with the official AWS Lambda AMI.
  2. Get binary you want to run in AWS Lambda running on the instance (either by installing from a package manager or compiling). 
  3. Run ldd -v ./the-binary. Note all of the shared libraries it requires. You’ll need to remember these.
  4. Copy the binary to your local machine. Upload the binary with your AWS Lambda function code that runs the ldd command inside the handler function using the process execution library from your language of choice. In node, this works just fine: console.log(require('child_process').execSync('ldd -v ./the-binary'))
  5. Note any shared libraries that are missing in the function output. Copy those over from the EC2 instance to a direct