Skip to content

Instantly share code, notes, and snippets.

@pli01
pli01 / version-kube.diff
Last active March 26, 2025 13:46
version-kube.diff
#
# ubuntu-2204-2204-kubernetes-v1.28.5-2024-01-10
# vs
# ubuntu-2204-2204-kubernetes-v1.28.15-2025-03-23
#
--- version-1.28.5 2025-03-25 18:21:09.320144808 +0000
+++ version-1.28.15 2025-03-25 22:24:21.601541525 +0000
@@ -4,54 +4,50 @@
Name Version
@pli01
pli01 / readme-kind-docker-capd.md
Last active January 4, 2025 13:22
kind docker capd
# https://kind.sigs.k8s.io/docs/user/known-issues#pod-errors-due-to-too-many-open-files

cat > /etc/sysctl.d/99-docker.conf <<EOF
fs.inotify.max_user_watches = 524288
fs.inotify.max_user_instances = 512
EOF
sysctl -f --system
service docker restart
@pli01
pli01 / readme-install-PTP-ntp-chrony.md
Last active June 1, 2024 13:33
ntp device PTP (vm)
#!/bin/bash
#
# teleport purge recording from log
#
log="${1:?log file}"
[ -f "$log" ] || exit 1
grep sid "$log" |jq -re '.sid'|sort |uniq |while read a ; do
if [ -f ../records/$a.tar ] ;then
ls -l ../records/$a.tar
rm ../records/$a.tar
@pli01
pli01 / deploy-oci-registry.sh
Created May 23, 2024 11:16
deploy-oci-registry.sh
#!/bin/bash
#
# install oci-registry https://github.com/mcronce/oci-registry/
# oci-registry is an implementation of the OCI Registry spec with filesystem and S3 storage back-ends
# Pull-through cache for any registry
#
set -e -o pipefail
docker version || exit 1
test -f proxy.sh && source proxy.sh
@pli01
pli01 / lookscanned-docker.md
Created March 29, 2024 12:50
lookscanned pdf
git clone https://github.com/rwv/lookscanned.io
cd lookscanned.io
docker run  -p 3000:3000 -v .:/build -it --rm node:latest bash -c '(cd /build && npm run dev -- --host)'
# connect to localhost:3000
@pli01
pli01 / lab-stormshield-eva.md
Last active November 27, 2023 08:38
lab: run stormshield virtual on mac m1 for training purpose

run Network Security Elastic Virtual Appliances on mac M1

For training purpose or lab.

Install qemu on mac

nice tutorial qemu on mac setup

brew install qemu
@pli01
pli01 / hook.sh
Last active March 17, 2023 17:41
helm-post-render
#/bin/bash
# get helm-charts
git clone https://github.com/prometheus-community/helm-charts
# update helm dependency for kube-prometheus-stack
helm dependency update ../helm-charts/charts/kube-prometheus-stack
# apply patch from kustomize directory whith hook.sh and kustomization.yaml
cd kustomize
helm install kube-prometheus-stack ../helm-charts/charts/kube-prometheus-stack --post-renderer=./hook.sh --debug --dry-run
@pli01
pli01 / gist:a90649ac600820b11fbe04f399f67db1
Created October 24, 2022 09:37
Github visual code liveshare
# Github visual code liveshare
- select github repo
- select/create branch
- press `.` key
- in vscode: select "live share"
@pli01
pli01 / stats-nginx.sh
Created October 13, 2022 12:27
stats-nginx.sh
#!/bin/bash
URL="${1:? $(basename $0) URL}"
(
cd /var/log/nginx
for f in $(ls -rt1 access.log*) ; do
case $f in
*.gz) GREP="zgrep" ;;
*) GREP="grep" ;;
esac