Skip to content

Instantly share code, notes, and snippets.

View sbogomolov's full-sized avatar

Sergii Bogomolov sbogomolov

View GitHub Profile
@sbogomolov
sbogomolov / authentik-overseerr-auth
Last active April 14, 2025 16:02
Property Mapping for authentik: Overseerr authentication using Plex SSO token
from authentik.sources.plex.models import UserPlexSourceConnection
import json
connection = UserPlexSourceConnection.objects.filter(user=request.user).first()
if not connection:
ak_logger.info("Overseer: No Plex connection found")
return {}
base_url = "http://overseerr.apps:5055"
end_point = "/api/v1/auth/plex"
@sbogomolov
sbogomolov / authentik-tautulli-auth
Last active March 31, 2025 16:27
Property Mapping for authentik: Tautulli authentication using Plex SSO token or username and password
from authentik.sources.plex.models import UserPlexSourceConnection
base_url = "http://tautulli.apps:8181"
end_point = "/auth/signin"
headers = {
"Content-Type": "application/x-www-form-urlencoded",
}
def auth_with_plex():
@sbogomolov
sbogomolov / update-dns
Last active December 8, 2024 13:54
RouterOS scrpit to add static DNS records for DHCP leases
:local zone "local";
:local ttl "00:05:00"
:local hostname
:local ip
:local dnsip
:local dhcpip
:local dnsnode
:local dhcpnode
/ip dns static;
#
# Runs ssh-agent if it is not already running.
#
env=~/.ssh/agent.env
agent_load_env () { test -f "$env" && . "$env" >| /dev/null ; }
agent_start () {
(umask 077; ssh-agent >| "$env")