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
@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
@apinter
apinter / fck_drm_ebook.md
Last active March 21, 2025 02:01
Opening LEGALLY PURCHASED ebooks in calibre on Linux
  1. Install Calibre
  2. Install the DeASCM plugin, follow the README
  3. Download and EXTRACT the NoDRM plugin
  4. Install the DeDRM plugin from the extracted folder.

Telling people about how to remove DRM from their legally purchased content so they can read wherever, on whatever is not illegal ;)

@apinter
apinter / proxy-tester.py
Created March 17, 2025 07:50
A script for testing socks5 connection
import socks
import socket
import requests
PROXY_HOST = "1.2.3.4"
PROXY_PORT = 1080
def get_public_ip():
try:
response = requests.get("https://ipconfig.org", timeout=5)