Skip to content

Instantly share code, notes, and snippets.

View metral's full-sized avatar
☁️

Mike Metral metral

☁️
View GitHub Profile
@metral
metral / gh-dl-release
Last active June 5, 2024 21:09 — forked from maxim/gh-dl-release
Download assets from private Github releases
#!/usr/bin/env bash
#
# gh-dl-release! It works!
#
# This script downloads an asset from latest or specific Github release of a
# private repo. Feel free to extract more of the variables into command line
# parameters.
#
# PREREQUISITES
#

Ingress configuration options per platform.

Platform Host Port Node Port Cluster IP Provider
Bare-Metal Y Y Y NA
Google Cloud Y N N GLBC
AWS Y Y N NA

Ingress configuration pros/cons.

# MIT License
#
# Copyright (c) 2016 Samuel Rounce
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
@metral
metral / StrongSwan_build_notes.txt
Created August 15, 2018 23:01 — forked from SamuelDudley/StrongSwan_build_notes.txt
StrongSwan vici python usage snippet
# install notes for ubuntu 14.04 / odroid xu4
sudo apt-get install libgmp3-dev
# dont apt-get StrongSwan! (its really old)
wget https://download.strongswan.org/strongswan-5.5.1.tar.bz2
tar xvfj strongswan-5.5.1.tar.bz2
cd strongswan-5.5.1
sudo ./configure --prefix=/usr --sysconfdir=/etc --enable-python-eggs --enable-python-eggs-install --enable-vici
sudo make
sudo make install
@metral
metral / after.ts
Created February 27, 2020 03:29 — forked from lblackstone/after.ts
// Define the application configuration and secrets.
const configs = new kx.ConfigMap("app-config", {
data: { "config": "very important data" }
});
const secrets = new kx.Secret("app-secrets", {
stringData: {
"app-password": new kx.RandomPassword("app-password"),
"database-password": config.databasePassword
}
@metral
metral / after.ts
Created February 27, 2020 03:29 — forked from lblackstone/after.ts
// Define the application configuration and secrets.
const configs = new kx.ConfigMap("app-config", {
data: { "config": "very important data" }
});
const secrets = new kx.Secret("app-secrets", {
stringData: {
"app-password": new kx.RandomPassword("app-password"),
"database-password": config.databasePassword
}
@metral
metral / pulumiWaitFor.ts
Created June 18, 2020 17:42 — forked from timmyers/pulumiWaitFor.ts
Wait for a resource in pulumi
// Make sure x is a true output so pulumi doesn't try to run this function during preview.
const ingressIP = pulumi.all([x]).apply(async ([x]) => {
const kc = new k8sClient.KubeConfig();
const provider = (this.getProvider('kubernetes::') as any)
const kubeConfig = provider.kubeconfig as pulumi.Output<string>;
const ip = kubeConfig.apply(async (config) => {
kc.loadFromString(config);
const k8sApi = kc.makeApiClient(k8sClient.CoreV1Api);
@metral
metral / Pulumi.yaml
Created July 2, 2020 17:51 — forked from JakeGinnivan/Pulumi.yaml
Pulumi /w TypeScript project references + dynamodb lock
name: serverless-mono
description: Serverless mono infrastructure
backend:
url: s3://my-pulumi-state-bucket
runtime:
name: nodejs
options:
typescript: false
lock:
region: ap-southeast-2
@metral
metral / Dockerfile
Created September 29, 2021 04:19 — forked from avishayp/Dockerfile
Add non-root user for alpine linux
# non root user example for alpine
#
# usage:
# $ docker build --build-arg "USER=someuser" --tag test .
# $ docker run --rm test
FROM alpine
ARG USER=default
ENV HOME /home/$USER