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 / ScrollTop.vue
Created July 10, 2025 10:25
Scroll to the top
<template>
<div
class="scroll-top"
:class="{ active: isVisible }"
@click="scrollToTop"
>
<i class="fas fa-chevron-up"></i>
</div>
</template>
<template>
<div :class="fullWidth ? 'container-fluid' : 'container'">
<div v-if="totalPages > 1" class="row pagination-upper">
<div class="col-lg-12">
<p class="pagination-note">{{ $t('pagination.navigation_hint') }}</p>
<p class="pagination-summary">
{{ $t('photo', total, { count: total }) }} in
{{ $t('page', totalPages, { count: totalPages }) }}
</p>
<nav aria-label="Top Pagination" class="d-flex justify-content-center">
@katzefudder
katzefudder / .gitconfig
Last active March 28, 2025 08:28
just in case you are working on multiple projects (multiple git repositories) - you might have come across the need to have multiple identities regarding GIT. This is my approach
# ~/.gitconfig
# Different users per project/directory
[includeIf "gitdir:~/Code/private_project/"]
path = ~/Code/private_project/.gitconfig-private
[includeIf "gitdir:~/Code/project/"]
path = ~/Code/project/.gitconfig-project
@katzefudder
katzefudder / move.py
Last active April 15, 2025 13:31
don't let your computer fall asleep by keeping your mouse busy from time to time :)
import pyautogui
import time
from datetime import datetime
import argparse
def main():
parser = argparse.ArgumentParser(description="Prevent standby by moving the mouse.")
parser.add_argument("--duration", type=int, default=None, help="Time in seconds until the script stops (optional)")
args = parser.parse_args()
@katzefudder
katzefudder / open_terminal.sh
Created March 11, 2025 10:58
Opening up a terminal on my bastion host (assuming there's just one ec2)
#!/bin/bash
INSTANCE_ID=$(aws ec2 describe-instances --region eu-central-1 --output text --query "Reservations[].Instances[?State.Name == 'running'].InstanceId[]")
aws ssm start-session --target $INSTANCE_ID
import time
import xml.sax
from xml.dom import minidom
# SAX Parser Handler
class MySAXHandler(xml.sax.ContentHandler):
def __init__(self):
self.current_tag = None
def startElement(self, tag, attributes):
self.current_tag = tag
@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