Skip to content

Instantly share code, notes, and snippets.

View apinter's full-sized avatar
🏠
Working from home

Attila Pinter apinter

🏠
Working from home
View GitHub Profile
Starting from balanced:
(sys, eng, wep)
(1.5, 1.5, 3.0) = right
(1.5, 3.0, 1.5) = up
(3.0, 1.5, 1.5) = left
(1.0, 1.0, 4.0) = right, right
(2.5, 2.5, 1.0) = left, up
(1.0, 4.0, 1.0) = up, up
(2.5, 1.0, 2.5) = left, right
(4.0, 1.0, 1.0) = left, left
@apinter
apinter / trafik.md
Last active March 12, 2026 00:34
Burn Baby Burn

Traefik migration

App

apiVersion: apps/v1
kind: Deployment
metadata:
  name: dummy
 namespace: default
@apinter
apinter / check_image.sh
Created March 4, 2026 04:41
list pods with currently running images
#!/bin/bash
for ns in $(kubectl get ns -o jsonpath="{.items[*].metadata.name}"); do
echo "Namespace: $ns"
kubectl get pods --namespace "$ns" -o jsonpath="{.items[*].spec.containers[*].image}"
echo -e "\n"
done
@apinter
apinter / iam_checker.sh
Created March 2, 2026 08:23
GCP IAM owner checker
#!/bin/bash
USER_EMAIL=$(gcloud auth list --filter=status:ACTIVE --format="value(account)")
if [ -z "$USER_EMAIL" ]; then
echo "Error: No active gcloud account found. Please run 'gcloud auth login'."
exit 1
fi
echo "Checking IAM roles for: $USER_EMAIL"
@apinter
apinter / glab_securefiles_manager.py
Created February 6, 2026 09:11
secure files manager for gitlab
#!/usr/bin/env python3
import argparse
import os
import sys
import requests
GITLAB_URL = os.getenv("GITLAB_URL")
GITLAB_PRIVATE_TOKEN = os.getenv("GITLAB_PRIVATE_TOKEN")
GITLAB_PROJECT_ID = os.getenv("GITLAB_PROJECT_ID")
import os
import psycopg2
import psycopg2.extras
DB_CONNECTION_PARAMS = {
"host": os.environ.get("PGHOST", ""),
"port": os.environ.get("PGPORT", 5432),
"user": os.environ.get("PGUSER", ""),
"password": os.environ.get("PGPASSWORD", ""),
#!/usr/bin/env python3
import argparse
import os
import sys
import requests
GITLAB_URL = os.getenv("GITLAB_URL")
GITLAB_PRIVATE_TOKEN = os.getenv("GITLAB_PRIVATE_TOKEN")
GITLAB_PROJECT_ID = os.getenv("GITLAB_PROJECT_ID")
@apinter
apinter / db_rename_val.py
Created October 21, 2025 11:44
Rename a value in psql
import psycopg2
import psycopg2.extras
import os
DB_CONNECTION_PARAMS = {
"host": os.environ.get("PGHOST", ""),
"port": os.environ.get("PGPORT", 5432),
"user": os.environ.get("PGUSER", ""),
"password": os.environ.get("PGPASSWORD", ""),
"dbname": os.environ.get("PGDATABASE", "postgres")
@apinter
apinter / unifi.yaml
Created July 17, 2025 00:27
Podman secrets in pod manifests
apiVersion: v1
kind: Pod
metadata:
labels:
app: unifi-pod
name: unifi-pod
spec:
hostNetwork: true
containers:
- name: unifi-db