Skip to content

Instantly share code, notes, and snippets.

apiVersion: networking.istio.io/v1alpha3
kind: EnvoyFilter
metadata:
name: inf-auth-gateway-filter-grpc
spec:
workloadLabels:
app: istio-ingressgateway
filters:
- listenerMatch:
portNumber: 443
@xring
xring / count.sh
Created October 27, 2023 14:05
count user code lines in git repo
git log --since="2022-01-01" --until="2022-12-31" --numstat --pretty="%an" |
awk '
{
if (NF == 1) author = $0
else if (NF > 1) {
added[author] += $1;
removed[author] += $2;
}
}
END {

Install Zsh and Oh-my-zsh on CentOS 7

Based on this article

ALL INSTALLATIONS ASSUME YES WHEN PROMPTED, that's what -y does

This script can be copy paste to ssh as is. No hands installation. :-)

yum install zsh -y
@xring
xring / Cargo.toml
Last active December 16, 2024 03:54
Gemini English Teacher, powered by GenerativeService and BidiGenerateContent. Rust version of https://github.com/nishuzumi/gemini-teacher
[package]
name = "gemini-teacher"
version = "0.1.0"
edition = "2021"
default-run = "gemini-teacher"
[dependencies]
tokio = { version = "1.32", features = ["full"] }
tokio-tungstenite = { version = "0.17",features = ["rustls-tls-native-roots"] }
tungstenite = { version = "0.20", features = ["rustls-tls-native-roots"] }