Skip to content

Instantly share code, notes, and snippets.

@emabrey
emabrey / wsl_copy_ssh_keys.sh
Last active August 31, 2024 15:55
WSL SSH Key Copier
#!/bin/bash
#enable nullglob on startup if not enabled
shopt -q nullglob || shopt -s nullglob;
# Turns the given value into an array and verifies that the array has more than zero elements
# to check if the globbed file directory given exists
# requires nullglob to be or it will enable/disable during the function execution
glob_exists() {
shopt -q nullglob || (echo "nullglob must be enabled for glob_exists to work." && return 1);
@emabrey
emabrey / userChrome.css
Created August 11, 2021 05:45
Return tab lines to Firefox 91
.tabbrowser-tab:not([selected=true]):not([multiselected=true]):not([beforeselected-visible="true"]) .tab-background {
border-right: 1px solid var(--lwt-background-tab-separator-color, rgba(0, 0, 0, .20)) !important;
}
@emabrey
emabrey / wireless_cap_mod.ps1
Created November 16, 2024 00:49
Script to remove TP-Link Wireless USB Device from Eject Hardware Menu
param([switch]$Elevated)
function Test-Admin {
$currentUser = New-Object Security.Principal.WindowsPrincipal $([Security.Principal.WindowsIdentity]::GetCurrent())
$currentUser.IsInRole([Security.Principal.WindowsBuiltinRole]::Administrator)
}
function Log-Info ($msg, $color = "Blue") {
if($host.UI.RawUI.ForegroundColor -ne $null) {
Write-Host "`n[$([datetime]::Now.ToLongTimeString())] $msg" -ForegroundColor $color -BackgroundColor "Gray"