Skip to content

Instantly share code, notes, and snippets.

View marvinlehmann's full-sized avatar

Marvin Lehmann marvinlehmann

View GitHub Profile
@marvinlehmann
marvinlehmann / powershell-wol.md
Created October 26, 2022 14:58
How to enable Wake-On-Lan on Windows 10 using PowerShell

Settings for Wake-On-Lan

0. Enabling it in BIOS/UEFI

1. Disabling fast startup and/or hibernation

Turning off fast startup:

New-ItemProperty "HKLM:\SYSTEM\CurrentControlSet\Control\Session Manager\Power" -Name HiberbootEnabled -PropertyType DWord -Value 0 -Force

Disabling hibernation, which disables fast startup too (?): POWERCFG /HIBERNATE OFF

@marvinlehmann
marvinlehmann / teyvat-marker-quick-hide.user.js
Last active August 11, 2021 21:22
teyvat-marker-quick-hide.user.js
// ==UserScript==
// @name Teyvat Marker Quick Hide
// @namespace https://github.com/marvinlehmann
// @version 0.1
// @description Hide markers using right click
// @author Marvin Lehmann
// @match https://webstatic-sea.mihoyo.com/app/ys-map-sea/index.html*
// @icon https://www.google.com/s2/favicons?domain=mihoyo.com
// @grant none
// @run-at document-start
# 2019-03-21 : Marvin Lehmann (marvinlehmann)
## Self elevation code
# Source: https://stackoverflow.com/questions/7690994/powershell-running-a-command-as-administrator
# 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
# 2018-06-06 : Marvin Lehmann (marvinlehmann)
## Self elevation code
# Source: https://stackoverflow.com/questions/7690994/powershell-running-a-command-as-administrator
# 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