Skip to content

Instantly share code, notes, and snippets.

View eshleebien's full-sized avatar

Esh Romero eshleebien

View GitHub Profile
require Logger
limit = 100
Stream.unfold(limit, fn
nil ->
nil
n ->
Logger.info("n: #{n}")
skip = n - limit
Logger.info("skip: #{skip}")

Become a Certificate Authority

Create config

>crt.cfg cat <<-EOF
RANDFILE = NV::HOME/.rnd
[ req ]
default_bits = 2048
default_keyfile = ca.key
@eshleebien
eshleebien / home-fingerprints.sh
Created February 26, 2020 02:59
To check fingerprints of all users
#!/bin/bash
function fingerprints() {
local file="${1:-$HOME/.ssh/authorized_keys}"
echo $file
while read l; do
[[ -n $l && ${l###} = $l ]] && ssh-keygen -l -f /dev/stdin <<<$l
done < "${file}"
}

Keybase proof

I hereby claim:

  • I am eshleebien on github.
  • I am eshromero (https://keybase.io/eshromero) on keybase.
  • I have a public key ASCgeW6ZUzT5N-C9toQy02xUfygHaNKgCFnXUjizVgoKoQo

To claim this, I am signing this object:

@eshleebien
eshleebien / medium-inotify-minikube-deployment.yaml
Created December 31, 2019 07:46
For Inotify Minikube medium article
apiVersion: apps/v1
kind: Deployment
metadata:
name: notify-forwarder
spec:
replicas: 1
selector:
matchLabels:
app: notify-forwarder
template:
@eshleebien
eshleebien / medium-inotify-minikube-service.yaml
Last active January 6, 2020 03:52
For Inotify Minikube medium article
apiVersion: v1
kind: Service
metadata:
namespace: default
name: notify-forwarder
spec:
selector:
app: notify-forwarder
ports:
- protocol: UDP
@eshleebien
eshleebien / medium-kong-gw-for-k8s-jwt-auth0-integration.yaml
Created December 31, 2019 05:02
For Kong Gateway in Kubernetes medium article
apiVersion: configuration.konghq.com/v1
kind: KongPlugin
metadata:
name: http-jwt
labels:
global: "true"
plugin: jwt
---
@eshleebien
eshleebien / medium-kong-gw-for-k8s-serverless-plugin.yaml
Last active December 31, 2019 04:58
For Kong Gateway in Kubernetes medium article
apiVersion: configuration.konghq.com/v1
kind: KongPlugin
metadata:
name: read-jwt-token
labels:
global: "true"
disabled: false
config:
functions:
- return function()
@eshleebien
eshleebien / medium-kong-gw-for-k8s-full-kong-ingress-conf.yaml
Created December 31, 2019 01:33
For Kong Gateway in Kubernetes medium article
apiVersion: configuration.konghq.com/v1
kind: KongIngress
metadata:
name: configuration-demo
upstream:
hash_on: none
hash_fallback: none
healthchecks:
active:
concurrency: 10
@eshleebien
eshleebien / medium-kong-gw-for-k8s-kong-ingress-strip-path.yaml
Created December 8, 2019 13:57
For Kong Gateway in Kubernetes medium article
apiVersion: configuration.konghq.com/v1
kind: KongIngress
metadata:
name: strip-path
route:
strip_path: true
protocols:
- http
- https