Skip to content

Instantly share code, notes, and snippets.

@mkem114
mkem114 / README.md
Created April 11, 2023 23:24
Fixing bluetooth/BT headphones only outputting Halo MCC (Master Chief Collection) on Windows 11 22H2

Background

I noticed that it would just output nothing or only output the sound from Halo MCC and I wasn't able to thus hear anything from Discord with my bluetooth headset

Fix

  1. Open Settings app
  2. Open "Bluetooth & devices" tab
  3. Click "View more devices" expand
  4. Scroll to very bottom
  5. Click "More devices and printer settings"
  6. Right-click on the bluetooth device
#!/usr/bin/perl
use v5.10;
use strict;
use warnings;
use lib qw(/opt/otrs /opt/otrs/Kernel/cpan-lib);
use Kernel::Config::Files::ZZZAAuto;
@vortexau
vortexau / decompress.ps1
Last active May 13, 2024 07:53
Powershell to decompress DEFLATE data
$base64data = "insert compressed and base64 data here"
$data = [System.Convert]::FromBase64String($base64data)
$ms = New-Object System.IO.MemoryStream
$ms.Write($data, 0, $data.Length)
$ms.Seek(0,0) | Out-Null
$sr = New-Object System.IO.StreamReader(New-Object System.IO.Compression.DeflateStream($ms, [System.IO.Compression.CompressionMode]::Decompress))
while ($line = $sr.ReadLine()) {

Prerequisites

You'll need to have a system running that is accessible through a DNS record. It should have access to the public Habitat depot, https://app.habitat.sh so it can download the required packages.

You'll need to register an OAuth application for GitHub. You need the client ID and client secret that are created for the application later in this guide. Your system needs to have access to https://github.com so that it can authenticate.

Your system also needs to have an FQDN that can be resolved, for example depot.example.com. This will be used in your OAuth application's "Authorization Callback URL." For this example, use http://depot.example.com/#/sign-in. The /#/sign-in is required.

Operating System

@lyoshenka
lyoshenka / search-git-history.md
Last active April 26, 2024 23:16
Search Git commit history for a string and see the diffs

Searching Git commit history

This should be one of the core features of Git, but for some reason it's impossible to figure out how to search for a string in your commit history and see the diffs that that string is in. Here's the best I've come up with:

To find which commits and which files a string was added or removed in:

git log -S'search string' --oneline --name-status

To see the diff of that

@jstangroome
jstangroome / Get-RemoteSSLCertificate.ps1
Last active June 12, 2024 16:09
PowerShell script to retrieve the public X509 certificate from a remote TLS endpoint
[CmdletBinding()]
param (
[Parameter(Mandatory=$true)]
[string]
$ComputerName,
[int]
$Port = 443
)