Skip to content

Instantly share code, notes, and snippets.

View forkata's full-sized avatar

Chris Todorov forkata

View GitHub Profile
@curz46
curz46 / XM3-GUIDE.md
Last active May 16, 2025 13:54
Sony WH-1000XM3 Headphones not working on Windows?

Edit: This method usually works but there is an easier way explained by @Instinctlol in the comments below. You might want to try that way first!

Introduction

When I first got these headphones they worked perfectly with my phone but trying to get them to connect to my Windows pc seemed hopeless. In my case, they paired & pressing 'connect' showed the headphones as connected, but the audio device was disabled & disconnected in sound settings. I later realised that they instantly connected & worked properly with my newer laptop, so the following guide was produced by imitating the setup my laptop automatically configured. This is something you should only have to do once when initially pairing the device.

Method

  1. First ensure that you are attempting to pair the device as WH-1000XM3 and not LE_WH-1000XM3. I'm not sure what the latter is for but it will not let you connect/play s
@ericgross
ericgross / 20230517213020_create_rls_functions.rb
Created May 20, 2023 23:07
Enabling multi-tenant Solidus using RLS on Postgres
class CreateRlsFunctions < ActiveRecord::Migration[7.0]
def self.up
connection.execute <<-SQL
-- This function returns the id of the current user or NULL if not set
-- this varaible is set on a connection basis before every action
-- If it is not set, it will return NULL and all non-public tables will seem empty.
CREATE FUNCTION current_user_id() RETURNS BIGINT AS $$
SELECT NULLIF(current_setting('rls.user_id', TRUE), '')::BIGINT;
$$ LANGUAGE sql SECURITY DEFINER STABLE COST 10;
-- This function returns the id of the current tenant or NULL if not set
#!/usr/bin/env ruby
# Place in your project (don't forget to chmod +x):
# bin/autoload-check
# Allow these files to be fixed later
allowlist = [
"ExampleClass" # why?
]