Skip to content

Instantly share code, notes, and snippets.

Avatar
🤓

Artur Krzywański artkrz

🤓
View GitHub Profile
@artkrz
artkrz / gist:2fa58aadfb36f8aded81631a90997190
Last active Nov 21, 2020
TS0601 calibration based on remote sensor.
View gist:2fa58aadfb36f8aded81631a90997190
- alias: Heating office calibrate temperature
trigger:
platform: state
entity_id: sensor.multisensor_office_temperature
condition: "{{ (states('sensor.multisensor_office_temperature')|float - state_attr('climate.thermostat_office_climate','current_temperature')|float)|round(1,'half') != 0 }}"
action:
- service: mqtt.publish
data_template:
topic: 'zigbee2mqtt/thermostat_office/set/local_temperature_calibration'
payload_template: >-
@artkrz
artkrz / hass_influx_drop_mesurments.sh
Last active Sep 17, 2020
Remove measurements from HASS InfluxDB
View hass_influx_drop_mesurments.sh
#!/bin/bash
host=localhost
db='home_assistant'
measurements=$1
measurements=($(influx --host $host --execute 'show measurements' --database=$db | grep "$1"))
if (( ${#measurements[@]} ))
then
@artkrz
artkrz / energenieApi.html
Last active Sep 20, 2016
energenieApi Ajax example
View energenieApi.html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="">
<meta name="author" content="">
<title>energenieApi</title>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
@artkrz
artkrz / phpldapadmin-fix-php5.5-support.patch
Created Dec 10, 2015
phpldapadmin fix for php5.5 support
View phpldapadmin-fix-php5.5-support.patch
commit 7e53dab990748c546b79f0610c3a7a58431e9ebc
Author: Michael Laccetti <michael@laccetti.com>
Date: Thu Aug 29 09:13:56 2013 -0400
Fixed two issues to get phpLdapAdmin to work under PHP 5.5.x
1) password_hash is an actual function, so renamed instances to password_hash_custom (HT: https://sourceforge.net/mailarchive/message.php?msg_id=31302386)
2) Fixed the preg_replace to preg_replace_callback to use the /e/ functionality in the officially endorsed fashion
diff --git a/lib/PageRender.php b/lib/PageRender.php
index 7d86a54..eed5d5f 100644
You can’t perform that action at this time.