Blog / Tech

How to connect an Xbox One S controller via Bluetooth in Pop!_OS 18.04 (Ubuntu 18.04)

September 22, 2019

In Pop!_OS 18.04 (which is based on Ubuntu), connecting an Xbox One S controller via USB works out of the box and detected by Steam automatically. No additional steps necessary. I've been gaming mostly on my laptop so I've just being using a USB cable so I won't have to think about batteries.

However, I've recently moved to a new AirBnB with a nice big screen TV so I wanted to try it out and …

Easily convert XML data to a Python dict with xmltodict

September 1, 2019

I hate working with XML mainly because I find it difficult to read.

There's a popular Python package for parsing XML called lxml which is very flexible, but I found xmltodict much better suited and easier to use for what I needed to do.

We have a inventory management app for Shopify, EZ Inventory, and one of the features we've added recently is XML support. We have a few customers whose suppliers can only …

Gaming on Linux

July 28, 2019

I just finished playing Final Fantasy XII: The Zodiac Age on Linux. In the 70 hours of playtime, the game ran flawlessly. I couldn't recall a single crash or slowdown.

And guess what? There is no native Linux port of this game! I played the Windows version on Linux thanks to Proton and Steam Play. No special tweaking required, just click "Install" and "Play." My Xbox One S controller was detected automatically, it feels …

Dealing with datetime objects and time zones in Python 3

June 29, 2019

Working with datetime objects and time zones is one of those things I always struggle with when writing code in Python. I always have to look things up and double check the outputs (such as making sure daylight savings time was taken into account) to make sure I'm doing things correctly.

This blog post is really more of a reference for myself when making adjustments to datetime objects that involve time zones so I won't …

How to reset the primary key sequence in PostgreSQL with Django

March 19, 2019

I was working on some fairly big features involving new Django models for one of our apps and when I pushed to our staging environment, I got this error during deployment at the database migration step:

duplicate key value violates unique constraint "auth_permission_pkey" DETAIL: Key (id)=(55) already exists

It looks like new records were getting added to the auth_permission table. I was puzzled as I didn't make any changes related to the Django auth app. …