Skip to content

Instantly share code, notes, and snippets.

@djonasdev
djonasdev / RestoreContextMenu.bat
Created April 24, 2024 06:24
Restore the old Context Menu in Windows 11
@echo off
echo Restore the old Context Menu in Windows 11
rem https://answers.microsoft.com/en-us/windows/forum/all/restore-old-right-click-context-menu-in-windows-11/a62e797c-eaf3-411b-aeec-e460e6e5a82a
reg.exe add "HKCU\Software\Classes\CLSID\{86ca1aa0-34aa-4e8b-a509-50c905bae2a2}\InprocServer32" /f /ve
rem check for any errors
if %errorlevel% equ 0 (
echo Old Context Menu successfully restored
) else (
@djonasdev
djonasdev / GuidSwap.ps1
Created December 12, 2022 10:19
Easily replace all GUID in a WIX-Toolset-Installer file | It is also usable on any other file
## GuidSwap.ps1
##
## Reads a file, finds any GUIDs in the file, and swaps them for a NewGUID
##
$filename = "HMI.wxs"
$outputFilename = "HMI_newGuids.wxs"
$text = [string]::join([environment]::newline, (get-content -path $filename))
@djonasdev
djonasdev / SubscriptionManager.cs
Last active February 17, 2022 12:22
SubscriptionManager for convertersystems / opc-ua-client
using System;
using System.Collections.Concurrent;
using System.Collections.Generic;
using System.Linq;
using System.Reactive.Concurrency;
using System.Reactive.Disposables;
using System.Reactive.Linq;
using System.Reactive.Subjects;
using System.Threading;
using System.Threading.Tasks;