Skip to content

Instantly share code, notes, and snippets.

View yitsushi's full-sized avatar
🏳️‍⚧️

Victoria (Balazs) Nadasdi yitsushi

🏳️‍⚧️
View GitHub Profile

Keybase proof

I hereby claim:

  • I am yitsushi on github.
  • I am efertone (https://keybase.io/efertone) on keybase.
  • I have a public key ASCc33hw1ThiiBsgsTOPR4XXtb_9JAlljeh4TgUCNiX4_wo

To claim this, I am signing this object:

openpgp4fpr:3333347e7464e7d91b5512b2312d70f64b9e1fba

@yitsushi
yitsushi / git_repository.yaml
Created July 4, 2023 08:17
It uses the specified GVK, but then ignores it
---
apiVersion: source.toolkit.fluxcd.io/v1beta2
kind: GitRepository
metadata:
name: hello-world
namespace: hello-world
spec:
interval: 10m0s
ref:
branch: main
@yitsushi
yitsushi / install.sh
Created January 31, 2023 12:30
Jenkins on kind cluster with webhook plugin
#!/usr/bin/env bash
helm repo add jenkins https://charts.jenkins.io
helm install for-pipelines jenkins/jenkins \
-f jenkins-values.yaml \
-n jenkins \
--create-namespace
export NODE_PORT=$(kubectl get --namespace jenkins -o jsonpath="{.spec.ports[0].nodePort}" services for-pipelines-jenkins)
@yitsushi
yitsushi / Makefile
Created March 7, 2022 12:23
Generate CA with ssl keys
# 5 years
validDays:=1825
priv:
openssl req -new -sha256 -nodes -out server/server.csr -newkey rsa:2048 -keyout server/server.key -config server.csr.cnf
cert:
openssl x509 -req -in server/server.csr -CA rootCA.pem -CAkey rootCA.key -CAcreateserial -out server/server.crt -days $(validDays) -sha256 -extfile v3.ext
@yitsushi
yitsushi / diagram.tex
Created February 15, 2022 13:40
Simple Communication Diagram with LaTeX
\documentclass{standalone}
\usepackage{tikz}
\usepackage{transparent}
\usepackage{fontspec}
\usepackage{xcolor}
\usepackage{graphicx}
\usepackage{anyfontsize}
\usetikzlibrary{calc, backgrounds, positioning, matrix}
@yitsushi
yitsushi / main.go
Last active February 9, 2022 11:16
Go: Maybe with foldl
package main
import (
"fmt"
"constraints"
)
func FoldlIter[T any, R any](init R, list (<- chan T), fold func(carry R, next T) R) R {
for value := range list {
init = fold(init, value)
#!/usr/bin/env bash
function printDebug() {
if [ -z "${1}" ]; then
return 1
fi
# That 2:
# FUNCNAME contains the printDebug call too and we want to ignore it.
if [[ ${#FUNCNAME[@]} -gt 2 ]]; then
@yitsushi
yitsushi / .git-commit
Created November 2, 2021 17:48
My fancy git commit template file
# Title here
#
# Use 50 characters maximum.
# Do not use a sentence-ending period.
#
# Prefixes:
#
# bump = bump version
# chore(subtype) = chore
# docs = documentation
@yitsushi
yitsushi / listen.py
Last active October 11, 2021 15:13
Quick python script to monitor DHCP traffic
#!/usr/bin/env python3
import os
import pyshark
dhcp_ports = [
67, 68, # dhcp
546, 547, # dhcpv6
]