diff --git a/powershell/jasper-kontroll.ps1 b/powershell/jasper-kontroll.ps1
new file mode 100644
index 0000000..cb14ee9
--- /dev/null
+++ b/powershell/jasper-kontroll.ps1
@@ -0,0 +1,5 @@
+$datum = Get-Date -Format "yyyy-MM-dd"; $path = "C:\din\mapp\sökväg"; $outputFile = "C:\sökväg\till\jasper-resultat-$datum.md"; "Filename | Last Modified Time", "-------- | -----------------" | Set-Content $outputFile; Get-ChildItem -Path $path -Filter *.jasper | Sort-Object LastWriteTime -Descending | ForEach-Object { "$($_.Name) | $($_.LastWriteTime)" | Add-Content $outputFile }
+
+$datum = Get-Date -Format "yyyy-MM-dd"; $path = "C:\din\mapp\sökväg"; $outputFile = "C:\sökväg\till\jasper-resultat-$datum.md"; "| Filename | Last Modified Time |", "| -------- | ----------------- |" | Set-Content $outputFile; Get-ChildItem -Path $path -Filter *.jasper | Sort-Object LastWriteTime -Descending | ForEach-Object { "| $($_.Name) | $($_.LastWriteTime) |" | Add-Content $outputFile }
+
+Compare-Object (Get-Content "C:\sökväg\till\fil1.md") (Get-Content "C:\sökväg\till\fil2.md") | Where-Object { $_.SideIndicator -ne '==' } | ForEach-Object { if ($_.SideIndicator -eq '<=') {"File1: $($_.InputObject)"} else {"File2: $($_.InputObject)"} } | Set-Content "C:\sökväg\till\diffresultat.md"
diff --git a/powershell/jasper-rapporter.ps1 b/powershell/jasper-rapporter.ps1
new file mode 100644
index 0000000..2cee907
--- /dev/null
+++ b/powershell/jasper-rapporter.ps1
@@ -0,0 +1,5 @@
+# Production-server:
+$datum = Get-Date -Format "yyyy-MM-dd"; $path = "\\appsrv31\Rapport"; $outputFile = "C:\Users\patsto\Desktop\produktions-jasper-$datum.md"; "| Filename | Last Modified Time |", "| --- | --- |" | Set-Content $outputFile; Get-ChildItem -Path $path -Filter *.jasper | Sort-Object LastWriteTime -Descending | ForEach-Object { "| $($_.Name) | $($_.LastWriteTime) |" | Add-Content $outputFile }
+
+# Testing-server:
+$datum = Get-Date -Format "yyyy-MM-dd"; $path = "\\tst-appsrv31\Rapport"; $outputFile = "C:\Users\patsto\Desktop\produktions-jasper-$datum.md"; "| Filename | Last Modified Time |", "| --- | --- |" | Set-Content $outputFile; Get-ChildItem -Path $path -Filter *.jasper | Sort-Object LastWriteTime -Descending | ForEach-Object { "| $($_.Name) | $($_.LastWriteTime) |" | Add-Content $outputFile }
diff --git a/python/md_to_pdf.py b/python/md_to_pdf.py
new file mode 100644
index 0000000..1893d62
--- /dev/null
+++ b/python/md_to_pdf.py
@@ -0,0 +1,124 @@
+import markdown
+from weasyprint import HTML, CSS
+import sys
+import re
+from datetime import datetime
+
+def extract_date(markdown_text):
+ # Försök att hitta ett datum i formatet "Datum: YYYY-MM-DD"
+ match = re.search(r'\*\*Datum\*\*:\s*(\d{4}-\d{2}-\d{2})', markdown_text)
+ return match.group(1) if match else datetime.now().strftime('%Y-%m-%d')
+
+def markdown_to_pdf(input_file, output_file):
+ # Läs markdown från fil
+ with open(input_file, 'r', encoding='utf-8') as file:
+ markdown_text = file.read()
+
+ # Extrahera datumet
+ date = extract_date(markdown_text)
+
+ # Konvertera markdown till HTML
+ html_text = markdown.markdown(markdown_text, extensions=['tables'])
+
+ # HTML-mall med anpassad teckenstorlek
+ html_template = f"""
+
+
+
+
+
+
+
+ {f'DATUM: {date}' if date else ""}
+ Eskilstuna Kommunfastigheter AB
+
+ {html_text}
+
+
+ """
+
+ # Generera PDF
+ html = HTML(string=html_template)
+ html.write_pdf(output_file)
+
+ print(f"PDF-filen {output_file} har skapats.")
+
+if __name__ == "__main__":
+ if len(sys.argv) != 3:
+ print("Användning: python script.py input.md output.pdf")
+ else:
+ input_filepath = sys.argv[1]
+ output_filepath = sys.argv[2]
+ markdown_to_pdf(input_filepath, output_filepath)
diff --git a/python/ssh_honeypot.py b/python/ssh_honeypot.py
new file mode 100644
index 0000000..ea592a6
--- /dev/null
+++ b/python/ssh_honeypot.py
@@ -0,0 +1,33 @@
+#!/usr/bin/env python3
+
+import socket
+import paramiko
+import threading
+
+class SSHServer(paramiko.ServerInterface):
+
+ def check_auth_password(self, username: str, password: str) -> int:
+ print(f'{username}:{password}')
+ return paramiko.AUTH_FAILED
+
+def handle_connection(client_sock):
+ transport = paramiko.Transport(client_sock)
+ server_key = paramiko.RSAKey.from_private_key_file('key')
+ transport.add_server_key(server_key)
+ ssh = SSHServer()
+ transport.start_server(server=ssh)
+
+def main():
+ server_sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
+ server_sock.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
+ server_sock.bind(('', 2222))
+ server_sock.listen(100)
+
+ while True:
+ client_sock, client_addr = server_sock.accept()
+ print(f'Connection from {client_addr[0]}:{client_addr[1]}')
+ t = threading.Thread(target=handle_connection, args=(client_sock,))
+ t.start()
+
+if __name__ == "__main__":
+ main()
diff --git a/python/taskwarrior-task2cal.py b/python/taskwarrior-task2cal.py
new file mode 100644
index 0000000..d57971e
--- /dev/null
+++ b/python/taskwarrior-task2cal.py
@@ -0,0 +1,51 @@
+#!/usr/bin/env python3
+
+from tasklib import TaskWarrior
+import sys
+
+tw = TaskWarrior('~/.local/share/task/')
+
+# Parse appointments
+apts = tw.tasks.filter('(status:pending or status:waiting or status:completed)', type='cal')
+for apt in apts:
+ start = apt['scheduled']
+ if start is None:
+ sys.stderr.write(f"Apt '{apt}' has no sched date!\n")
+ continue
+
+ summary = str(apt)
+
+ if start.hour == 0 and start.minute == 0:
+ start_fmt = start.strftime("%m/%d/%Y")
+ print(f"{start_fmt} [1] {summary}")
+ else:
+ start_fmt = start.strftime("%m/%d/%Y @ %H:%M")
+
+ if apt['due']:
+ end_fmt = apt['due'].strftime("%m/%d/%Y @ %H:%M")
+ else:
+ end_fmt = strt_fmt
+
+ print(f"{start_fmt} -> {end_fmt}|{summary}")
+
+# Parse due dates for next actions and projects
+tasks = tw.tasks.filter('(status:pending or status:waiting) and (type:next or type:objective or type:standby)')
+
+for task in tasks:
+ for date_type, label in [('due', "Slutdatum: "),
+ ('scheduled', "Startdatum: ")]:
+ if not task[date_type]: # Skip tasks with no date
+ continue
+ start = task[date_type]
+
+ proj = "Project: " if task['type'] == "objective" else ""
+
+ summary = label + proj + str(task)
+
+ if start.hour == 0 and start.minute == 0:
+ start_fmt = start.strftime("%m/%d/%Y")
+ print(f"{start_fmt} [1] {summary}")
+ else:
+ start_fmt = start.strftime("%m/%d/%Y @ %H:%M")
+ end_fmt = start_fmt
+ print(f"{start_fmt} -> {end_fmt}|{summary}")
diff --git a/sqlite3/newsboat-reset.sql b/sqlite3/newsboat-reset.sql
new file mode 100644
index 0000000..f612c61
--- /dev/null
+++ b/sqlite3/newsboat-reset.sql
@@ -0,0 +1,4 @@
+-- Reset entire rss-feed
+UPDATE rss_item
+ SET unread = 1
+ WHERE feedurl = '' -- get from urls file