Skip to content

Instantly share code, notes, and snippets.

@SS-42
SS-42 / nordpool.py
Created April 27, 2025 15:15
Nordpool CSV Data Analyzer
'''
Fetches Nordpool pricing data, applies VAT, evaluates price thresholds and
sets state flags, and updates the local dataset without duplicates.
'''
import pandas as pd
import sys
import requests
from io import StringIO
@SS-42
SS-42 / panel_code.html
Last active October 26, 2024 23:51
If you want to dynamically change the height of iframe base on panel within Grafana's standard "Text" panel using JavaScript, you can achieve this by this:
<iframe id="embeddedFrame" src="http://your.external.web.page.url" width="100%"> </iframe>
<script>
var iframe = document.getElementById("embeddedFrame");
function setIframeHeight() {
iframe.style.height = iframe.parentElement.offsetHeight-5 + "px";
}
// Call setIframeHeight when the iframe content is loaded
iframe.onload = setIframeHeight;
@SS-42
SS-42 / folders_structure.ps1
Created September 19, 2024 07:25
Quick script to create folders structure within Sharepoint site. Module PnP.PowerShell require PowerShell 7.
# Import PnP PowerShell module
Import-Module PnP.PowerShell
# Connect to your Document Center site
$siteUrl = "https://tenant.sharepoint.com/sites/siteName"
Connect-PnPOnline -Url $siteUrl -UseWebLogin
# Create a folder structure in the Documents library
$folderNames = @(
"Legal",
@SS-42
SS-42 / ZabbixSender.py
Created July 5, 2024 10:18 — forked from GedowFather/ZabbixSender.py
AWS Lambda python script for sending metric value to zabbix.
#
# For sending metric value to zabbix server.
#
# You must create item as "zabbix trapper" on server.
# Because the server must be connected to agent:10050, if it is selected "zabbix agent".
#
# Usage:
# from modules.ZabbixSender import ZabbixSender
# ZABBIX_HOST = "zabbix.example.com"
# ZABBIX_PORT = 10051
@SS-42
SS-42 / ZabbixSender.py
Created July 5, 2024 10:18 — forked from VietThan/ZabbixSender.py
AWS Lambda python3 script for sending metric value to zabbix
import json
import socket
import struct
import time
import json
class ZabbixSender:
'''
Sender to Zabbix
@SS-42
SS-42 / nginx-localnet-or-client-certificate.conf
Last active June 7, 2024 19:18 — forked from marcodebe/nginx-localnet-or-client-certificate.conf
Nginx configuration for granting access to clients that are in the local net or presenting a valid SSL certificate.
# Reverse proxy for granting access to clients that are
# in the local net or presenting a valid SSL certificate.
# Credits to https://stackoverflow.com/a/48012499/2705147
# Local net user still will be asked for certificate but will be allowed access it case will not present certificate to nginx.
geo $internal_ip {
default no;
10.0.0.0/16 yes;
}
@SS-42
SS-42 / four-byte-emojis.json
Created November 2, 2020 08:28 — forked from watson/four-byte-emojis.json
Emoji's sorted by byte-size
[
"😁",
"πŸ˜‚",
"πŸ˜ƒ",
"πŸ˜„",
"πŸ˜…",
"πŸ˜†",
"πŸ˜‰",
"😊",
"πŸ˜‹",