Skip to content

Instantly share code, notes, and snippets.

View JamesDBartlett3's full-sized avatar

James D. Bartlett III JamesDBartlett3

View GitHub Profile
@JamesDBartlett3
JamesDBartlett3 / Outfitting Search Multi-Column Sort - Inara.cz Elite Dangerous.user.js
Last active May 10, 2025 02:20
Adds multi-column sorting to the Outfitting Search page on Inara.cz
// ==UserScript==
// @name Outfitting Search Multi-Column Sort | Inara.cz Elite Dangerous
// @namespace http://tampermonkey.net/
// @version 2025-05-07
// @description Adds multi-column sorting to the Outfitting Search page on Inara.cz
// @author JamesDBartlett3
// @match https://inara.cz/elite/nearest-outfitting/*
// @icon https://www.google.com/s2/favicons?sz=64&domain=inara.cz
// @grant none
// ==/UserScript==
@JamesDBartlett3
JamesDBartlett3 / Jules Vector.4.2.binds
Last active August 20, 2025 05:03
Elite: Dangerous - XBox Controller Bindings
<?xml version="1.0" encoding="UTF-8" ?>
<Root PresetName="Jules Vector" MajorVersion="4" MinorVersion="2">
<KeyboardLayout>en-US</KeyboardLayout>
<MouseXMode Value="" />
<MouseXDecay Value="0" />
<MouseYMode Value="" />
<MouseYDecay Value="0" />
<MouseReset>
<Primary Device="{NoDevice}" Key="" />
<Secondary Device="{NoDevice}" Key="" />
@JamesDBartlett3
JamesDBartlett3 / MSBuild2023_HideChat.userstyle.css
Last active May 24, 2023 17:23
Hides the Chat window on the Microsoft Build 2023 website
/* ==UserStyle==
@name Microsoft Build 2023 - Hide Chat
@version 20230524.16.47
@namespace ?
==/UserStyle== */
@-moz-document domain("build.microsoft.com") {
#studioplayer-container > div > div.home-page__live-stream--content__video {
width: 100%;
@JamesDBartlett3
JamesDBartlett3 / PowerBIGlobalSummit_ResizableVideoModalWindow.user.css
Last active March 7, 2023 02:57
Power BI Global Summit - Resizable Video Modal Window
@-moz-document url-prefix("https://radacad.6connex.com/event/") {
.related-content .self-content .screen-container {
width: 100% !important;
min-height: 600px !important;
max-height: 1024px !important;
margin-bottom: 6px !important;
height: 100% !important;
}
@JamesDBartlett3
JamesDBartlett3 / Set-WindowState.ps1
Last active November 30, 2022 20:35 — forked from lalibi/Set-WindowState.ps1
Hide, Show, Minimize, Maximize, etc. any application window from PowerShell.
# WARNING: NON-WORKING CODE - DO NOT USE IN PRODUCTION!
#TODO: Implement $AppName & $MainWindowHandle parameters
function Set-WindowState {
<#
.SYNOPSIS
Set a given window state using WinAPI.
.DESCRIPTION
Use the ShowWindowAsync function to set the Window state for
@JamesDBartlett3
JamesDBartlett3 / DevMachineSetup.ps1
Last active October 7, 2022 01:59 — forked from codebytes/DevMachineSetup.ps1
DevMachineSetup
# To download and install, run this command in PowerShell:
# PowerShell -NoProfile -ExecutionPolicy Bypass -Command "iex ((New-Object System.Net.WebClient).DownloadString('https://gist.githubusercontent.com/JamesDBartlett3/40d4459e39402cbc30a73731e310a27c/raw/'))"
#Install WinGet
#Based on this gist: https://gist.github.com/Codebytes/29bf18015f6e93fca9421df73c6e512c
$hasPackageManager = Get-AppPackage -name 'Microsoft.DesktopAppInstaller'
if (!$hasPackageManager -or [version]$hasPackageManager.Version -lt [version]"1.10.0.0") {
"Installing winget Dependencies"
Add-AppxPackage -Path 'https://aka.ms/Microsoft.VCLibs.x64.14.00.Desktop.appx'
@JamesDBartlett3
JamesDBartlett3 / ErgoM4u5_EZ.xmbcp
Last active July 18, 2022 17:14
X-Mouse Button Control Config: Buttons 4 & 5 serve as momentary toggles to layers 2 & 3 respectively. Layer 2 is for window management (move, resize, zoom, and close). Layer 3 is for Virtual Desktop management (task view, new, close, left, and right) [Inspired by the momentary layer toggles on my ErgoDoxEZ mechanical keyboard]
<?xml version="1.0"?>
<root>
<version major="2" minor="19" revision="2" build="0" />
<OfficeMouse Enable="false" />
<Layers Number="3" />
<Cursor Allow="true" Speed="6" CS1="6" CS2="7" CS3="10" CS4="2" ChangeLayer="true" ChangeChord="1" ChangeHeld="1" EnhancePointerPrecision="1" />
<Logging Disable="false" Thread="false" />
<RazorMouse DoubleClickFix="false" />
<ScrollWheel ScrollWindowUnderCursor="true" />
<ScrollLock BypassAll="true" BypassDisabled="false" />
@JamesDBartlett3
JamesDBartlett3 / JDB3_PS_Functions_and_Aliases.ps1
Created May 12, 2022 15:15
Custom PowerShell Functions and Aliases
<#
Custom PowerShell Functions and Aliases
Author: @JamesDBartlett3
#>
##################################################################################################
<#
Stop-ProcessName
Alias: spn
Example 1: Stop-ProcessName explorer
@JamesDBartlett3
JamesDBartlett3 / Convert-YouTube-Audio-to-Mono.js
Last active May 9, 2025 11:53
Force YouTube Audio to Play on Both Speakers [JavaScript]
/********************************************************************************************************************************\
# Description
- Some videos on YouTube have a problem where the sound only comes out of the left or right channel
- This happens when the person who edits the video forgets to convert any mono audio signals to stereo before rendering
- Run this JavaScript snippet in your web browser to make YouTube play stereo audio as mono (same audio signal on all channels)
# How To Use
- Method 1 (best): Copy/paste into "Custom script" box in "Enhancer for YouTube™ (download & instructions: bit.ly/3GmQgZC)
- Method 2: Install as a UserScript using Tampermonkey, Greasemonkey, etc. (download & instructions: bit.ly/3K6B991)
@JamesDBartlett3
JamesDBartlett3 / Get-FolderHash.ps1
Created November 18, 2021 18:26
Get-FolderHash -- a PowerShell function for computing the SHA1 hash of an entire folder's contents
# Source: https://social.technet.microsoft.com/Forums/en-US/2e7db624-2260-4a65-a57b-f6f2e22312f0/sha1-hash-of-an-entire-folder-structure
Function Get-FolderHash ($folder) {
Get-ChildItem $folder -Recurse |
Where-Object {!$_.psiscontainer} |
ForEach-Object {[Byte[]]$contents += [System.IO.File]::ReadAllBytes($_.fullname)}
$hasher = [System.Security.Cryptography.SHA1]::Create()
[string]::Join("",$($hasher.ComputeHash($contents) | ForEach-Object {"{0:x2}" -f $_}))
}