This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
:: Windows script enabling Windows Management Instrumentation (WMI) | |
:: https://gist.github.com/elektr0nisch/dd20e8eb9655e4485087d5ec3f093b7e | |
:: Attention! Firewall rules have to be adressed by their display name. | |
:: Therefore this script is language dependent and only supports english and german at the moment. | |
@echo off | |
:: Checking administrator privilges | |
net session >nul 2>&1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@echo off | |
REM | |
REM MUST BE RUN AS ADMINISTRATOR | |
REM | |
%~d0 | |
cd %~p0 | |
set _SCRIPTLOG=DksWindowsUpdate.log | |
set DKS_REG_KEY=HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate | |
set DKS_BAK_FILE=%~dp0Reg_WindowsUpdate.txt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@echo off | |
REM | |
REM MUST BE RUN AS ADMINISTRATOR | |
REM | |
%~d0 | |
cd %~p0 | |
set _SCRIPTLOG=DksWindowsUpdate.log | |
set DKS_REG_KEY=HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate | |
set DKS_BAK_FILE=%~dp0Reg_WindowsUpdate.txt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import csv | |
from datetime import datetime | |
from pprint import pprint | |
data = [] | |
with open("data.csv", newline="", encoding="utf8") as file: | |
reader = csv.DictReader(file, delimiter=";") | |
for row in reader: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
:: Windows script enabling w32time and setting NTPs of Physikalisch-Technische Bundesanstalt (PTB) in Braunschweig | |
:: https://gist.github.com/elektr0nisch/e783d7b448266c218ee130860fead5e7 | |
:: Ensure that w32time is running | |
net start w32time | |
:: Reconfigure | |
w32TM /config /syncfromflags:manual /manualpeerlist:"ptbtime1.ptb.de ptbtime2.ptb.de ptbtime3.ptb.de ptbtime4.ptb.de" /update | |
w32TM /resync |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
:: Windows script enabling w32time and setting current domain controller as NTP time server | |
:: https://gist.github.com/elektr0nisch/8357f92388050b4d9cc04fd75e56883d | |
:: Ensure that w32time is running | |
net start w32time | |
:: Reconfigure | |
w32tm /config /syncfromflags:domhier /update | |
w32TM /resync |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# ======================== | |
# || sound_detector.sh || | |
# by elektr0nisch © 2023 | |
# ======================== | |
# | |
# This script constantly checks whether there are any active audio streams. (= sound is playing on the machine) | |
# Originally being used with an Raspberry Pi in an BT/DLNA/AirPlay/Spotify receiver setup. |