Skip to content

Instantly share code, notes, and snippets.

View jurabek's full-sized avatar
🎯
Focusing

Jurabek jurabek

🎯
Focusing
View GitHub Profile
@hermanbanken
hermanbanken / kustomize_vars.md
Created November 22, 2020 13:11
Kustomize Vars example

This was initially posted in an kubernetes-sigs/kustomize issue.

We are using Kustomize's vars feature. Initially we didn't understand how to use it for our purpose, but it is a 100% fit. One example is our Ingress resource, which looks like this:

# file: base/ingress.yaml
apiVersion: networking.k8s.io/v1beta1
kind: Ingress
metadata:
  name: services
@inaiat
inaiat / envoy-filter.yaml
Created April 25, 2020 16:50
Setting request headers with values from a JWT
apiVersion: "security.istio.io/v1beta1"
kind: RequestAuthentication
metadata:
name: echoserver
namespace: default
spec:
selector:
matchLabels:
app: echoserver
jwtRules:
apiVersion: networking.istio.io/v1alpha3
kind: EnvoyFilter
metadata:
name: authn-filter
namespace: ns1
spec:
workloadLabels:
#include namespace in the label to avoid clashes across namespaces
authn-ns1: enabled
filters:
#!/bin/sh
# ipv6-off.sh
# Disable IPv6 on all interfaces.
IFS=$'\n'
net=`networksetup -listallnetworkservices | grep -v asterisk`
for i in $net
do
networksetup -setv6off "$i"
@kleysonr
kleysonr / KafkaConsumerSample.java
Created January 15, 2018 21:29
Java Kafka Producer/Consumer Sample
package sample1;
import java.io.UnsupportedEncodingException;
import java.util.Arrays;
import java.util.Base64;
import java.util.Properties;
import org.apache.kafka.clients.consumer.ConsumerRecord;
import org.apache.kafka.clients.consumer.ConsumerRecords;
import org.apache.kafka.clients.consumer.KafkaConsumer;
@StevenACoffman
StevenACoffman / _MicroService Proxy Gateway Solutions.md
Last active July 15, 2024 05:12
Microservice Proxy/Gateway Solutions

MicroService Proxy Gateway Solutions

Kong, Traefik, Caddy, Linkerd, Fabio, Vulcand, and Netflix Zuul seem to be the most common in microservice proxy/gateway solutions. Kubernetes Ingress is often a simple Ngnix, which is difficult to separate the popularity from other things.

Github Star Trend:

Github Star History for Kong vs traefik vs fabio vs caddy vs Zuul

This is just a picture of this link from March 2, 2019

Originally, I had included some other solution

@jchandra74
jchandra74 / PowerShell Customization.md
Last active June 3, 2024 21:32
PowerShell, Cmder / ConEmu, Posh-Git, Oh-My-Posh, Powerline Customization

Pimping Up Your PowerShell & Cmder with Posh-Git, Oh-My-Posh, & Powerline Fonts

Backstory (TLDR)

I work as a full-stack developer at work. We are a Windows & Azure shop, so we are using Windows as our development platform, hence this customization.

For my console needs, I am using Cmder which is based on ConEmu with PowerShell as my shell of choice.

Yes, yes, I know nowadays you can use the Linux subsystem on Windows 10 which allow you to run Ubuntu on Windows. If you are looking for customization of the Ubuntu bash shell, check out this article by Scott Hanselman.

@rodkranz
rodkranz / ReadBigFileAndParse.go
Created January 16, 2017 01:24
Read big file and unmarshal in json
// Package main
// Copyright 2017 Kranz. All rights reserved.
// Use of this source code is governed by a MIT-style
// license that can be found in the LICENSE file.
/**
Test read file by chunks
➜ read ll
total 13241936
drwxr-xr-x 5 rlopes staff 170B 16 Jan 01:19 ./

FWIW: I (@rondy) am not the creator of the content shared here, which is an excerpt from Edmond Lau's book. I simply copied and pasted it from another location and saved it as a personal note, before it gained popularity on news.ycombinator.com. Unfortunately, I cannot recall the exact origin of the original source, nor was I able to find the author's name, so I am can't provide the appropriate credits.


Effective Engineer - Notes

What's an Effective Engineer?

<?xml version="1.0" encoding="utf-8"?>
<CodeSnippets xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet">
<CodeSnippet Format="1.0.0">
<Header>
<Title>Async Unit Test</Title>
<Author>Rusty Divine</Author>
<Description>Async Unit Test Template with 3 Parts</Description>
<HelpUrl>https://msdn.microsoft.com/en-us/library/ms165394.aspx</HelpUrl>
<SnippetTypes />
<Keywords />