Skip to content

Instantly share code, notes, and snippets.

@EhsanCh
EhsanCh / fpm_get_status.php
Created February 19, 2023 10:54
PHP-FPM real-time status page (Single file without the need for web server configuration)
<?php
// Upload to private url or implement authorization...
if (isset($_GET["json"])) {
header("Content-type: application/json");
exit(json_encode( fpm_get_status() ));
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<!--
# based on: https://community.home-assistant.io/t/tuya-radiator-valve-ts0601-calibration-from-external-sensor-via-zigbee2mqtt/337991
# alternative: https://community.home-assistant.io/t/sync-trv-with-external-tempature-sensor/298024
blueprint:
name: Temperature Calibration
description: Temperature calibration for Zigbee valve TS0601, according to external temperature sensor
domain: automation
input:
valve:
name: Smart Valve
@Terrance
Terrance / ticktick2cal.py
Created May 21, 2021 15:02
Script to convert from TickTick's backup CSV file to CalDAV-compatible VTODO files.
#!/usr/bin/env python3
from csv import DictReader
from datetime import datetime
from dateutil.rrule import rrulestr
from icalendar import Alarm, Calendar, Todo, vRecur
PRIORITY = {"0": "0", "1": "6", "3": "5", "5": "4"}