Skip to content

Instantly share code, notes, and snippets.

@belzebub40k
belzebub40k / teamcal.py
Last active September 29, 2023 07:58
TeamCal Neo iCal CGI Script
#!/usr/bin/env python3
import cgi
from datetime import date, datetime, time, timedelta
import re
import MySQLdb
from icalendar import Calendar, Event
@belzebub40k
belzebub40k / ffapi_fetch_communities.py
Created February 16, 2022 12:53
fetch all Freifunk API entries from directory.api.freifunk.net
#!/usr/bin/env python3
import json
import requests
URL = "https://raw.githubusercontent.com/freifunk/directory.api.freifunk.net/master/directory.json"
for community, url in requests.get(URL).json().items():
try:
@belzebub40k
belzebub40k / af_comics_wizardzines.php
Last active February 16, 2022 12:58
tt-rss: af_comics filters
<?php
class Af_Comics_WizardZines extends Af_ComicFilter {
function supported() {
return array("Wizard Zines");
}
function process(&$article) {
if (strpos($article["link"], "wizardzines.com/comics") !== false) {
@belzebub40k
belzebub40k / domains.geojson
Created March 5, 2019 08:41
Freifunk MWU Domains
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
#!/usr/bin/env python3
import subprocess
temp_file = 'templ-dom.conf'
gates = [
'lotuswurzel',
'ingwer',
'uffschnitt',
#!/usr/bin/env python3
from netaddr import *
domains = {
1: 'mainz',
2: 'wiesbaden',
3: 'bingen',
4: 'rheingau',
5: 'taunus',
@belzebub40k
belzebub40k / albumgen.sh
Created September 14, 2017 15:12
generate album for www.dpsg-eltville.de
#!/bin/bash
INPUT_DIR=${1}
ALBUM_NAME=${2}
if [[ ! -d "${INPUT_DIR}" ]] ; then
echo "${INPUT_DIR} is not a directory!"
exit 1
fi
@belzebub40k
belzebub40k / backup-sactrack.py
Last active July 6, 2017 11:55
backup data from sac-track.com API
#!/usr/bin/env python2
import json
import os
import requests
import sys
import tempfile
from PIL import Image
from io import BytesIO