Skip to content

Instantly share code, notes, and snippets.

View Damperen's full-sized avatar
💭
Counting bits

Damperen

💭
Counting bits
View GitHub Profile
@Damperen
Damperen / Create-UberDelete.ps1
Created February 15, 2022 08:11
This script creates an "Uber Delete" button in the context menu. It will delete pesky files that does not want to be deleted.
#Advanced check if user is administrator. It elevates the powershell to one with administrator privileges if not admin
# Get the ID and security principal of the current user account
$myWindowsID = [System.Security.Principal.WindowsIdentity]::GetCurrent()
$myWindowsPrincipal = New-Object System.Security.Principal.WindowsPrincipal($myWindowsID)
# Get the security principal for the administrator role
$adminRole = [System.Security.Principal.WindowsBuiltInRole]::Administrator
# Check to see if we are currently running as an administrator
@Damperen
Damperen / Set-DarkSSMS.ps1
Created February 15, 2022 08:07
Enable the option Dark mode in SSMS
$path = 'C:\Program Files (x86)\Microsoft SQL Server Management Studio 18\Common7\IDE\ssms.pkgundef'
$theme = '[$RootKey$\Themes\{1ded0138-47ce-435e-84ef-9ec1f439b749}]'
(Get-Content $path).replace($theme, "// $theme") | Out-File $path
@Damperen
Damperen / DarkMessenger-Hotfixes.user.js
Last active July 30, 2023 14:52
The continuation of my former script NativeDarkMessenger.user.js, and since it is doing a bit more than "Native Dark mode", I decided to separate them, and will most likely only work on this. For now it only removes some (in my opinion) really annoying functionality regarding videos, in the future other hotfixes might be added.
// ==UserScript==
// @name Dark Messenger and hotfixes
// @namespace https://github.com/Damperen
// @version 2.1.8
// @description Dark mode for Messenger and normalized videos
// @author https://github.com/Damperen
// @match https://www.messenger.com/*
// @grant none
// @run-at document-idle
// @icon https://i.imgur.com/VNn3FEX.png
@Damperen
Damperen / NativeDarkMessenger.user.js
Last active January 3, 2024 12:18
Dark mode for messenger.com, the code is already there as you can see. Facebook just haven't gotten around to implementing it in the UI yet..
// ==UserScript==
// @name Native Dark Messenger
// @namespace https://github.com/Damperen
// @version 1.9.5
// @description Almost Native dark mode for Messenger
// @author https://github.com/Damperen
// @match https://www.messenger.com/*
// @grant none
// @run-at document-idle
// @icon https://i.imgur.com/VNn3FEX.png