Skip to content

Instantly share code, notes, and snippets.

@agocsdaniel
agocsdaniel / ikea-rodret_E2201_ZHA-Z2M_control-light.yaml
Last active October 19, 2024 22:09 — forked from patrislav1/ikea-rodret_E2201_ZHA-Z2M_control-light.yaml
IKEA RODRET Dimmer Remote (E2201) - ZHA/Z2M - Control Light
blueprint:
name: IKEA Rodret Dimmer Light Control (ZHA/Z2M)
description: "## Control Light with IKEA RODRET Dimmer remote (v1.0)
Only for use with [ZHA](https://www.home-assistant.io/integrations/zha/)
or Zigbee2MQTT (cf [MQTT](https://www.home-assistant.io/integrations/mqtt)
+ [Z2M addon](https://www.zigbee2mqtt.io/guide/installation/03_ha_addon.html)).
@agocsdaniel
agocsdaniel / ykopenvpn
Last active July 19, 2022 05:37
2FA wrapper for OpenVPN client and YubiKey TOTP
#!/bin/bash
TOTP_ACCOUNT="VPN"
if [ "${BASH_SOURCE[0]}" -ef "$0" ]
then
# Run only when executed (not sourced)
strace -e execve -f -o "!bash -c 'source $0;'" openvpn "$@" 2>&1
else
while read line
do
@agocsdaniel
agocsdaniel / check_apcupsd.ps1
Created January 26, 2022 13:25
check_apcupsd Nagios script for Powershell
# APCUPSD checker script
# No command line parameters
# Written by Daniel Agocs
$ups_data = (C:\apcupsd\bin\apcaccess.exe).split("`n")
$param_crit_time = 10
$param_warn_voltage_diff = 15
$param_crit_load = 80
$param_warn_load = 60
@agocsdaniel
agocsdaniel / sophos-tidy.user.js
Last active March 4, 2022 12:59
Sophos XG UI tweak
// ==UserScript==
// @name Sophos Tidy
// @version 1.7.6
// @grant unsafeWindow
// @grant GM_addStyle
// @author Daniel Agocs
// @match https://*/webconsole/webpages/index.jsp*
// @run-at document-end
// @updateURL https://gist.githubusercontent.com/agocsdaniel/f7a1f40e82247483eab84d1db5dde5e9/raw/sophos-tidy.user.js
// ==/UserScript==