Skip to content

Instantly share code, notes, and snippets.

View elpatron68's full-sized avatar

Markus Busche elpatron68

View GitHub Profile
@elpatron68
elpatron68 / Install-Rustdesk-Latest.ps1
Last active January 13, 2024 11:04
Install Latest Rustdesk
# Powershell Rustdesk Installation Script
# Derived from https://rustdesk.com/docs/en/self-host/client-deployment/
# 01/2024 elpatron@mailbox.org
#
# Changes:
# - Replaced static download Url with latest release from Github Api
# - .\rustdesk.exe --silent-install -wait waits forever: replaced by Start-Sleep -Seconds 10
# - Added some output
# - Use Set-Location instead of cd
# - Use System %TEMP% directory instead of c:\temp
@elpatron68
elpatron68 / app.py
Created November 25, 2023 17:43
SNMP2HTML Broker for Update-Kuma
# Webserver to check a device disk state by SNMP with Uptime-Kuma
# Requirements:
# pip install flask
# apt install snmp
#
# Run: python app.py
#
# Example: # http://192.168.177.48:5000/check-qnap-disk-state?ip=192.168.177.61&oid=.1.3.6.1.4.1.24681.1.2.11.1.7
from flask import Flask, request
from subprocess import check_output
@elpatron68
elpatron68 / mm_docker-update.py
Last active September 9, 2023 08:50
Checks latest Mattermost version, compares against installed version from .env, stops, updates container, finally deletes orphaned container(s)
#!/bin/python3
# © 2023 Markus Busche, elpatron@mailbox.org
# - Checks latest Mattermost version
# - Compares against installed version from .env
# - Stops, updates container
# - Finally deletes orphaned container(s)
import re
from urllib import response
import requests
from os.path import exists
@elpatron68
elpatron68 / revealTV-QS.au3
Created November 28, 2022 18:51
Reveal Teamviewer Quicksupport credentials and save them to disk
#include <Constants.au3>
#include <FileConstants.au3>
; Run("TeamViewerQS.exe")
WinWait("TeamViewer QuickSupport")
WinActivate("TeamViewer QuickSupport")
Sleep(5000)
Local $i = 0
While $i <= 10
@elpatron68
elpatron68 / MmUpdateNotifyer.py
Last active June 22, 2022 17:22
Parse Mattermost deploy site for latest version, notify channel if updated.
#!/bin/python3
# requires packaging and requests-html
# run scheduled (@daily) with cron
import re
from urllib import response
import requests
from os.path import exists
from requests_html import HTMLSession
from packaging import version
@elpatron68
elpatron68 / update_cp_ad.ps1
Last active June 7, 2022 09:36
Download latest AutoDrive and Courseplay from Github
# Downloads latest version of the Farming Simulator mods Courseplay and AutoDrive
# (c) 2022 elpatron68
# https://github.com/elpatron68
#
# To run this script, create a desktop shortcut like this:
# C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -noexit -ExecutionPolicy Bypass -File "<full path to this script>"
$docs = [Environment]::GetFolderPath("MyDocuments")
$fs22modpath = Join-Path -Path $docs -ChildPath "My Games\FarmingSimulator2022\mods"
@elpatron68
elpatron68 / boatposition_example.py
Created November 19, 2021 18:08
Get a boat´s position from Sailaway public API
import requests
# API_KEY and USRNR from https://sailaway.world/cgi-bin/sailaway.world/myaccount.pl
API_KEY = 'your API key'
USRNR = 'your USNR'
API_BASE_URL = 'http://srv.sailaway.world/cgi-bin/sailaway'
def getBoatPosition(boatname):
params = dict(
key=API_KEY,
@elpatron68
elpatron68 / MeshCentralRouter_AutoLogin.au3
Last active December 21, 2020 16:47
Automatic log in for MeshCentral Router
Opt("WinTitleMatchMode", 3)
While 1
Login()
Sleep(50)
WEnd
Func Login()
If WinActive(" MeshCentral Router", "") Then
; Get the window handle
@elpatron68
elpatron68 / update_wikijs.sh
Last active October 6, 2020 18:52
Update shell script for wiki.js (Linux install in ~/wiki)
#!/bin/bash
#
# Upgrade guide: https://docs.requarks.io/install/upgrade
# Prerequisite: Wiki.js installed in ~/wiki, this script saved in ~
cd ~
# Remove former downloaded file
rm wiki-js.tar.gz
rm ~/config.yml.bak
# Save config.yml
cp wiki/config.yml ~/config.yml.bak
@elpatron68
elpatron68 / cod-sats.txt
Created March 24, 2020 09:16
CoD API Stats
accuracy
assists
bestAssists
bestCaptures
bestConfirmed
bestDamage
bestDeaths
bestDefends
bestDefuses
bestDenied