Fedora 23: Ansible util.am_i_root():NameError: global name 'util' is not defined

If you see a similar error message as the following when running Ansible on a Fedora 23 machines, there is an easy fix. It is very likely that a package “python2-dnf” is missing. This package is required for Python script to interact with DNF package manager. There is a good article available at fedoramagazine.org about running Ansible on Fedora 23. (I only found this later, and it’s very informative.)

February 28, 2016 · 1 min · 69 words · kenno

Mouse not working in Xorg on FreeBSD

After installing Mate desktop environment on a fresh FreeBSD 10.2 box, mouse was not working. This is what I have in my /etc/rc.conf: ... moused_enable="YES" hald_enable="YES" dbus_enable="YES" Some suggests that the order of hald and dbus to be swapped around. I tried that, and it still didn’t work. A bit of more Googlings, I found out a working solution [1]. I need to install: xf86-input-mouse. Here’s how I did it: # portmaster x11/drivers/xf86-input-mouse And that was all required. If your keyboard is not working in Xorg, you might want to also install xf86-input-keyboard. ...

February 19, 2016 · 1 min · 105 words · kenno

Upgrading STM32F4-Discovery Firmware on Linux

Not too long ago, upgrading firmware on STM32F4-Discovery board required it to be performed on a Windows machine. That annoyed the heck a lot of people, myself included. There’s a very good news for Linux and Mac users. Now, you can do it from your favorite OSes. Since I’m so excited about this, here’s a short article on how to do just that. First download “STSW-LINK007” from <www.st.com/web/en/catalog/tools/PF260217>. At the time of this writing the file is called: stsw-link007.zip. ...

January 25, 2016 · 1 min · 210 words · kenno

PostgreSQL: Drop a database which has a hyphen in name

Normally to drop a database in PostgreSQL, we can just type: DROP DATABASE database; Here’s a list of my current databases: postgres=# \l List of databases Name | Owner | Encoding | Collate | Ctype | Access privileges -------------+-----------+----------+-------------+-------------+----------------------- dashboard | dashboard | UTF8 | en_US.UTF-8 | en_US.UTF-8 | postgres | postgres | UTF8 | en_US.UTF-8 | en_US.UTF-8 | postgres-db | postgres | UTF8 | en_US.UTF8 | en_US.UTF8 | puppetdb | puppetdb | UTF8 | en_US.UTF8 | en_US.UTF8 | template0 | postgres | UTF8 | en_US.UTF-8 | en_US.UTF-8 | =c/postgres + | | | | | postgres=CTc/postgres template1 | postgres | UTF8 | en_US.UTF-8 | en_US.UTF-8 | =c/postgres + | | | | | postgres=CTc/postgres (6 rows) I want to drop a database named postgres-db. So, let’s try to drop it: ...

January 22, 2016 · 1 min · 185 words · kenno

Docker with OverlayFS on Ubuntu 15.10

As of today, the default storage for Docker on (K)Ubuntu 15.10 is AUFS. I want to switch it to OverlayFS. Personally, I’m still new to Docker, but I did hear that OverlayFS is better than AUFS. You can read more about OverlayFS here. Anyway, the purpose of this post is how to switch OverlayFS and avoid head-scratching. On Ubuntu 15.10 (wily), one can start/stop services either using Upstart or systemd. Since I want to get more accustomed to using systemd, I’ve been trying to use it anywhere possible. For example, here’s the command to start docker: ...

December 26, 2015 · 2 min · 366 words · kenno