Skip to content

Instantly share code, notes, and snippets.

View trexx's full-sized avatar

Turan Asikoglu trexx

  • Århus, Denmark
  • 21:19 (UTC +02:00)
View GitHub Profile
@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 / Program.cs
Created November 11, 2021 18:46
Simple DB Connection
using System;
using Microsoft.Data.SqlClient;
using System.Text;
namespace sqltest
{
class Program
{
static void Main(string[] args)
{
@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)
@trexx
trexx / nginx-ngx_http_access.conf
Created December 20, 2017 02:05
Fail2Ban using ngx_http_access_module.
# Fail2Ban configuration file
#
# Author: Turan Asikoglu
#
#
[Definition]
# Option: actionstart
# Notes.: command executed once at the start of Fail2Ban.