Skip to content

Instantly share code, notes, and snippets.

View pfrenssen's full-sized avatar

Pieter Frenssen pfrenssen

  • Sofia, Bulgaria
View GitHub Profile
@pfrenssen
pfrenssen / workrave-notification.service
Created November 3, 2019 17:32
Notify workrave timers
# /home/pieter/.config/systemd/user/workrave-notification.service
[Unit]
Description=Show a notification with the remaining Workrave time
[Service]
ExecStart=python /home/pieter/v/python/workrave-timer.py
[Install]
WantedBy=multi-user.target
@pfrenssen
pfrenssen / launch-ethminer.service
Last active December 8, 2019 17:15
Launches ethminer when the display goes to sleep
# ~/.config/systemd/user/launch-ethminer.service
[Unit]
Description=Launches ethminer when the display goes to sleep.
[Service]
ExecStart=bash /home/pieter/v/launchminer.sh
KillMode=process
[Install]
WantedBy=multi-user.target
@pfrenssen
pfrenssen / real-estate-company-financial-estimation.php
Created September 6, 2020 14:37
Calculates estimated ROI of a real estate investment company.
<?php
$investors = [];
for ($i = 1; $i < 4; $i++) {
$starting_capital = (int) ($_POST["investor_{$i}_starting_capital"] ?? 0);
$investors[] = [
'name' => "Inv. $i",
'starting_capital' => $starting_capital,
'contributions' => (int) ($_POST["investor_{$i}_contributions"] ?? 0),

Factorio Modular Rail System

All blueprints are RHD (right-hand drive)

Modules are 42x42 (big electric poles overlap on neighboring modules)

Included blueprint books:

  • MRS - 2 Lane - RHD - 20 blueprints
  • MRS - 2 Lane Single - RHD - 34 blueprints
  • MRS - 4 Lane - RHD - 25 blueprints