Skip to content

Instantly share code, notes, and snippets.

#!/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