Skip to content

Instantly share code, notes, and snippets.

View trexx's full-sized avatar

Turan Asikoglu trexx

  • Århus, Denmark
  • 15:12 (UTC +02:00)
View GitHub Profile
@trexx
trexx / severity.tpl
Last active June 13, 2025 07:01
Grafana Template for PagerDuty ContactPoints
# Set the incident severity based upon the severity label in the alert rule
# Only include the valid severity values or default to critical if none exists or invalid
{{- range .Alerts -}}{{- if or (eq .Labels.severity "critical") (eq .Labels.severity "error") (eq .Labels.severity "warning") (eq .Labels.severity "info") -}}{{ .Labels.severity }}{{- else -}}critical{{- end -}}{{- end -}}
@trexx
trexx / automation.yaml
Created December 12, 2024 22:50
Setting datetime on POPP / Danfoss Ally zigbee TRVs
alias: Set Time On TRVs
description: ""
triggers:
- trigger: time_pattern
hours: "6"
minutes: "0"
seconds: "0"
conditions:
- condition: time
weekday:
#!/bin/env bash
dnf install \
@"Fonts" \
ark \
bluedevil \
breeze-gtk \
breeze-icon-theme \
colord-kde \
dolphin \
@trexx
trexx / gist:5759e7af0d60fb90c37517f8dbccb92e
Last active January 16, 2024 16:16
Additional costs calculation for Aura + Dinel.
# A Jinja2 template for the Nordpool Home Assistant integration to include additional costs for Aura.
# This includes hourly and seasonal tariff for electricity transportation (Dinel) and its taxes, state taxes, and a fixed cost.
{% set s = {
"summertarif_start_month": 4,
"summertarif_end_month": 9,
"summertarif_low_price": 0.0882,
"summertarif_high_price": 0.1323,
"summertarif_max_price": 0.3439,
@trexx
trexx / onc_converter.py
Last active March 13, 2023 11:23
The .ovpn to .onc converter
#!/usr/bin/python
# The .ovpn to .onc converter
# This tool parses an 'inline' OpenVPN profile (certs and keys are included within the .ovpn file)
## and spits out a Open Network Configuration file which can be imported in to ChromeOS.
# Open Network Configuration specs can be found here
## https://chromium.googlesource.com/chromium/src/+/master/components/onc/docs/onc_spec.md
# Original credit goes to Steve Woodrow (https://github.com/woodrow)