Gentoo Eix Tool

A utility that I use quite a lot on a Gentoo system is called eix. This tool allows me to search for packages by name and list all available flags. The document on the Gentoo Wiki is great and has detailed explanation about it. In this blog post, I’m just going to write down what I did to get it installed. I want to set its flag to use qlite. # echo 'app-portage/eix sqlite' > /etc/portage/package.use/eix Then proced with the installation: ...

January 14, 2019 · 1 min · 113 words · kenno

How to remove Ctrl-M characters from files

A short while back, after exporting my blog from WordPress to Hugo I noticed that there were some weird ^M characters in some files as shown in the following screenshot in blue. This is a special character, CTRL+M and can be removed using sed or vim. Using vim we can replace/substitute a text with the following command: %s/MATCH-TEXT/WITH-NEW-TEXT/g Therefore, we should be able to replace ^M, by typing CTRL+V then CTRL+M, with an empty space as so: ...

January 6, 2019 · 1 min · 133 words · kenno

Compiling C++ Statically

The first programming language I took when I started my undergraduate study in computer science was C. The second language was C++, taken in the following semester.I really liked C/C++ back then, but I never got a chance to actually use C/C++ in any real-life project. After transfering to the University of Auckland in New Zealand, I had to pick up Java as almost all computer science courses taught in Java back in early 2000. ...

December 24, 2018 · 2 min · 405 words · kenno

Fix puppet-firewalld: puppet fails with unknown type of string error

To manage firewalld on a desktop, I use the module created by Craig Dunn available at https://github.com/crayfishx/puppet-firewalld. Recently, I came across this issue for the second time after restarting puppetserver: # puppet agent -vt Info: Using configured environment 'production' Info: Retrieving pluginfacts Info: Retrieving plugin Info: Loading facts Error: Could not retrieve catalog from remote server: Error 500 on SERVER: Server Error: Evaluation Error: Error while evaluating a Resource Statement, Evaluation Error: Error while evaluating a Resource Statement, Could not autoload puppet/type/firewalld_rich_rule: /etc/puppetlabs/code/modules/firewalld/lib/puppet_x/firewalld/property/rich_rule_action.rb:10: unknown type of %string if value.keys.sort != %i[action type] ^ at /etc/puppetlabs/code/modules/firewalld/manifests/init.pp:135:7 on node mathtxx Warning: Not using cache on failed catalog Error: Could not retrieve catalog; skipping run Previously, the problem seem to disappear after awhile, and because I’ve been occupied with other tasks, I kinda forgot about it. ...

September 18, 2018 · 2 min · 224 words · kenno

Becoming a Red Hat Certified Engineer

After spending almost 8 weeks preparation, I finally took the Red Hat Certified Engineer (RHCE) exam yesterday. I found the questions are not very difficult, however it’s very easy to make mistakes. The exam duration is 3.5 hours and I had about 15 minutes left when I completed the last question. Having done the the Red Hat Certified System Administrator (RHCSA) before, I remember if you receive an email from Red Hat with an attachment, that implies that you pass the exam. Well, the grade came back within 2 hours after exam, and this time there was no attachment. Oh my! ...

September 13, 2018 · 1 min · 170 words · kenno