Skip to content

Instantly share code, notes, and snippets.

View erlingpaulsen's full-sized avatar

Erling erlingpaulsen

View GitHub Profile
@erlingpaulsen
erlingpaulsen / hjemme-terms-of-use.md
Created September 11, 2026 07:27
Hjemme — Terms of Use

Hjemme — Terms of Use

Last updated: 11 September 2026

1. Scope

These terms govern the use of Hjemme, a self-hosted household application operated privately by a single household. It is not a commercial service, is not offered or made available to the public, and has no registration or accounts. Use is restricted to the two account holders of the operating household; no other person is granted access or any right of use.

2. What the application does

@erlingpaulsen
erlingpaulsen / hjemme-privacy-policy.md
Created September 11, 2026 07:26
Hjemme — Privacy Policy

Last updated: 11 September 2026

1. Who we are

Hjemme is a self-hosted application operated privately by a single household for its own use. It is not offered to the public and has no users other than the two account holders of the household. For data protection matters, the operator is reachable at the contact address registered with Enable Banking Oy.

2. What we process

Through Enable Banking Oy, acting as a licensed account information service provider under PSD2, and only with the explicit consent of each account holder given via BankID, the application retrieves: account identifiers and names, account holder names, balances, and transaction records consisting of booking and value dates, amount and currency, counterparty name, payment reference text, and merchant category code where the bank supplies one.

@erlingpaulsen
erlingpaulsen / powershell-python.py
Last active February 1, 2022 11:15
Running PowerShell commands in Python - Three simple examples
import subprocess
import datetime
# PARAMETERS
powershell_exe = 'C:\\Windows\\system32\\WindowsPowerShell\\v1.0\\powershell.exe'
def custom_print(severity, message):
print('{0} - [{1}] - {2}'.format(datetime.datetime.now(), severity, message))
def createFolder(path, name):
@erlingpaulsen
erlingpaulsen / storj_disk_check.sh
Last active June 14, 2021 10:32
Bash script for checking disk health for a Storj Storagenode. The disk is automatically remounted if the error "Transport endpoint is not connected" is encountered. Then the Storj Storagenode docker service is checked and started after the disk is mounted.
#!/bin/bash
# Add to crontab for periodic check:
# Storj disk check every 4 hours - remounts and restarts storagenode if disk is unavailable
# 0 */4 * * * /bin/bash /root/scripts/storj_disk_check.sh
# Variables
SCRIPT_NAME=`basename "$0"`
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )"
LOG_FILE="$SCRIPT_DIR/$(echo $SCRIPT_NAME | cut -d'.' -f1).log"
@erlingpaulsen
erlingpaulsen / coinbase_profit_loss.py
Created January 15, 2021 12:18
Python script for connecting to your Coinbase account through the API. Used to compute and plot the balance and cost per wallet and in total, in addition to calculate the total profit/loss. Will calculate to your native currency.
import json, hmac, hashlib, time, requests
import numpy as np
from requests.auth import AuthBase
import matplotlib.pyplot as plt
# Name of account holder (only for displaying)
USER = 'My name'
# API key and secret. Create these in your Coinbase account with all read permissions selected for all accounts
API_KEY = 'xxx'
@erlingpaulsen
erlingpaulsen / generateThreadIndex.py
Last active October 8, 2019 10:20
Seeded thread index generator for grouping Microsoft Outlook emails into converations
import uuid
import random
import base64
def generateThreadIndex(seed):
# Generates a Microsoft Outlook thread index based on a seed.
# Add the thread index with the 'Thread-Index' header when sending an email to group the emails into conversations
rd = random.Random()
rd.seed(seed)