Thursday, July 2, 2020

Convert Microsoft LDAP ObjectGuid from base64 to Python UUID

I needed to convert an objectGuid from Microsoft AD which was provided to me in base64. What I did not know is the Microsoft uses little-endian UUIDs instead of big-endian like the rest of world uses. This caused issues trying to convert the binary to UUID. Luckily, Python's UUID has bytes_le (little-endian) just for this use case.

Blogging this for the future.

Monday, April 20, 2020

Python FizzBuzz

I watched Tom Scott's One Simple Interview Question on YouTube earlier and decided take a stab at a flexible implementation of FizzBuzz.

Thursday, January 2, 2020

Moto X4 on Google FI - Microphone Muffled / Bad - Possible Fix

I've been having people complain they cannot hear me or that I sound extremely muffled when I making phone calls on my Moto X4. I confirmed it was definitely the phone because I tested it with a wired headphones/microphone without issues.

Many forums suggest returning the device as a RMA. This really isn't an option for my nearly 2 year old phone which is out of warranty. One interesting comment I read was related to the position of the microphone holes -- one of which is very near the fingerprint reader. My phone is always in a case, so the rear microphone hole seemed clear but the front microphone hole seemed slightly dirty.

The phone is rated IP68 which allows for submersion in water for 1 hour up to 1 meter. Since my next option was to buy a new phone, I decided to put the IP68 rating to the test.

Of course, what I did next -- only do at your own risk. I am not responsible for anything you decide to do to your own phone.

With 100% rubbing alcohol, I cleaned out the microphone holes with a cotton swab and let dry. Using a recording app, the sounds was marginally better.   More drops of alcohol but this time I used an electric toothbrush to vibrate all the junk which was more than I expected (ick).

Voila, things sounded 100% better and I no longer need a new phone!


Moto X4 on Google FI - Enable RCS Messages

On my Moto X4 (Google FI), I couldn't enable RCS messages in the Messages application as it was stuck "verifying" my phone number. After a bunch of support forums, this is the procedure that ultimately worked for me.
  1. Turn on Airplane mode.
  2. Open the Settings -> Apps & notifications.
    1. If you don't see all your apps, first tap See all apps or App info.
    2. At the top right, tap More More and then Show system.
  3. Find the Carrier Services app.
    1. Tap Force stop and confirm.
    2. Tap Storage and then Clear data.
  4. Go back to the "App info" screen and find the Messages app.
    1. Tap Force stop and confirm
    2.  Tap Storage and then Clear data.
  5. Turn off Airplane mode.
  6. Open Messages and checked the settings, it should said "Connected - Chat features are ready for use".
I'm blogging this so I don't forget the process if this ever comes up in the future.