Skip to content

Instantly share code, notes, and snippets.

@bqbn
bqbn / test_mozlog_for_gke_logging.py
Created October 24, 2022 16:36
Test making MozLog compatible with GKE logging
#!/usr/bin/env python3
from dockerflow.logging import JsonLogFormatter
import logging.config
import sys
try:
greet = sys.argv[1]
except IndexError:
greet = "world"
@bqbn
bqbn / movefiles.py
Created February 21, 2020 06:48
Move a file and its referrenced attachments and images to a different directory
#!/usr/bin/env python
#
# Move a file and its referrenced attachments and images to a different directory.
#
# Usage:
#
# movefiles.py <files> <dst_dir>
#
from pathlib import Path