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

Getting Started With Armadillo C++ Library

Yesterday while I was running system update on my home desktop, I noticed the armadillo package has been upgraded. I was pretty sure I never requested to have it installed on this desktop. The package name, though, looks very interesting. Upon looking it up, I found out that Armadillo is a C++ library for linear algebra. Coincidentally, I’ve been reviewing C++ during this end of year holiday. So it’s like a very good time to try this library out. ...

January 1, 2019 · 3 min · 497 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

Ansible Automation Exam EX407

Last week I passed the Red Hat exam, Certificate of Expertise in Ansible Automation (EX407), and I just want to note down my experience of taking this exam. The exam duration is 4 hours, and I was able to complete all the questions in 3 hours and 45 minutes. Was it because questions were difficult? No, on the contrary in my opinions questions aren’t very difficult, comparing to the Ansible learning material in D407. Speaking about learning material, to prepare for the EX407 exams, I went through 2 courses: D407R (recording) and D407VC (Video Classroom). Apart from that, I have also been using Ansible at work for quite awhile. ...

December 15, 2018 · 2 min · 292 words · kenno

Upgrading Freebsd 11.2 to 12.0-RELEASE

FreeBSD 12.0-RELEASE was released today, and that means it’s time to upgrade 2 of FreeBSD 11.2 machines to this latest version. One of my FreeBSD boxes is a desktop used at work, and the upgrade went well without any issues. In this post, I’m going to document how the upgrade is done on my nas server at home. First ensure that the FreeBSD is up to date: root@nas:~ # freebsd-update fetch src component not installed, skipped Looking up update.FreeBSD.org mirrors... 2 mirrors found. Fetching metadata signature for 11.2-RELEASE from update1.freebsd.org... done. Fetching metadata index... done. Inspecting system... done. Preparing to download files... done. No updates needed to update system to 11.2-RELEASE-p6. Begin to perform the upgrade: ...

December 12, 2018 · 4 min · 697 words · kenno