Skip to content

Instantly share code, notes, and snippets.

@mcastelino
mcastelino / acyclic_generic.go
Last active March 31, 2021 03:37
Golang Generics Acyclic Function Graph
package main
import (
"fmt"
)
// Data that flows through the processing pipeline
type Data[T any] struct {
Type string
Path string
@egernst
egernst / eck-fluentbit.md
Last active November 28, 2022 06:46
ECK, Fluent-bit

todo:

  • - update Kibana object to set an antiaffinity (lack aarch64 support)
  • - show example of using fluent-bit annotation to highlight what parser to use.

EFK using fluent-bit and the Elastic Operator

ECK provides a higher baseline for security out of the box, which makes most "quick-start" guides for utilizing as a sink for logging fail. This gist provides details on how to update fluent-bit quick-start guides to work with ECK, utilizing emptyDir for the ES PVC.

@mcastelino
mcastelino / slirp4netns.md
Last active September 10, 2024 21:58
slirp4netns: How does it work

Create a process with its own network and pid namespace

$ unshare --user --map-root-user --net --mount
[root@incensed-gawain ~]# echo $$
2646

Run the slirp process on the host

@egernst
egernst / demo-magic-kata-fc-qemu-k8s
Last active January 5, 2019 06:43
demo-magic: kata+crio+k8s with FC and QEMU
#!/usr/bin/env bash
########################
# include the magic
########################
. ./demo-magic.sh
########################
# Configure the options
@piscisaureus
piscisaureus / pr.md
Created August 13, 2012 16:12
Checkout github pull requests locally

Locate the section for your github remote in the .git/config file. It looks like this:

[remote "origin"]
	fetch = +refs/heads/*:refs/remotes/origin/*
	url = [email protected]:joyent/node.git

Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/* to this section. Obviously, change the github url to match your project's URL. It ends up looking like this: