Skip to content

Instantly share code, notes, and snippets.

View distantnative's full-sized avatar
🌎
distant native and local naive

Nico Hoffmann ෴. distantnative

🌎
distant native and local naive
View GitHub Profile
@brunoamaral
brunoamaral / find-total.py
Last active October 31, 2025 20:03
paperless-ngx, post consume script to fill in a custom field with the total for an invoice
#!/usr/bin/env python3
import os
import requests
import sys
import re
# Environment variables for Paperless API
PAPERLESS_API_URL = os.getenv("PAPERLESS_API_URL", "http://localhost:8000/api")
PAPERLESS_API_TOKEN = os.getenv("SCRIPT_PAPERLESS_API_TOKEN", None)
HEADERS = {"authorization": f"Basic {PAPERLESS_API_TOKEN}"}
@bastianallgeier
bastianallgeier / radius.php
Last active April 19, 2020 18:09
Radius search
<?php
/**
* Simple helper to fetch the bounding boxes
* for a point on the map (lat,lng) by radius.
*
* @param double $lat Latitude
* @param double $lng Longitude
* @param int $radius Radius in km
* @return array
@ericboehs
ericboehs / Fresh-Install.markdown
Last active July 24, 2023 08:16
What I do after a fresh install of Mac OS X