Skip to content

Instantly share code, notes, and snippets.

@HollisTech
HollisTech / debuggerHelpers.ps1
Created April 11, 2023 17:30
Windbg helpers for powershell
Function Get-KitRoot {
param(
[string]$altRoot="C:\Program Files (x86)\Windows Kits\10\"
)
try {
Get-ItemPropertyValue "HKLM:\SOFTWARE\Microsoft\Windows Kits\Installed Roots\" -Name "KitsRoot10"
}
catch {
if (Test-Path -Path $altRoot -PathType Container)
{
@HollisTech
HollisTech / top.ps1
Last active February 10, 2023 16:53
Linux Top for Windows - powershell
function top {
if ($host -and $host.UI.SupportsVirtualTerminal) {
Clear-Host
$lines = $Host.UI.RawUI.WindowSize.Height
$cols = $Host.UI.RawUI.WindowSize.Width
[int]$min = 10
$topCount = ($lines - $min)
if ($lines -le $min) {
$topCount = $lines
}
@HollisTech
HollisTech / espdecode.ps1
Created December 18, 2019 16:12
espdecode: decode raw esp32 backtrace data from a log file. Requires PlatformIO.
<#
.SYNOPSIS
Decode raw esp32 backtraces in a log file.
Requires PlatformIO build environment.
.DESCRIPTION
Capture a log file with raw 'Backtrace:' data and pass it to this script.
The script filters the file, replacing the raw backtrace entries with decoded entries.
The filtered data is written to stdout.