Skip to content

Instantly share code, notes, and snippets.

View slipeer's full-sized avatar

Pavel Kardash slipeer

  • Barentsburg, Svalbard og Jan Mayen
View GitHub Profile
##############Script Settings##################
:local henetkey "XXXXXXXXXXXXXXXXXXXX"
:local henethost "XXXXXXXX.XX"
:local henameserver "ns1.he.net"
:local WANInter "wan"
###############################################
:local IpCurrent [/ip address get [find interface=$WANInter] address];
:for i from=( [:len $IpCurrent] - 1) to=0 do={
:if ( [:pick $IpCurrent $i] = "/") do={
:local NewIP [:pick $IpCurrent 0 $i];
@slipeer
slipeer / synapse.message_filters.diff
Created July 17, 2018 13:09
matrix-org/synapse message filters interface implementation for 0.32.2
diff -x '*.pyc' -Nur ./synapse.orig/config/homeserver.py ./synapse/config/homeserver.py
--- ./synapse.orig/config/homeserver.py 2018-07-09 11:47:10.914095067 +0300
+++ ./synapse/config/homeserver.py 2018-07-09 11:51:56.074775020 +0300
@@ -31,6 +31,7 @@
from .password import PasswordConfig
from .jwt import JWTConfig
from .password_auth_providers import PasswordAuthProviderConfig
+from .message_filters import MessageFilterConfig
from .emailconfig import EmailConfig
from .workers import WorkerConfig
@slipeer
slipeer / media_clean.py
Last active August 8, 2018 03:23
Synapse clean unclaimed local media.
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# For https://github.com/matrix-org/synapse/
# Synapse old local media analyze and cleanup util.
# @author Pavel Kardash <pavel@kardash.su>
"""
Since synapse v0.27.0 there last_accessed_ts column
in table local_media_repository present.
This made it possible to clean unclaimed local media.