Blog / Tech

Error Message: “Peer authentication failed for user ‘username’” when connecting to a PostgreSQL database from a Django application

December 4, 2012

Error Message:

psycopg2.OperationalError: FATAL: Peer authentication failed for user “username”

I was setting up a friend’s project on my Ubuntu 12.04 laptop last night and ran into this database connection problem when I tried to ran his Django application.

There are actually 2 solutions to this problem:

Solution 1:

In your settings.py file, in the database settings, set the ‘HOST’ to ‘localhost’ instead of an empty string.

Solution 2:

Modify the /etc/postgresql/9.1/main/pg_hba.conf file and change …

How to install the Ubuntu 12.04 ‘Sputnik’ image on your Dell XPS 13 Ultrabook

December 3, 2012

I got my new Dell XPS 13 Ultrabook a couple of weeks ago with the Windows 8 OS pre-installed. One of the main reasons I got this laptop was because of Project Sputnik, Dell’s attempt to build an Ubuntu-based developer laptop by working with Canonical.

I was waiting for Project Sputnik to finish before putting Ubuntu on it. About 3 days ago Dell finally announced that the developer edition of the XPS 13 …

Error Message: “Failed to create the SD card” when creating a new AVD on Ubuntu 12.04

December 2, 2012

Error Message:

Failed to create the SD card.

Failed to create sdcard in the AVD folder.

Just ran into this issue while I was setting up my Android development environment on my new laptop running Ubuntu Linux 12.04. I’m currently using the 64-bit build and it turned out that the ia32-libs package is not installed by default.

Installing this package fixes the issue:

sudo apt-get install ia32-libs

3D Printing Will Change Everything

October 9, 2012

I’ve been seeing a lot of talks about 3D printing lately. This got me curious so I decided to do some research about it.

I didn’t find it that interesting at first, but after I watched this TED talk, I was convinced that 3D printing could really change the world:

Apparently, 3D printing technology had been around since the 1980s. We just didn’t hear much about it until recently because they were inefficient, big, and …

Easily change proxy configurations in Google Chrome with the Proxy Switchy! extension

September 18, 2012

Lately, I’ve been finding myself needing to change my proxy configuration quite a bit and started to get annoyed with all the steps I had to do.

The reason I needed to change my settings so much is that I needed to SSH Tunnel to my Rackspace Server in the US so I could use services such as Pandora and Hulu, which don’t allow streaming if they detect non-US IP addresses (I’m currently in …