Skip to content

Instantly share code, notes, and snippets.

@Nightblade
Nightblade / KeyboardClean.ahk
Last active February 24, 2025 02:44
Block keyboard input so you can clean it while it's plugged in.
#Requires AutoHotkey v2
/*
KeyboardClean.ahk
------------------
Temporarily disables keyboard input to allow cleaning while plugged in.
Version History:
v2.2 - 2025-02-24 (Re-enable keyboard on exit as a precaution)
v2.1 - 2025-02-22 (Merged enable/disable functions into a toggle)
v2.0 - 2025-01-14
@Nightblade
Nightblade / Optimize-PSReadLineHistory.ps1
Last active December 1, 2024 06:05 — forked from jdhitsolutions/Optimize-PSReadLineHistory.ps1
A PowerShell command to trim the command history file used by PSReadline
#requires -version 5.0
#requires -module PSReadline
Function Optimize-PSReadLineHistory {
<#
.SYNOPSIS
Optimize the PSReadline history file
.DESCRIPTION
The PSReadline module can maintain a persistent command-line history. However, there are no provisions for managing the file. When the file gets very large, performance starting PowerShell can be affected. This command will trim the history file to a specified length as well as removing any duplicate entries.
@Nightblade
Nightblade / test.asciidoc.txt
Last active October 11, 2023 09:46
A sample AsciiDoc file for testing Asciidoctor.
Asciidoctor Demo
================
////
Big ol' comment
sittin' right 'tween this here title 'n header metadata
////
Dan Allen <[email protected]>
:description: A demo of Asciidoctor. This document +
exercises numerous features of AsciiDoc +