Skip to content

Instantly share code, notes, and snippets.

View codywilliamson's full-sized avatar
🙌

Cody codywilliamson

🙌
View GitHub Profile
@codywilliamson
codywilliamson / Repair-Bluetooth.ps1
Created April 1, 2026 04:29
Idempotent PowerShell script to fix Windows Bluetooth conflicts caused by having an onboard Intel adapter and a USB dongle (e.g. TP-Link) active simultaneously. Suppresses the Intel adapter, cycles the driver stack via PnPUtil, clears the pairing cache, and restarts all BT services. Run with -Register to install as a SYSTEM startup task with a 3…
#Requires -RunAsAdministrator
<#
.SYNOPSIS
Idempotent Bluetooth troubleshooting and remediation script.
.DESCRIPTION
Performs a full Bluetooth stack reset: suppresses conflicting onboard Intel
adapter, stops services, removes paired device registry entries, cycles adapter
power, reinstalls drivers via PnPUtil, and restarts the stack. Safe to run
multiple times. Designed for the onboard Intel + TP-Link USB dongle conflict.
#!/bin/bash
# A script to install and configure keyd on Linux Mint (and other Ubuntu-based distros)
# to remap Caps Lock + IJKL to arrow keys, plus text editing keys.
#
# To run:
# 1. Save this as "install_keyd_arrows.sh"
# 2. chmod +x install_keyd_arrows.sh
# 3. sudo ./install_keyd_arrows.sh
@codywilliamson
codywilliamson / Clear-TeamsCache.ps1
Created September 22, 2023 14:21
Clear Teams' cache & optionally persist settings
function Clear-TeamsCache {
[CmdletBinding(SupportsShouldProcess = $true)]
param (
# Determine if settings should persist after clearing cache
[Parameter()]
[switch]
$PersistSettings
)
begin {
@codywilliamson
codywilliamson / MapParentToChild.cs
Created March 9, 2022 18:23
Map a generic parent object to its child
/// <summary>
/// Maps a parent object to a child object. <br></br>
/// </summary>
/// <typeparam name="T">Generic Type of the Parent Object</typeparam>
/// <typeparam name="U">Generic Type of the Child Object</typeparam>
/// <param name="parent">Parent Object</param>
/// <param name="child">Child Object</param>
/// <returns>U Child object</returns>
public U MapParentToChild<T, U>(T parent, U child)
{