Skip to content

Instantly share code, notes, and snippets.

View stevenctl's full-sized avatar

Steven Landow stevenctl

View GitHub Profile
@stevenctl
stevenctl / readme.md
Last active July 2, 2024 15:45
Static PROXY Waypoint

PROXY Protocol Waypoint

This sample demonstrates a non-Istio waypoint defined using static Envoy config.

  1. Create a kind cluster
kind create cluster
@stevenctl
stevenctl / fix_mixamo_root.py
Created November 25, 2023 23:50
Fix Mixamo Root Bone
import bpy
bl_info = {
"name": "Mixamo Root Fixer",
"description": "Moves location xz from mixamo hips to root bone",
"author": "Steven Landow",
"version": (1, 0),
"blender": (3, 6, 0),
"category": "Animation",
@stevenctl
stevenctl / heightmap_world_uv.gdshader
Created July 26, 2023 07:34
Got a combo heightmap (deep PoM) and world UV situtation working
shader_type spatial;
render_mode unshaded;
uniform float uvScale = 1.0;
uniform float blendSharpness;
uniform sampler2D textureMap : source_color;
uniform sampler2D normalMap : hint_normal;
uniform float normalScale = 1.0;
package crdclient
func TestGenMergePatch(t *testing.T) {
existing := &clientnetworkingv1alpha3.WorkloadEntry{
ObjectMeta: metav1.ObjectMeta{
Name: "foo-we",
Namespace: "ns",
Labels: map[string]string{
"oldlabel": "oldvalue",
},
# $ limactl shell docker docker run -it -v $HOME:$HOME --rm alpine
# To run `docker` on the host (assumes docker-cli is installed):
# $ export DOCKER_HOST=$(limactl list docker --format 'unix://{{.Dir}}/sock/docker.sock')
# $ docker ...
# This example requires Lima v0.8.0 or later
images:
- location: "https://cloud-images.ubuntu.com/releases/22.04/release/ubuntu-22.04-server-cloudimg-arm64.img"
arch: "aarch64"
@stevenctl
stevenctl / index.html
Last active October 16, 2022 18:37
autumn palette
<html>
<div style="height: 100%; align-items: stretch; display: flex; flex-direction: column-reverse;">
<div onclick="copyColor(this)" class="hoverable my_black" style="flex: 1; "></div>
<div onclick="copyColor(this)" class="hoverable my_gray0" style="flex: 1; "></div>
<div onclick="copyColor(this)" class="hoverable my_gray1" style="flex: 1; "></div>
<div onclick="copyColor(this)" class="hoverable my_gray2" style="flex: 1; "></div>
<div onclick="copyColor(this)" class="hoverable my_gray3" style="flex: 1; "></div>
<div onclick="copyColor(this)" class="hoverable my_gray4" style="flex: 1; "></div>
<div onclick="copyColor(this)" class="hoverable my_gray5" style="flex: 1; "></div>
@stevenctl
stevenctl / README.md
Last active October 10, 2022 06:14
Socket Encoding

Allows encoding a small image with a limited number of colors into an integer.

The bit-width of a pixel in the image is ceil(log2(n_colors)).

The bit-width of a socket image int is pixel-bit-width * size^2)

This python implementation doesn't concern itself with what the bit-width of the entire integer is. Real implementations care. This is determined by the image size. I'm assuming all images are square. When I say the size is "4" I really mean "4x4"). An image with size 4 with 4 possible colors would have 16 pixels and each pixel requires 2 bytes. This means we need a 32 bit int to hold our image,

@stevenctl
stevenctl / kind-cluster.yaml
Created September 1, 2022 19:20
istio kind setup
kind: Cluster
apiVersion: kind.x-k8s.io/v1alpha4
name: istio-localdev
containerdConfigPatches:
- |-
[plugins."io.containerd.grpc.v1.cri".registry.mirrors."localhost:5000"]
endpoint = ["http://kind-registry:5000"]
nodes:
- role: control-plane
- role: worker
@stevenctl
stevenctl / match.go
Created May 12, 2022 17:48
Unified Matcher REpair
package match
import (
xds "github.com/cncf/xds/go/xds/core/v3"
matcher "github.com/cncf/xds/go/xds/type/matcher/v3"
network "github.com/envoyproxy/go-control-plane/envoy/extensions/matching/common_inputs/network/v3"
"github.com/golang/protobuf/ptypes/wrappers"
"istio.io/istio/pilot/pkg/networking/util"
"istio.io/pkg/log"
)
@stevenctl
stevenctl / doc.md
Created June 28, 2021 17:45
cluster drain draft

Removing a cluster from the mesh

While running a multi-cluster Istio service mesh can help to increase capacity and reliablitlity, it introduces new operational concerns. Removing a cluster from the mesh, either temporarily or permanently, requires special considerations.

Simple case

The easiest way to disconnect workloads from one cluster in your mesh from another is to delete the remote secret that allows the control plane to access the remote cluster's API server.