Skip to content

Instantly share code, notes, and snippets.

View elisium-oat's full-sized avatar
💭
Available for contract work

Elise Beaulieu elisium-oat

💭
Available for contract work
View GitHub Profile
@elisium-oat
elisium-oat / billit.py
Created September 3, 2023 23:37
My time tracking and reporting script. Vanilla Python. Can generate CSV for GNU Cash invoices.
from datetime import datetime, time
from zoneinfo import ZoneInfo
import sqlite3
import csv
import sys
class billit:
def __init__(self, path):
self.db = sqlite3.connect(path)
@elisium-oat
elisium-oat / easyzoom_gluer.py
Last active August 18, 2023 21:00
This script help to combine a very big image from EasyZoom.
# Image tiler for EasyZoom's image
# This script requires Pillow (https://pillow.readthedocs.io/en/stable/)
# You have to download the .szi file of the EasyZoom image.
# You can find the URL of this file in by "inspecting" the page in the browser
# and looking at the "Network" tab. Be sure to remove the "?bytes=xxxxxx-yyyyyyy"
# of the URL params before downloading.

Script for adding a service in a HAProxy config file.

Here is the original haproxy.cfg (modified from here):

global
       log 127.0.0.1   local0
       log 127.0.0.1   local1 notice
       maxconn 4096
       user haproxy
       group haproxy
# SVG file to use -> https://upload.wikimedia.org/wikipedia/commons/9/91/Tableau_p%C3%A9riodique_des_%C3%A9l%C3%A9ments.svg
# Use Pyhton 3.4
from xml.dom import minidom
import json
def main():
"""THE main function."""
elements = {}