Skip to content

Instantly share code, notes, and snippets.

name: 'service_immich'
networks:
proxy:
external: true # ---> To Traefik Reverse Proxy
cloudflared_network:
external: true # ---> To Cloudflare Tunnel network
backend:
driver: bridge # ---> Insider network accessible only to Immich services and sidearts
@tenekev
tenekev / exif_to_standard_json.py
Created September 8, 2024 11:04
This a python function that takes in Piexif data and outputs a more readable and manageable JSON data. It's opinionated - it strips and replaces some fields as they are not needed.
import re, json
def exif_to_standard_json(exif_data):
"""
Input: Piexif file data.
Output: Json
Personal flavors:
byte to string values:
standardized_value = re.sub(r'\u0000|\u0001|\u0002|\u0003', '', standardized_value)
@tenekev
tenekev / json_to_md_table.py
Created August 27, 2024 10:46
A Python function that transforms a list of dicts (a list of json objects) to a markdown table. It also accepts a format schema - custom order and labels. It can be transposed. (Swap row and column)
def converter__json_to_md_table(json_data:list, formated:list=None, transposed:bool=True) -> str:
"""
Converts JSON data to a Markdown table with optional key order, key labels and transposition.
Parameters:
- json_data: list(dict): Reqired: The JSON data as a list of dictionaries.
json_data = [
{key_1:value, key_2:value, key_3:value},
{key_1:value, key_2:value, key_3:value},
@tenekev
tenekev / .env
Last active March 12, 2025 17:48
Setting up Excalidraw with a Collaboration server
DOMAIN_NAME=yourdomain.tld
TZ=Europe/London