Skip to content

Instantly share code, notes, and snippets.

View domiko96's full-sized avatar

Dominik Kogel domiko96

View GitHub Profile
@domiko96
domiko96 / download.py
Created July 30, 2024 16:11
OSS video download Python
# Copy this to your home folder and have requests installed (pip install requests)
import requests
resp = requests.get("http://192.168.2.100:80/api/video")
for video in resp.json():
file_name = video["dir"].replace("%2B", "+") + "_" + video["name"]
url = f"http://192.168.2.100:80/api/video/{video['dir']}/{video['name']}"
with requests.get(url, stream=True) as r:
@domiko96
domiko96 / much_udp_unicast.py
Last active May 12, 2022 12:28
Send udp packets with python
import socket
from time import sleep
def main():
interfaces = socket.getaddrinfo(host=socket.gethostname(), port=None, family=socket.AF_INET)
allips = [ip[-1][0] for ip in interfaces]
msg = b"spammy message nruonaeoiaestosdiaeoddiaobdipiaefobdiaeoni"
sport = 35424
@domiko96
domiko96 / docker-compose.yml
Created November 14, 2021 19:51
Docker-compose nextcloud setup
version: "3.9"
services:
caddy:
image: caddy
restart: unless-stopped
ports:
- "80:80"
- "443:443"
volumes: