This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Przekierowanie portu na systemd: | |
root@host:~# cat /etc/systemd/system/przekierowanie.service | |
[Unit] | |
Description=przekierowanie redirect | |
Requires=network.target | |
After=network.target | |
[Service] | |
ExecStart=/lib/systemd/systemd-socket-proxyd 127.0.0.1:4321 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- bonnie++-2.00aubuntu2.old/zcav_io.cpp 2012-11-23 08:34:43.000000000 +0100 | |
+++ bonnie++-2.00aubuntu2/zcav_io.cpp 2023-03-05 16:21:55.087172990 +0100 | |
@@ -165,7 +165,7 @@ | |
void ZcavRead::printavg(int position, double avg, int block_size) | |
{ | |
- if(avg < 1.0) | |
+ if(avg < 0.1) | |
fprintf(m_log, "#%.2f ++++ %.3f\n", float(position) * float(block_size) / 1024.0, avg); | |
else |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sensor: | |
- platform: rest | |
scan_interval: 900 | |
name: pse | |
resource: https://www.pse.pl/transmissionMapService | |
value_template: " {{ status }}" | |
json_attributes: | |
- data | |
- platform: template | |
sensors: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/ksh | |
export LC_ALL=C | |
echo `uptime|grep days|sed 's/.*up \([0-9]*\) day.*/\1\/10+/'; cat /proc/cpuinfo|grep MHz|awk '{print $4"/30 +";}'; free|grep '^Mem' |awk '{print $3"/1024/3+"}'; df -P -k -x nfs | grep -v 1k | awk '{if ($1 ~ "/dev/(scsi|sd)"){ s+= $2} s+= $2;} END {print s/1024/50"/15+70";}'`|bc|sed 's/\(.$\)/.\1cm/' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python3 | |
import requests | |
import re | |
import math | |
def transTemperature(v): | |
# function transTemperature(temperature){ | |
# var temp = Number(temperature); | |
# if (temp >= Math.pow(2, 15)){ | |
# return -Math.round((Math.pow(2, 16)-temp)/256); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Skrypt bin/inpost_air.py: | |
``` | |
#!/usr/bin/env python | |
import requests | |
import sys | |
import json | |
url = sys.argv[1] | |
headers = { 'X-Requested-With': 'XMLHttpRequest' } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- platform: scrape | |
resource: https://ipi.gasstoragepoland.pl/pl/strona-glowna/index.html | |
name: magazyny gazutest | |
select: 'div.circle[data-idd="382"]' | |
index: 0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mqtt: | |
sensor: | |
- state_topic: "wmbusmeters/XXX" | |
name: Apator XXX | |
value_template: |- | |
{% if value_json["total_m3"] < 1000 %} | |
{{ value_json["total_m3"] }} | |
{% else %} | |
{{ states(entity_id) }} | |
{% endif %} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{"media":"water","meter":"apator162","name":"apatorXXX","id":"XXX","total_m3":0.186,"timestamp":"2022-08-16T16:31:28Z"} | |
{"media":"water","meter":"apator162","name":"apatorXXX","id":"XXX","total_m3":0.186,"timestamp":"2022-08-16T16:40:44Z"} | |
{"media":"water","meter":"apator162","name":"apatorXXX","id":"XXX","total_m3":3121610.752,"timestamp":"2022-08-16T16:41:25Z"} | |
{"media":"water","meter":"apator162","name":"apatorXXX","id":"XXX","total_m3":0.19,"timestamp":"2022-08-16T16:42:07Z"} | |
{"media":"water","meter":"apator162","name":"apatorXXX","id":"XXX","total_m3":0.19,"timestamp":"2022-08-16T17:00:46Z"} | |
{"media":"water","meter":"apator162","name":"apatorXXX","id":"XXX","total_m3":0.19,"timestamp":"2022-08-16T17:02:12Z"} | |
{"media":"water","meter":"apator162","name":"apatorXXX","id":"XXX","total_m3":3188719.616,"timestamp":"2022-08-16T17:08:09Z"} | |
{"media":"water","meter":"apator162","name":"apatorXXX","id":"XXX","total_m3":0.19,"timestamp":"2022-08-16T17:10:00Z"} | |
{"media":"water","meter":"apator162","name":"apatorXXX", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
rest: | |
- resource: 'https://user.walutomat.pl/api/public/marketPriceVolumes/USD_PLN?brief=true' | |
scan_interval: 60 | |
sensor: | |
- name: WT USD BID | |
value_template: '{{ value_json.BID_USD_PLN[0].rate }}' | |
unit_of_measurement: 'PLN' | |
- name: WT USD ASK | |
value_template: '{{ value_json.ASK_USD_PLN[0].rate }}' | |
unit_of_measurement: 'PLN' |