Skip to content

Instantly share code, notes, and snippets.

asenchi /
Created August 29, 2023 00:55 — forked from strfry/
Deploys FreeBSD on a Hetzner cloud server

Deploys FreeBSD on a Hetzner cloud server


  • A Hetzner Cloud API Token (Pass in via APIKEY)
  • jq
  • sshpass


Replace server_id variable with your hetzner server Id
asenchi /
Created September 23, 2022 17:26 — forked from brentjanderson/
Elixir runtime-controlled supervision tree using feature flags (circuit breaker)

These snippets provide a foundation for starting and stopping supervision trees at runtime using feature flags (e.g. Launch Darkly).

Some things to note when adapting these snippets:

  1. application.ex needs to be adapted into an existing application. The important part is that each child spec provided is compliant, and that there is a feature flag (ld_key) specified.
  2. As written, if a feature flag fails for some reason, it defaults to starting all children. There is room for adaptation here as needed.
  3. This implementation will still require a FeatureFlags module to be available that implements is_on?/2. Adjust as needed to accomodate your own feature flag setup.

Make it real

Ideas are cheap. Make a prototype, sketch a CLI session, draw a wireframe. Discuss around concrete examples, not hand-waving abstractions. Don't say you did something, provide a URL that proves it.

Ship it

Nothing is real until it's being used by a real user. This doesn't mean you make a prototype in the morning and blog about it in the evening. It means you find one person you believe your product will help and try to get them to use it.

Do it with style

asenchi / k8s_client.ex
Created June 15, 2021 13:37 — forked from coryodaniel/k8s_client.ex
An extremely naive k8s http client
View k8s_client.ex
defmodule K8s.Client do
@moduledoc """
This is a very naive k8s client.
alias K8s.Conf.RequestOptions
require Logger
def post(body, conf) do
path = body_to_path(body, false)
url = Path.join(conf.url, path)
asenchi / Dockerfile
Created October 16, 2018 15:01 — forked from jpfuentes2/Dockerfile
View Dockerfile
FROM postgres:9.6-alpine
LABEL version="9.6"
LABEL author=""
RUN apk update && apk upgrade --available
RUN apk add build-base git postgresql-dev
asenchi /
Created June 28, 2018 19:35 — forked from innovia/
Create a service account and generate a kubeconfig file for it - this will also set the default namespace for the user
set -e
set -o pipefail
# Add user to k8s using service account, no RBAC (must create RBAC after this script)
if [[ -z "$1" ]] || [[ -z "$2" ]]; then
echo "usage: $0 <service_account_name> <namespace>"
exit 1
asenchi / nginx-elasticsearch-proxy.conf
Created June 25, 2018 18:25 — forked from abrudtkuhl/nginx-elasticsearch-proxy.conf
NGINX Reverse Proxy Authentication For Elasticsearch
View nginx-elasticsearch-proxy.conf
# Run me with:
# $ nginx -p /path/to/this/file/ -c nginx.conf
# All requests are then routed to authenticated user's index, so
# GET http://user:password@localhost/_search?q=*
# is rewritten to:
# file name terraform/modules/aws_vpc/
# first create the VPC.
# Prefix resources with so we can have many environments trivially
resource "aws_vpc" "mod" {
cidr_block = "${var.cidr}"
enable_dns_hostnames = "${var.enable_dns_hostnames}"
enable_dns_support = "${var.enable_dns_support}"
tags {
Name = "${var.env}_vpc"

Keybase proof

I hereby claim:

  • I am asenchi on github.
  • I am asenchi ( on keybase.
  • I have a public key ASA7x3jgDU46kd6ITI7xBCcKRBueQr8CB8IbwUDfKuJ3RQo

To claim this, I am signing this object: