Installing Pip with Python 3.5 on FreeBSD

Here is a quick note serves as a self-reminder on how to get pip working or installed on FreeBSD 10.3. First, ensure that Python 3 package is installed. Python 3 is provided by python35 package. # pkg install python35 However, there is no package for pip, at least at the time of this writing, on FreeBSD. To have it installed, run the following command: # python3.5 -m ensurepip We should as well update pip to new version:...

May 6, 2016 · 1 min · 84 words · kenno

How to renew DHCP lease with NetworkManager

Traditionally, we use dhclient to release and renew DHCP lease on Linux. It probably still work with modern Linux distros nowadays. However, most distros come with NetworkManager which provides nmcli command line interface to manage networking. Here’s how to renew DHCP lease using nmcli performing on my machine. Your output when running these commands could be different. First, let’s list the connections managed by NetworkManager. # nmcli con NAME UUID TYPE DEVICE virbr0 2c2c7c4f-15e9-439b-be1d-e1d0131fb41c bridge virbr0 Wired connection 1 5c9000c5-2635-4b09-90d7-71c3783c6626 802-3-ethernet enp0s25 enp0s25 70ee0b94-8341-46ec-953d-f2c3ca34285a 802-3-ethernet -- virbr0-nic aafaa95e-6ced-4ea9-bd4f-7c8d10fb51b6 generic virbr0-nic Next, we can find out the current IP associated with enp0s25 by running command:...

March 17, 2016 · 1 min · 208 words · kenno

របៀបប្តូរ​ time zone ពីខំម៉ាន​ឡាញ​ក្នុង​អ៊ូប៊ុនធូ

ថ្ងៃ​នេះ ខ្ញុំ​បានទទួល Odroid-C2 ដែល​បាន​ទិញ​ពី​ Hardkernel កាលពីអាទិត្យ​មុន។ OS ដែល​អាច​ដើរលើ​វាបាន ​ក្នុង​ពេលនេះ​​ មាន​តែ Ubuntu Mate 16.04 LTS ដែល​ជាបេតា នៅឡើយ។ Time zone ដែល​មាន​ស្រាប់ជាដើម​គឺ EST (American Eastern Standard Time)។​ ខ្ញុំ​ត្រូវការ AEST (Australian Eastern Standard Time) ព្រោះខ្ញុំ​នៅ​ស៊ីដនី។ នេះ​ជាខំម៉ាន​ដែល​អាចប្តូរ Time zone បាន ដោយ​វាយ ពី ធើរមិណល់។ មុន​ដំបូង ឆែក​មើលមុនសិន៖ odroid64:~# date Fri Mar 11 08:13:04 EST 2016 ប្រើខំមាន នេះ​ដើម្បី​ប្តូរ​ time zone៖ odroid64:~# dpkg-reconfigure tzdata ជ្រើសយក​ប្រទេស រួច​ទីក្រុង។​ នេះជាលទ្ធផល៖ Current default time zone: 'Australia/Sydney' Local time is now: Sat Mar 12 00:13:57 AEDT 2016....

March 11, 2016 · 1 min · 85 words · kenno

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:...

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....

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....

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....

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

Puppet service resource provider

Well, first of all I think the title of this post won’t entirely reflect its content. However, I need to go ahead and post this now. At work, We’ve been having issues with cups service not running on some Kubuntu 14.04 desktops. This should not happen since even if cups service is dead, we have Puppet agent running on each machine to check and make sure that ‘cups’ is running else will be automatically restarted....

December 16, 2015 · 2 min · 278 words · kenno

ZFS zpool upgrade

I’m running ZFS on Fedora 23 and I notice that there’re new features which can be enabled in the existing pool. Get the ZFS version for tank’s pool: Huh? I’m not sure why there’s no value set on ZFS running on Linux. Well, let’s upgrade the pool: It seems to have been successfully upgraded. Let’s verify: Ref: http://freebsd.pro/topic/12/

December 14, 2015 · 1 min · 58 words · kenno