Skip to content

Instantly share code, notes, and snippets.

View korteke's full-sized avatar

Keijo Korte korteke

View GitHub Profile
@korteke
korteke / configuration.yaml
Last active September 17, 2025 08:56
Cozify HAN-port meter + Home Assistant integration
default_config:
homeassistant:
packages: !include_dir_named packages
frontend:
themes: !include_dir_merge_named themes
extra_module_url:
- /hacsfiles/custom-sidebar/custom-sidebar-yaml.js
@korteke
korteke / docker-compose.yaml
Last active May 30, 2025 10:53
Traefik + ModSecurity plugin
version: "3.8"
services:
traefik:
image: traefik
ports:
- "8000:80"
- "8080:8080"
command:
- --api.dashboard=true
@korteke
korteke / restore_from_archive.py
Last active July 21, 2018 05:34
Splunk - Restore from archive
#!/usr/bin/python
import os
import time
import datetime
from subprocess import call
# VARIABLES
archivepath = '/archive/'
logpath = '/logdata/'
splunkbin = '/opt/splunk/bin/'
{
"handler": {
"type": "Chain",
"config": {
"filters": [
{
"type": "PasswordReplayFilter",
"config": {
"loginPageContentMarker": "Welcome",
"request": {
{
"handler": {
"type": "Router",
"audit": "global",
"baseURI": "http://app.example.com:8081",
"capture": "all"
},
"heap": [
{
"name": "LogSink",

Keybase proof

I hereby claim:

  • I am korteke on github.
  • I am korteke (https://keybase.io/korteke) on keybase.
  • I have a public key whose fingerprint is ADB0 4965 FD10 71F6 2F2F E343 ECA3 6E6D 87B0 3A87

To claim this, I am signing this object:

@korteke
korteke / DestroySession.java
Created April 13, 2016 10:46
Tiedostopolut: /opt/shibboleth-idp/system/flows/intercept/ Oikea tapa on tehdä system-hakemiston tiedostoista omat versiot /opt/shibboleth-idp/flows/intercept hakemistoon. System-hakemiston alla olevia tiedostoja ei ole tarkoitus muokata! Ekassa bean joka pitää lisätä muiden jatkoksi. Tokassa flow, jossa tärkeimpänä rivit 122-132. Kolmanessa its…
/*
* The MIT License
* Copyright (c) 2016 CSC - IT Center for Science, http://www.csc.fi
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
package fi.csc.shibboleth.mobileauth.impl.authn;
import javax.annotation.Nonnull;
import javax.annotation.Nullable;
import org.opensaml.profile.action.EventIds;
import org.opensaml.profile.context.ProfileRequestContext;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
<flow xmlns="http://www.springframework.org/schema/webflow"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/webflow http://www.springframework.org/schema/webflow/spring-webflow.xsd"
parent="intercept.abstract">
<!-- Rudimentary impediment to direct execution of subflow. -->
<input name="calledAsSubflow" type="boolean" required="true" />
<!-- Attribute consent setup. -->
@korteke
korteke / NOTICE_WHITESPACES_DOTS.txt
Created March 11, 2016 14:26
First the actual code that tries to crete request. Second method that creates webRequest. Third snippet from the .NET tracing.
System.Net Verbose: 0 : [4612] 00000000 : 3C 3F 78 6D 6C 20 76 65-72 73 69 6F 6E 3D 22 31 : <?xml version="1
System.Net Verbose: 0 : [4612] 00000010 : 2E 30 22 20 65 6E 63 6F-64 69 6E 67 3D 22 55 54 : .0" encoding="UT
System.Net Verbose: 0 : [4612] 00000020 : 46 2D 38 22 3F 3E 0D 0A-3C 53 4F 41 50 2D 45 4E : F-8"?>..<SOAP-EN
System.Net Verbose: 0 : [4612] 00000030 : 56 3A 45 6E 76 65 6C 6F-70 65 20 78 6D 6C 6E 73 : V:Envelope xmlns
System.Net Verbose: 0 : [4612] 00000040 : 3A 53 4F 41 50 2D 45 4E-56 3D 22 68 74 74 70 3A : :SOAP-ENV="http:
System.Net Verbose: 0 : [4612] 00000050 : 2F 2F 73 63 68 65 6D 61-73 2E 78 6D 6C 73 6F 61 : //schemas.xmlsoa
System.Net Verbose: 0 : [4612] 00000060 : 70 2E 6F 72 67 2F 73 6F-61 70 2F 65 6E 76 65 6C : p.org/soap/envel
System.Net Verbose: 0 : [4612] 00000070 : 6F 70 65 2F 22 3E 0D 0A-20 20 3C 53 4F 41 50 2D : ope/">.. <SOAP-
System.Net Verbose: 0 : [4612] 00000080 : 45 4E 56 3A 42 6F 64 79-3E 0D 0A 20 20 20 20 3C : ENV:Body>.. <
System.Net Verbose: 0 : [4612] 00000090 : 7