Skip to content

Instantly share code, notes, and snippets.

@djonasdev
djonasdev / GitHub-Gists-Profile-Button.user.js
Last active March 16, 2025 14:56
Public Tampermonkey scripts
// ==UserScript==
// @name GitHub Gists Profile Button
// @namespace http://tampermonkey.net/
// @version 1.0
// @description Adds a "View Gists Profile" button to GitHub profile pages
// @author Dominic Jonas
// @match https://github.com/*
// @grant none
// @homepageURL https://gist.github.com/djonasdev/55f5cc1fc8462ec8b3fbd0af7c5bc50a#file-github-gists-profile-button-user-js
// @updateURL https://gist.github.com/djonasdev/55f5cc1fc8462ec8b3fbd0af7c5bc50a/raw/eed82ad50b5dc6bdfdd7fd2ff8b39c203b49afd8/GitHub-Gists-Profile-Button.user.js
@djonasdev
djonasdev / MusicBee2Plex.py
Created February 2, 2025 19:04 — forked from yarnairb/MusicBee2Plex.py
Script to sync my MusicBee m3u playslists with Plex so I can use PlexAmp as my own Spotify
#!/usr/bin/env python3
import sys
import signal
import os
import json
import re
import argparse
import configparser
import pathlib
@djonasdev
djonasdev / SetupFreshWindows.ps1
Last active January 27, 2025 12:33
Setup fresh Windows installation
# Ensure the script is run as administrator
if (-not ([Security.Principal.WindowsPrincipal] [Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole] "Administrator")) {
Write-Host "The script must be run as Administrator. Restarting with elevated privileges..."
Start-Process powershell -ArgumentList "-NoProfile -ExecutionPolicy Bypass -File `"$PSCommandPath`"" -Verb RunAs
exit
}
# Define the log file path
$LogFile = "$PSScriptRoot\install_log.txt"
@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;