Skip to content

Instantly share code, notes, and snippets.

View PfannenHans's full-sized avatar
👨‍🍳

Johannes Rothmayr PfannenHans

👨‍🍳
  • Nürnberg
  • 10:45 (UTC +02:00)
View GitHub Profile
@PfannenHans
PfannenHans / bayern-wlan.sh
Last active July 22, 2026 15:54
Small bash script for automatic captive portal log in to the “@BayernWLAN” using curl.
#!/usr/bin/env -S bash -e
# Only works with DNS name if using provider DNS
# ADDRESS="hotspot.vodafone.de/bayern"
# IP-Address might be different depending on location
ADDRESS="10.175.177.131"
LOGIN_PROFILE="6"
SESSION_KEY=$(curl -ks 'https://'${ADDRESS}'/api/v4/session' | jq '.session')
CURRENT_PROFILE=$(curl -ks 'https://'${ADDRESS}'/api/v4/session' | jq '.currentLoginProfile')
if [ ${CURRENT_PROFILE} != ${LOGIN_PROFILE} ]; then
echo "Not logged in! Logging in..."
@PfannenHans
PfannenHans / interference.py
Created October 27, 2021 19:31
Creating interference animation with matplotlib and ffmpeg
#!/usr/bin/env python3
# Creating output video file with ffmpeg:
# ffmpeg -framerate 60 -i %d.png -loop -1 -threads 8 loop.webm
import multiprocessing
import matplotlib.pyplot as plt
import numpy as np
def compute_frame(offset):
x = np.arange(0, 8*np.pi, 0.1)
#!/usr/bin/env python3
import sys
import PyPDF2
if __name__ == "__main__":
pdfWriter = PyPDF2.PdfFileWriter()
for filename in sys.argv[1:]:
with open(filename, "rb") as pdfFileObj:
print(filename)
pdfReader = PyPDF2.PdfFileReader(pdfFileObj)