Skip to content

Instantly share code, notes, and snippets.

View toksikk's full-sized avatar

Daniel Aberger toksikk

View GitHub Profile
@toksikk
toksikk / check_lancache.ps1
Created December 19, 2022 17:57
small powershell script to check a local lancache resolver
# Define the script parameters
param (
[string]$FilePath = "C:\path\to\hostname\list.txt",
[string]$IPAddress = "10.13.37.160"
)
# Read the list of hostnames from the file
$hostnames = Get-Content -Path $FilePath
# Iterate over each hostname in the list
@toksikk
toksikk / switch_powerplan_context_menu.reg
Created November 20, 2022 14:56
Switch Power Plan from powercfg /l via Desktop Right-Click Menu
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\DesktopBackground\Shell\SwitchPowerScheme]
"Icon"="powercpl.dll"
"MUIVerb"="Switch Power Plan"
"Position"="Middle"
"SubCommands"=""
[HKEY_CLASSES_ROOT\DesktopBackground\Shell\SwitchPowerScheme\Shell]
@toksikk
toksikk / fix-creation-time.ps1
Created July 11, 2022 16:56
I had a tool that did not write EXIF data to jpg files so I wrote this small Powershell script to use the file names that were conveniently creation dates in unix millisecond timestamps.
Add-Type -AssemblyName System.Drawing
$imageSourcePath = Get-Location
$files = Get-ChildItem -Path $imageSourcePath -filter *.jpg
$numFiles = $files.Count
[Int32]$counter = 0
foreach ($file in $files) {
$takenDateUNIXMilli = $file.BaseName
### Keybase proof
I hereby claim:
* I am toksikk on github.
* I am toksikk (https://keybase.io/toksikk) on keybase.
* I have a public key ASCjlaoGJK97T1kQF1zdQU96miyDWbUmefrPenX3Bua3HAo
To claim this, I am signing this object: