Skip to content

Instantly share code, notes, and snippets.

View bender-the-greatest's full-sized avatar

bender-the-greatest

  • CSG International
  • Omaha, NE
View GitHub Profile
@bender-the-greatest
bender-the-greatest / Invoke-Executable.ps1
Last active August 18, 2025 04:36
Invoke an external command and check the result
function Invoke-Executable {
[CmdletBinding()]
Param(
[Parameter(Mandatory, Position=0)]
[string]$Command,
[Parameter(Position=1, ValueFromRemainingArguments)]
[string[]]$Arguments,
[int[]]$ExitCode = 0
)
@bender-the-greatest
bender-the-greatest / Set-XInputMouseProfile.ps1
Created January 18, 2021 20:14
Script to adjust Xinput mouse settings. Designed for using around event-based triggers, such as xbindkeys. Currently only supports adjusting the mouse speed.
#!/usr/bin/env pwsh
<#
.SYNOPSIS
Script to adjust Xinput mouse settings. Designed for using around event-based triggers, such as xbindkeys.
.DESCRIPTION
Changes certain Xinput mouse settings. Currently only supports adjusting the mouse speed. Leans on the `xinput`
command to read and apply Xinput configurations. A high-level explanation of which settings are changed for
each operation can be found further on in the description.