<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/">
  <channel>
    <title>Posts on Kenno&#39;s Open Note</title>
    <link>https://blog.khmersite.net/post/</link>
    <description>Recent content in Posts on Kenno&#39;s Open Note</description>
    <image>
      <title>Kenno&#39;s Open Note</title>
      <url>https://blog.khmersite.net/%3Clink%20or%20path%20of%20image%20for%20opengraph,%20twitter-cards%3E</url>
      <link>https://blog.khmersite.net/%3Clink%20or%20path%20of%20image%20for%20opengraph,%20twitter-cards%3E</link>
    </image>
    <generator>Hugo -- 0.154.0</generator>
    <language>en</language>
    <lastBuildDate>Sat, 05 Sep 2026 00:00:55 +1000</lastBuildDate>
    <atom:link href="https://blog.khmersite.net/post/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>How to manually force reconciliation of Argo CD ApplicationSet</title>
      <link>https://blog.khmersite.net/p/how-to-force-reconciliation-argo-cd-applicationset/</link>
      <pubDate>Sat, 05 Sep 2026 00:00:55 +1000</pubDate>
      <guid>https://blog.khmersite.net/p/how-to-force-reconciliation-argo-cd-applicationset/</guid>
      <description>&lt;p&gt;To immediately trigger a manual refresh and force reconciliation of an Argo CD ApplicationSet, we can apply a specific &lt;strong&gt;refresh annotation&lt;/strong&gt; directly to the &lt;code&gt;ApplicationSet&lt;/code&gt; resource.&lt;/p&gt;
&lt;p&gt;For example, the following command force reconcile the &lt;code&gt;awesome-appset&lt;/code&gt; immediately:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-shell&#34; data-lang=&#34;shell&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;➜ kubectl annotate applicationset awesome-appset -n argocd &lt;span style=&#34;color:#ae81ff&#34;&gt;\
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;argocd.argoproj.io/application-set-refresh&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;true --overwrite
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Sample output:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;applicationset.argoproj.io/dokuwiki-appset annotated
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h3 id=&#34;what-this-does-behind-the-scenes&#34;&gt;What This Does Behind the Scenes&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Bypasses Caches&lt;/strong&gt;: Applying &lt;code&gt;argocd.argoproj.io/application-set-refresh: &amp;quot;true&amp;quot;&lt;/code&gt; tells the ApplicationSet controller to immediately reconcile and completely bypass the repo-server revision cache for Git generators. [1] (&lt;a href=&#34;https://github.com/argoproj/argo-cd/issues/27798&#34;&gt;https://github.com/argoproj/argo-cd/issues/27798&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Forces Re-evaluation&lt;/strong&gt;: The controller will instantly re-evaluate all template generators to create, update, or remove the underlying &lt;code&gt;Application&lt;/code&gt; resources as necessary&lt;/li&gt;
&lt;/ul&gt;</description>
    </item>
    <item>
      <title>Enable Dark Mode on Firefox for dwm</title>
      <link>https://blog.khmersite.net/p/enable-dark-mode-on-firefox-for-dwm/</link>
      <pubDate>Sat, 25 Apr 2026 15:58:43 +1000</pubDate>
      <guid>https://blog.khmersite.net/p/enable-dark-mode-on-firefox-for-dwm/</guid>
      <description>&lt;p&gt;It&amp;rsquo;s 2026 and I still run &lt;a href=&#34;https://dwm.suckless.org/&#34;&gt;dwm&lt;/a&gt; on my laptop. I think at some point
I&amp;rsquo;ll need to switch to another minimal tiling window manager running on Wayland.&lt;/p&gt;
&lt;p&gt;Anyway, I want to share an easy way to enable dark mode on Firefox running on dwm without
installing any additional plugins by using the &lt;code&gt;about:config&lt;/code&gt; method.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Type &lt;code&gt;about:config&lt;/code&gt; in the address bar&lt;/li&gt;
&lt;li&gt;Search for &lt;code&gt;ui.systemUsesDarkTheme&lt;/code&gt;, and set it to &lt;code&gt;1&lt;/code&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Reference:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;https://major.io/p/enable-dark-mode-in-firefox/&#34;&gt;https://major.io/p/enable-dark-mode-in-firefox/&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;</description>
    </item>
    <item>
      <title>Print Only Text Following a Match</title>
      <link>https://blog.khmersite.net/p/print-only-text-following-a-match/</link>
      <pubDate>Fri, 27 Mar 2026 17:17:59 +1100</pubDate>
      <guid>https://blog.khmersite.net/p/print-only-text-following-a-match/</guid>
      <description>&lt;p&gt;I have the following text in a file called &lt;code&gt;n8n-deployment&lt;/code&gt;:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;...
          image: busybox:1.36
          image: docker.io/n8nio/n8n:2.13.4
          imagePullPolicy: IfNotPresent
...
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;And I want to use Regex search and match the version of &lt;code&gt;n8n&lt;/code&gt;, in this case &lt;code&gt;2.13.4&lt;/code&gt; should be output.&lt;/p&gt;
&lt;p&gt;Here&amp;rsquo;s how this can be done using Ripgrep (&lt;code&gt;rg&lt;/code&gt;) command.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;➜ rg -N -o -P &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#39;image.*n8n:\K.*$&amp;#39;&lt;/span&gt; n8n-deployment.yaml
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;2.13.4
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Another way to do this is:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;➜ rg -oN &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#39;image.*n8n:(.*)&amp;#39;&lt;/span&gt; -r &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#39;$1&amp;#39;&lt;/span&gt; n8n-deployment.yaml
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;2.13.4
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Or, with &lt;code&gt;grep&lt;/code&gt;:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;➜ grep -o -P &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#39;image.*n8n:\K.*$&amp;#39;&lt;/span&gt; n8n-deployment.yaml
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;2.13.4
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Explanation of flags:&lt;/p&gt;</description>
    </item>
    <item>
      <title>Resolving Podman Error: Current System Boot ID Differs From Cached Boot ID</title>
      <link>https://blog.khmersite.net/p/error-current-system-boot-id-differ-from-cached-boot-id/</link>
      <pubDate>Sat, 17 Jan 2026 21:07:44 +1100</pubDate>
      <guid>https://blog.khmersite.net/p/error-current-system-boot-id-differ-from-cached-boot-id/</guid>
      <description>&lt;p&gt;Recently, I noticed that whenever my server, &lt;strong&gt;banan&lt;/strong&gt;, was rebooted, containers running under the &lt;code&gt;git&lt;/code&gt; user did not automatically start.&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;❯ podman --version
podman version 5.6.0

❯ cat /etc/os-release
NAME=&amp;#34;AlmaLinux&amp;#34;
VERSION=&amp;#34;9.7 (Moss Jungle Cat)&amp;#34;
ID=&amp;#34;almalinux&amp;#34;
ID_LIKE=&amp;#34;rhel centos fedora&amp;#34;
VERSION_ID=&amp;#34;9.7&amp;#34;
PLATFORM_ID=&amp;#34;platform:el9&amp;#34;
PRETTY_NAME=&amp;#34;AlmaLinux 9.7 (Moss Jungle Cat)&amp;#34;
ANSI_COLOR=&amp;#34;0;34&amp;#34;
LOGO=&amp;#34;fedora-logo-icon&amp;#34;
CPE_NAME=&amp;#34;cpe:/o:almalinux:almalinux:9::baseos&amp;#34;
HOME_URL=&amp;#34;https://almalinux.org/&amp;#34;
DOCUMENTATION_URL=&amp;#34;https://wiki.almalinux.org/&amp;#34;
BUG_REPORT_URL=&amp;#34;https://bugs.almalinux.org/&amp;#34;

ALMALINUX_MANTISBT_PROJECT=&amp;#34;AlmaLinux-9&amp;#34;
ALMALINUX_MANTISBT_PROJECT_VERSION=&amp;#34;9.7&amp;#34;
REDHAT_SUPPORT_PRODUCT=&amp;#34;AlmaLinux&amp;#34;
REDHAT_SUPPORT_PRODUCT_VERSION=&amp;#34;9.7&amp;#34;
SUPPORT_END=2032-06-01
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Let&amp;rsquo;s investigate and fix this issue.&lt;/p&gt;
&lt;p&gt;After switching to the &lt;code&gt;git&lt;/code&gt; user, I encountered the following error when trying to list the running containers:&lt;/p&gt;</description>
    </item>
    <item>
      <title>How to undo a pushed commit</title>
      <link>https://blog.khmersite.net/p/how-to-undo-a-pushed-commit/</link>
      <pubDate>Sat, 20 Dec 2025 01:33:59 +1100</pubDate>
      <guid>https://blog.khmersite.net/p/how-to-undo-a-pushed-commit/</guid>
      <description>&lt;p&gt;Oops&amp;hellip; I just accidentally pushed a git commit containing code with a secret in plain text to a remote repo! Though it&amp;rsquo;s a &lt;strong&gt;private&lt;/strong&gt; repository, I want to clean this mess up for security best practice. So, let&amp;rsquo;s fix it!&lt;/p&gt;
&lt;p&gt;Here are the last two commits. The secret resides in one of the files from the &amp;ldquo;add argocd infra to git&amp;rdquo; commit.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;$ git log -2
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;commit fe7b0510edc4fb160a16421352ba598e3f62703e &lt;span style=&#34;color:#f92672&#34;&gt;(&lt;/span&gt;HEAD -&amp;gt; main, origin/main, origin/HEAD&lt;span style=&#34;color:#f92672&#34;&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Author: kenno &amp;lt;kenno@example.com&amp;gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Date:   Sat Dec &lt;span style=&#34;color:#ae81ff&#34;&gt;20&lt;/span&gt; 00:59:36 &lt;span style=&#34;color:#ae81ff&#34;&gt;2025&lt;/span&gt; +1100
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    add argocd infra to git
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;commit c5a75ae14cf3528db1fea7677e2bdb54167037cd
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Author: kenno &amp;lt;kenno@example.com&amp;gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Date:   Thu Dec &lt;span style=&#34;color:#ae81ff&#34;&gt;18&lt;/span&gt; 14:38:17 &lt;span style=&#34;color:#ae81ff&#34;&gt;2025&lt;/span&gt; +1100
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    add basic auth middleware to longhorn httproute
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Since the commit had already been pushed to a remote repository, simply &amp;ldquo;undoing&amp;rdquo; the commit locally is not enough; it is required to overwrite the remote history.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Podman Quadlet Volume Ownership</title>
      <link>https://blog.khmersite.net/p/podman-quadlet-volume-ownership/</link>
      <pubDate>Sun, 14 Dec 2025 22:39:33 +1100</pubDate>
      <guid>https://blog.khmersite.net/p/podman-quadlet-volume-ownership/</guid>
      <description>&lt;p&gt;This is a short note that serves as a self-reminder on how podman can automatically change the ownership of a source volume to match the default UID and GID within the container.&lt;/p&gt;
&lt;p&gt;TL;DR: Use the &lt;code&gt;:U&lt;/code&gt; suffix on the volume definition.&lt;/p&gt;
&lt;p&gt;The following is an example of the issue I had and how to apply the fix.&lt;/p&gt;
&lt;p&gt;First, let&amp;rsquo;s list the current ownership of the directory to be used as the source volume for the container.&lt;/p&gt;</description>
    </item>
    <item>
      <title>How I Resized My Linux Boot Partition</title>
      <link>https://blog.khmersite.net/p/resizing-boot-patition/</link>
      <pubDate>Fri, 31 Oct 2025 20:01:13 +1100</pubDate>
      <guid>https://blog.khmersite.net/p/resizing-boot-patition/</guid>
      <description>&lt;p&gt;I recently ran into a classic problem on my long-running Fedora installation: my &lt;code&gt;/boot&lt;/code&gt; partition was full. Back when I set up the system (around Fedora 20), 400MiB was more than enough. Now, with modern kernels, it can barely hold two versions, let alone the default three that Fedora manages. This meant I couldn&amp;rsquo;t run system updates.&lt;/p&gt;
&lt;p&gt;The challenge was that my disk was partitioned with &lt;code&gt;/dev/sda1&lt;/code&gt; for &lt;code&gt;/boot&lt;/code&gt; and &lt;code&gt;/dev/sda2&lt;/code&gt; as a single large LVM physical volume for my &lt;code&gt;/root&lt;/code&gt; and &lt;code&gt;/home&lt;/code&gt; filesystems. This setup prevents a simple resize of &lt;code&gt;/dev/sda1&lt;/code&gt;.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Find what package provides a file with pacman</title>
      <link>https://blog.khmersite.net/p/find-what-package-provides-a-file-with-pacman/</link>
      <pubDate>Sat, 11 Oct 2025 12:20:53 +1100</pubDate>
      <guid>https://blog.khmersite.net/p/find-what-package-provides-a-file-with-pacman/</guid>
      <description>&lt;p&gt;While running an Ansible playbook on one of my servers from an Arch device, I encountered the following error:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;TASK [Gathering Facts] *****************************************************************************************************************************************************
[ERROR]: Task failed: Failed to connect to the host via ssh: ssh_askpass: exec(/usr/lib/ssh/ssh-askpass): No such file or directory
Host key verification failed.
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;It looks like the &lt;code&gt;/usr/lib/ssh/ssh-askpass&lt;/code&gt; file doesn&amp;rsquo;t exit. To find out what package the missing file comes from, we can use &lt;code&gt;pacman -F&lt;/code&gt; or &lt;code&gt;pacman --files&lt;/code&gt;.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Set number of ReplicaSets to keep for k8s Deployment</title>
      <link>https://blog.khmersite.net/p/set-number-of-replicasets-to-keep-for-k8s-deployment/</link>
      <pubDate>Sun, 05 Oct 2025 16:26:57 +1100</pubDate>
      <guid>https://blog.khmersite.net/p/set-number-of-replicasets-to-keep-for-k8s-deployment/</guid>
      <description>&lt;p&gt;By default, the Deployment in Kubernetes retains 10 ReplicaSets [1]. This number can be configured by setting the &lt;code&gt;.spec.revisionHistoryLimit&lt;/code&gt; to a desired number.&lt;/p&gt;
&lt;p&gt;The following is an example on how to retain just 3 old ReplicaSets in my &amp;lsquo;&amp;rsquo;n8n&amp;rsquo;&amp;rsquo; Deployment.&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;➜ k get replicasets -n n8n
NAME             DESIRED   CURRENT   READY   AGE
n8n-57c89d6b7d   0         0         0       91d
n8n-5f9fb9c459   0         0         0       80d
n8n-666b9476f    0         0         0       80d
n8n-66cd6bd8c6   1         1         1       74d
n8n-6888cc89bd   0         0         0       91d
n8n-7466c456f8   0         0         0       91d
n8n-74dfd6cb8c   0         0         0       80d
n8n-f8f8f6d7b    0         0         0       237d
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Let set &lt;code&gt;.spec.revisionHistoryLimit&lt;/code&gt; to 3:&lt;/p&gt;</description>
    </item>
    <item>
      <title>Communicate from a rootless container to the host</title>
      <link>https://blog.khmersite.net/p/communicate-from-a-rootless-container-to-the-host/</link>
      <pubDate>Sun, 28 Sep 2025 16:49:13 +1000</pubDate>
      <guid>https://blog.khmersite.net/p/communicate-from-a-rootless-container-to-the-host/</guid>
      <description>&lt;p&gt;Occasionally, I need to communicate from a podman container to its host, and I keep forgetting how to that. I know I can always google it, but from what had happened earlier today, having a short note to remind myself how this can be easily done is much preferable in my opinion.&lt;/p&gt;
&lt;p&gt;To communicate between the container and its host, we can just simply use &lt;code&gt;host.containers.internal&lt;/code&gt; or &lt;code&gt;host.docker.internal&lt;/code&gt; to refer to the host.&lt;/p&gt;</description>
    </item>
    <item>
      <title>How to Rename a ZFS Pool</title>
      <link>https://blog.khmersite.net/p/how-to-rename-zfs-pool/</link>
      <pubDate>Wed, 30 Jul 2025 21:01:42 +1000</pubDate>
      <guid>https://blog.khmersite.net/p/how-to-rename-zfs-pool/</guid>
      <description>&lt;p&gt;I&amp;rsquo;ve been a happy ZFS user for years, appreciating its robustness and features. Yet, in all that time, I&amp;rsquo;d never had to rename a pool. That changed today. Whether it&amp;rsquo;s for better organization, a server migration, or just because you&amp;rsquo;ve had a change of heart about a name, renaming a ZFS pool is a task that might pop up when you least expect it.&lt;/p&gt;
&lt;p&gt;I needed to rename my pool from &lt;code&gt;anime35&lt;/code&gt; to &lt;code&gt;anime36&lt;/code&gt;. I was pleasantly surprised to find the process is incredibly simple and elegant, which is what I&amp;rsquo;ve come to expect from ZFS.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Removing a broken RPM package on Fedora</title>
      <link>https://blog.khmersite.net/p/removing-broken-rpm-package-on-fedora/</link>
      <pubDate>Tue, 06 May 2025 10:36:30 +1000</pubDate>
      <guid>https://blog.khmersite.net/p/removing-broken-rpm-package-on-fedora/</guid>
      <description>&lt;p&gt;While I was performing an upgrade of Fedora 41 to 42 on my laptop, I noticed there was package installed since Fedora 38. This package, &lt;code&gt;zfs-dkms-2.2.0-1.fc38.noarch&lt;/code&gt;, needed to be removed as it blocked this Fedora 42 upgrade.&lt;/p&gt;
&lt;p&gt;TL;DR - The solution is to use &lt;code&gt;--noscripts&lt;/code&gt; option with &lt;code&gt;rpm&lt;/code&gt; command. If you want to see how the &lt;code&gt;zfs-dkms&lt;/code&gt; package removed, follow along.&lt;/p&gt;
&lt;p&gt;Here&amp;rsquo;s the info about the package:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;root@benjo:/etc/yum.repos.d# dnf info zfs-dkms
Updating and loading repositories:
Repositories loaded.
Installed packages
Name            : zfs-dkms
Epoch           : 0
Version         : 2.2.0
Release         : 1.fc38
Architecture    : noarch
Installed size  : 56.9 MiB
Source          : zfs-dkms-2.2.0-1.fc38.src.rpm
From repository : zfs
Summary         : Kernel module(s) (dkms)
URL             : https://github.com/openzfs/zfs
License         : CDDL
Description     : This package contains the dkms ZFS kernel modules.
Vendor          : &amp;lt;NULL&amp;gt;

Available packages
Name           : zfs-dkms
Epoch          : 0
Version        : 2.3.2
Release        : 1.fc41
Architecture   : noarch
Download size  : 31.0 MiB
Installed size : 58.6 MiB
Source         : zfs-dkms-2.3.2-1.fc41.src.rpm
Repository     : zfs
Summary        : Kernel module(s) (dkms)
URL            : https://github.com/openzfs/zfs
License        : CDDL
Description    : This package contains the dkms ZFS kernel modules.
Vendor
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Let&amp;rsquo;s try to remove it normally:&lt;/p&gt;</description>
    </item>
    <item>
      <title>ArgoCD CLI failed to invoke grpc call</title>
      <link>https://blog.khmersite.net/p/argocd-cli-failed-to-invoke-grpc-call/</link>
      <pubDate>Tue, 11 Mar 2025 20:24:00 +1100</pubDate>
      <guid>https://blog.khmersite.net/p/argocd-cli-failed-to-invoke-grpc-call/</guid>
      <description>&lt;p&gt;When running &lt;code&gt;argocd&lt;/code&gt; CLI, the following warning message shown:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;➜ argocd app list
WARN[0000] Failed to invoke grpc call. Use flag --grpc-web in grpc calls. To avoid this warning message, use flag --grpc-web.
NAME  CLUSTER  NAMESPACE  PROJECT  STATUS  HEALTH  SYNCPOLICY  CONDITIONS  REPO  PATH  TARGET
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;To suppress this warning message, re-run the login with &lt;code&gt;--grpc-web&lt;/code&gt; option. For example:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;➜ argocd login argocd.apps.tuaf.local.cluster --grpc-web
Username: admin
Password:
&amp;#39;admin:login&amp;#39; logged in successfully
Context &amp;#39;argocd.apps.tuaf.local.cluster&amp;#39; updated
&lt;/code&gt;&lt;/pre&gt;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;➜ argocd app list
NAME  CLUSTER  NAMESPACE  PROJECT  STATUS  HEALTH  SYNCPOLICY  CONDITIONS  REPO  PATH  TARGET
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Reference:&lt;/p&gt;</description>
    </item>
    <item>
      <title>How to revert a single file to its state in main in branch</title>
      <link>https://blog.khmersite.net/p/how-to-revert-a-single-file-to-main-in-git/</link>
      <pubDate>Fri, 28 Feb 2025 15:19:48 +1100</pubDate>
      <guid>https://blog.khmersite.net/p/how-to-revert-a-single-file-to-main-in-git/</guid>
      <description>&lt;p&gt;I want to reset a file stored in a git repo to its state as the main branch, and I kept forgetting how to do this.&lt;/p&gt;
&lt;p&gt;So here is how, just to remind my future self.&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;➜ git status
On branch main
Your branch is up to date with &amp;#39;origin/main&amp;#39;.

Changes not staged for commit:
  (use &amp;#34;git add &amp;lt;file&amp;gt;...&amp;#34; to update what will be committed)
  (use &amp;#34;git restore &amp;lt;file&amp;gt;...&amp;#34; to discard changes in working directory)
        modified:   kube-prometheus-stack-values.yaml

no changes added to commit (use &amp;#34;git add&amp;#34; and/or &amp;#34;git commit -a&amp;#34;)
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;The above output shows that there is a modified file, &lt;code&gt;kube-prometheus-stack-values.yaml&lt;/code&gt; that is not yet staged for commit.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Setting Retention for Kube Prometheus Stack</title>
      <link>https://blog.khmersite.net/p/setting-retention-for-kube-prometheus-stack/</link>
      <pubDate>Tue, 25 Feb 2025 10:42:41 +1100</pubDate>
      <guid>https://blog.khmersite.net/p/setting-retention-for-kube-prometheus-stack/</guid>
      <description>&lt;p&gt;When deploying the &lt;strong&gt;prometheus-community/kube-prometheus-stack&lt;/strong&gt; in a k8s cluster, the default retention for Prometheus scrapped data is 10d at the time of this writing or Helm chart &lt;code&gt;kube-prometheus-stack-69.4.1&lt;/code&gt;. As a result, the longhorn storage is filled up fast, and caused the Prometheus to crash.&lt;/p&gt;
&lt;p&gt;So I&amp;rsquo;d decided to change the retention period to 3 days, and also set retention size to 4GB. To do this, update the &lt;code&gt;values&lt;/code&gt; file for the Helm chart with the following values:&lt;/p&gt;</description>
    </item>
    <item>
      <title>How to reset account password for Xen Orchestra</title>
      <link>https://blog.khmersite.net/p/how-to-reset-xoa-account-password/</link>
      <pubDate>Sat, 08 Feb 2025 15:20:38 +1100</pubDate>
      <guid>https://blog.khmersite.net/p/how-to-reset-xoa-account-password/</guid>
      <description>&lt;p&gt;This is a quick note on how to reset the password of user account on the open sourced &lt;a href=&#34;https://github.com/vatesfr/xen-orchestra&#34;&gt;Xen Orchestra&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;To reset the password of a user, of course, you&amp;rsquo;d need to know the user account, e.g. &lt;code&gt;admin@admin.net&lt;/code&gt;.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-console&#34; data-lang=&#34;console&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;[root@xoa1 xo-server]# cd /opt/xo/xo-server
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;[root@xoa1 xo-server]# ./dist/recover-account-cli.mjs --help
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#960050;background-color:#1e0010&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;xo-server-recover-account &amp;lt;user name or email&amp;gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#960050;background-color:#1e0010&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    If the user does not exist, it is created, if it exists, updates
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    its password, remove any configured OTP and resets its permission to Admin.
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#960050;background-color:#1e0010&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;[root@xoa1 xo-server]# ./dist/recover-account-cli.mjs admin@admin.net
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Password (leave empty for random): *******
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;user admin@admin.net has been successfully updated
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;However, if you also forgot the account itself, you can create a new user with the same command. Here is an example to create a new account called &lt;code&gt;admin&lt;/code&gt;:&lt;/p&gt;</description>
    </item>
    <item>
      <title>Running container with Podman Quadlet</title>
      <link>https://blog.khmersite.net/p/running-container-with-podman-quadlet/</link>
      <pubDate>Tue, 17 Dec 2024 11:06:41 +1100</pubDate>
      <guid>https://blog.khmersite.net/p/running-container-with-podman-quadlet/</guid>
      <description>&lt;p&gt;Up until recently, my preferred method of creating Podman containers is to use Ansible, and that has been working fine for me. However, I just stumble the new-to-me method called &amp;ldquo;quadlet&amp;rdquo;. So far, I really like it, and already started moving some containers to quadlet.&lt;/p&gt;
&lt;p&gt;To learn more about Quadlet, check out [1]. But, today I&amp;rsquo;m going to share an example of creating a simple container with Quadlet.&lt;/p&gt;
&lt;p&gt;In this example, the container &lt;code&gt;whoami&lt;/code&gt; is run in rootless mode, under a non-privileged user.&lt;/p&gt;</description>
    </item>
    <item>
      <title>How to import ZFS pool with duplicated pool names</title>
      <link>https://blog.khmersite.net/p/how-to-import-zfs-pool-with-duplicated-pool-names/</link>
      <pubDate>Sat, 14 Dec 2024 18:32:22 +1100</pubDate>
      <guid>https://blog.khmersite.net/p/how-to-import-zfs-pool-with-duplicated-pool-names/</guid>
      <description>&lt;p&gt;If you use ZFS as the file system, you probably already know that &lt;code&gt;tank&lt;/code&gt; is the most common name for ZFS pools. That also applies to me, I do name most of my ZFS pools as &lt;code&gt;tank&lt;/code&gt; as the default. There is no issue with that name, however, since ZFS&amp;rsquo;s pool name must be unique, this means I couldn&amp;rsquo;t import or have multiple ZFS pools with the name &lt;code&gt;tank&lt;/code&gt; on a system.&lt;/p&gt;</description>
    </item>
    <item>
      <title>How to enable and check linger for a systemd user</title>
      <link>https://blog.khmersite.net/p/how-to-enable-check-linger-for-user/</link>
      <pubDate>Tue, 03 Dec 2024 23:22:06 +1100</pubDate>
      <guid>https://blog.khmersite.net/p/how-to-enable-check-linger-for-user/</guid>
      <description>&lt;blockquote&gt;
&lt;p&gt;&amp;ldquo;The systemd login manager will terminate any user services when their login session ends unless you enable user lingering with the enable-linger option. Use loginctl with the enable-linger option to configure a user to start during the boot process and prevent the systemd service from terminating when the user session ends.&amp;rdquo; [1]&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;To enable linger for a user, e.g. &lt;code&gt;kenno&lt;/code&gt;, we can run the following command:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;# loginctl enable-linger kenno
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;I usually ran the above command, and that was it. However, today I need to check whether the user &lt;code&gt;kenno&lt;/code&gt; had linger enabled already. I also want to document this for my own future reference.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Accessing host from inside Podman 5.0 container</title>
      <link>https://blog.khmersite.net/p/accessing-host-from-inside-podman-container/</link>
      <pubDate>Mon, 02 Dec 2024 20:47:20 +1100</pubDate>
      <guid>https://blog.khmersite.net/p/accessing-host-from-inside-podman-container/</guid>
      <description>&lt;p&gt;Sometimes you need to connect to the host from a Podman container running on it. How would you do that?&lt;/p&gt;
&lt;p&gt;In the past I was able to get this working by connecting to the gateway IP of the container. For example, I have a web server running on the host listening on port 8080.&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;➜ nc -vz localhost 8080
Ncat: Version 7.92 ( https://nmap.org/ncat )
Ncat: Connected to 127.0.0.1:8080.
Ncat: 0 bytes sent, 0 bytes received in 0.02 seconds.
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Next, create a new container to run &lt;code&gt;curl&lt;/code&gt; for testing.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Expand ZFS partition to use entire disk</title>
      <link>https://blog.khmersite.net/p/expand-zfs-partition-to-use-entire-disk/</link>
      <pubDate>Tue, 12 Nov 2024 10:09:20 +1100</pubDate>
      <guid>https://blog.khmersite.net/p/expand-zfs-partition-to-use-entire-disk/</guid>
      <description>&lt;p&gt;This is just a quick note to jot down what I did to resize and expand a ZFS partition to entire disk. I never had to do this before; it tured out it was quite easy.&lt;/p&gt;
&lt;p&gt;First ensure that the &lt;code&gt;autoexpand&lt;/code&gt; option is set on the zpool. Then, stop the VM in order to resize the disk volume.&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;[root@phnomaural ~]# zpool set autoexpand=on immich

[root@phnomaural ~]# poweroff
[root@phnomaural ~]# Connection to phnomaural closed by remote host.
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;The original size of ZFS disk was 256 GiB, and it has been increased to 512 GiB. This was done by stopping the VM running on XCP-ng, and go to the disk and change the size to 256 GiB.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Fix container to container DNS lookup failed in Podman OpenSUSE Leap 15.16</title>
      <link>https://blog.khmersite.net/p/fix-container-to-container-dns-lookup-failed-in-podman-opensuse-leap-15.16/</link>
      <pubDate>Mon, 11 Nov 2024 16:06:07 +1100</pubDate>
      <guid>https://blog.khmersite.net/p/fix-container-to-container-dns-lookup-failed-in-podman-opensuse-leap-15.16/</guid>
      <description>&lt;p&gt;I&amp;rsquo;ve started to running more containers in my homelab with Podman, running inside AlamaLinux. Most of the times, things just worked. However today, I tried to setup similar containers on OpenSUSE Leap 15.16 host, and I came across an issue getting containers to communicate with one another. Well, spoiler alert, I found a solution, hence this blog post.&lt;/p&gt;
&lt;p&gt;TL;DR - install &lt;code&gt;cni-plugin-dnsname&lt;/code&gt; package from &lt;a href=&#34;https://build.opensuse.org/package/show/devel:microos/cni-plugin-dnsname&#34;&gt;cni-plugin-dnsname build service&lt;/a&gt;. (No package from the official OpenSUSE repo).&lt;/p&gt;</description>
    </item>
    <item>
      <title>NGINX 413 Request Entity Too Large</title>
      <link>https://blog.khmersite.net/p/nginx-413-request-entity-too-large/</link>
      <pubDate>Mon, 04 Nov 2024 23:00:50 +1100</pubDate>
      <guid>https://blog.khmersite.net/p/nginx-413-request-entity-too-large/</guid>
      <description>&lt;p&gt;While trying to upload a file to a web app using NGINX as a reverse proxy, I encountered the following error:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;...
Save(&amp;lt;data/c5ceb2d914&amp;gt;) returned error, retrying after 19.847451977s: client.PutObject: &amp;lt;html&amp;gt;Documents/Fonts/FiraCode.zip
&amp;lt;head&amp;gt;&amp;lt;title&amp;gt;413 Request Entity Too Large&amp;lt;/title&amp;gt;&amp;lt;/head&amp;gt;
&amp;lt;body&amp;gt;
&amp;lt;center&amp;gt;&amp;lt;h1&amp;gt;413 Request Entity Too Large&amp;lt;/h1&amp;gt;&amp;lt;/center&amp;gt;
&amp;lt;hr&amp;gt;&amp;lt;center&amp;gt;nginx/1.20.1&amp;lt;/center&amp;gt;
&amp;lt;/body&amp;gt;
&amp;lt;/html&amp;gt;
Save(&amp;lt;data/d194099394&amp;gt;) returned error, retrying after 36.899440019s: client.PutObject: &amp;lt;html&amp;gt;Documents/Fonts/FiraCode.zip
&amp;lt;head&amp;gt;&amp;lt;title&amp;gt;413 Request Entity Too Large&amp;lt;/title&amp;gt;&amp;lt;/head&amp;gt;
&amp;lt;body&amp;gt;
&amp;lt;center&amp;gt;&amp;lt;h1&amp;gt;413 Request Entity Too Large&amp;lt;/h1&amp;gt;&amp;lt;/center&amp;gt;
&amp;lt;hr&amp;gt;&amp;lt;center&amp;gt;nginx/1.20.1&amp;lt;/center&amp;gt;
&amp;lt;/body&amp;gt;
&amp;lt;/html&amp;gt;
...
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;It turned out that NGINX has default value for file upload limit to 1 MB set in &lt;code&gt;client_max_body_size&lt;/code&gt; variable. Therefore, I need to increase the file upload size to something bigger, says 50 MB. Where to update this file? Well, we can apply this change to the main NGINX&amp;rsquo;s configuration file, e.g. &lt;code&gt;/etc/nginx/nginx.conf&lt;/code&gt; or specifically in the configuration file for the web app. I chose the latter for my case.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Look up one own&#39;s public IP easily</title>
      <link>https://blog.khmersite.net/p/look-up-one-own-public-ip/</link>
      <pubDate>Mon, 28 Oct 2024 21:19:50 +1100</pubDate>
      <guid>https://blog.khmersite.net/p/look-up-one-own-public-ip/</guid>
      <description>&lt;p&gt;Occasionally, I need to look up my own public IP for various reasons. To do this, I would google &amp;ldquo;what is my ip&amp;rdquo;, and got a result on the browser.&lt;/p&gt;
&lt;p&gt;Recently, I found a way to easily do this using &lt;code&gt;curl&lt;/code&gt; command to an easy to remember URL &lt;code&gt;ifconfig.io&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;Here is an example, of course with the fake IPs as the results:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;➜ curl ifconfig.io
2444:3444:20a:5310:d6c9:ffff:fef1:7777
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;To get the IPv4, we can supply the &lt;code&gt;-4&lt;/code&gt; option to &lt;code&gt;curl&lt;/code&gt; command:&lt;/p&gt;</description>
    </item>
    <item>
      <title>Installing Nerd Font on Fedora</title>
      <link>https://blog.khmersite.net/p/installing-nerd-font-on-fedora/</link>
      <pubDate>Sun, 22 Sep 2024 16:24:42 +1000</pubDate>
      <guid>https://blog.khmersite.net/p/installing-nerd-font-on-fedora/</guid>
      <description>&lt;p&gt;I want to install &amp;lsquo;Hack Nerd Font&amp;rsquo; on my laptop running Fedora 40. As of today, there is no RPM package that I am aware of that provides this font. Therefore, I would need to download and install the font manually.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Visit the &lt;a href=&#34;https://www.nerdfonts.com/font-downloads&#34;&gt;Nerd font&lt;/a&gt; website, to choose a preferred font.&lt;/li&gt;
&lt;li&gt;I like &lt;code&gt;Hack Nerd Font&lt;/code&gt;. It can be downloaded from the &lt;a href=&#34;https://github.com/ryanoasis/nerd-fonts/releases/download/v3.2.1/Hack.zip&#34;&gt;Download&lt;/a&gt; link.&lt;/li&gt;
&lt;li&gt;Unzip the downloaded (e.g. &lt;code&gt;Hack.zip&lt;/code&gt;) and move or copy the directory to &lt;code&gt;~/.local/share/fonts&lt;/code&gt; directory.&lt;/li&gt;
&lt;li&gt;Run &lt;code&gt;fc-cache -fv&lt;/code&gt; to refresh the font cache.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Here is now the above steps are performed using command line:&lt;/p&gt;</description>
    </item>
    <item>
      <title>Resizing a root partition on Linux VM</title>
      <link>https://blog.khmersite.net/p/resizing-root-partition-on-linux-vm/</link>
      <pubDate>Mon, 16 Sep 2024 18:10:13 +1000</pubDate>
      <guid>https://blog.khmersite.net/p/resizing-root-partition-on-linux-vm/</guid>
      <description>&lt;p&gt;Well, I recently learned that one of my VMs had its root partition full. The following document on the root partition was resized on that VM.&lt;/p&gt;
&lt;p&gt;It&amp;rsquo;s not gonna be something exciting or anything special. However, I feel like I should document anyway, in case I forget on how to do that in the future, and partly due to I no longer work with these type of work as my daily job anymore.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Replacing cron with systemd timer</title>
      <link>https://blog.khmersite.net/p/replacing-cron-with-systemd-timer/</link>
      <pubDate>Tue, 03 Sep 2024 16:15:58 +1000</pubDate>
      <guid>https://blog.khmersite.net/p/replacing-cron-with-systemd-timer/</guid>
      <description>&lt;p&gt;Well, I don&amp;rsquo;t currently really have a good reason to replace a working cron job with systemd-timer beside practicing it.&lt;/p&gt;
&lt;p&gt;The following is the existing cron task for &lt;code&gt;www-data&lt;/code&gt; user. I want to convert this cron to a systemd-timer:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;$ sudo crontab -l -u www-data

# m h  dom mon dow   command
*/5 * * * * php -f /var/www/nextcloud/cron.php
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;The above output indicates that the command &lt;code&gt;php -f /var/www/nextcloud/cron.php&lt;/code&gt; is run at every 5th minute, of course by &lt;code&gt;www-data&lt;/code&gt; user.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Upgrading Longhorn with Helm</title>
      <link>https://blog.khmersite.net/p/upgrading-longhorn-with-helm/</link>
      <pubDate>Fri, 23 Aug 2024 13:55:07 +1000</pubDate>
      <guid>https://blog.khmersite.net/p/upgrading-longhorn-with-helm/</guid>
      <description>&lt;p&gt;For my test Kubernetes cluster, Longhorn is used as the persistent block storage. The installed version is 1.6.2, and the version 1.7.0 is available now. So today, I&amp;rsquo;m going to share how to perform the Longhorn upgrade using Helm.&lt;/p&gt;
&lt;p&gt;I&amp;rsquo;m going to try to do this live as usual. Of course, I already created snapshots for all my K8s nodes in case thing goes south.&lt;/p&gt;
&lt;p&gt;First, let&amp;rsquo;s verify the current installed version of Longhorn [1].&lt;/p&gt;</description>
    </item>
    <item>
      <title>How to rebuild initramfs on Fedora</title>
      <link>https://blog.khmersite.net/p/how-to-rebuild-initramfs-on-fedora/</link>
      <pubDate>Wed, 21 Aug 2024 21:42:21 +1000</pubDate>
      <guid>https://blog.khmersite.net/p/how-to-rebuild-initramfs-on-fedora/</guid>
      <description>&lt;p&gt;Earlier today while performing the update on my Fedora desktop, I encountered an issue with the new kernel update. As a result,
the initramfs was not generated for the new installed kernel. So, I&amp;rsquo;ll share with you how to rebuild or generate the initramfs while fixing real issue on my Fedora workstation.&lt;/p&gt;
&lt;p&gt;First, here is an output showing the source of the issue. It might not be clear of what&amp;rsquo;s going on, but that&amp;rsquo;s okay as it&amp;rsquo;s not the main focus of this blog post.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Process Life Cycle</title>
      <link>https://blog.khmersite.net/p/process-life-cycle/</link>
      <pubDate>Sat, 03 Aug 2024 10:01:12 +1000</pubDate>
      <guid>https://blog.khmersite.net/p/process-life-cycle/</guid>
      <description>&lt;p&gt;A short while back, I had to do a revision about process life cycle in the operating system, Linux specifically. Last time that I had to learn about this topic was back in the good old days in college.&lt;/p&gt;
&lt;p&gt;I don&amp;rsquo;t know when I need to review it again, so I think it&amp;rsquo;s a good idea to dump what I&amp;rsquo;ve learned including the references to this topic. Also, I will only focus mainly on the 5-state model.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Snapshot of LVM logical volume - a brief howto</title>
      <link>https://blog.khmersite.net/p/snapshot-of-lvm-a-brief-howto/</link>
      <pubDate>Fri, 26 Jul 2024 11:33:26 +1000</pubDate>
      <guid>https://blog.khmersite.net/p/snapshot-of-lvm-a-brief-howto/</guid>
      <description>&lt;p&gt;Recently, after an OS updated and rebooted, I was not able to login to the desktop environment. When that happened, I thought to myself, &amp;ldquo;I wish I could just do a quick EBS snapshot like I would on the cloud before running any OS updates.&amp;rdquo;&lt;/p&gt;
&lt;p&gt;On my Linux desktop, the root volume is an LVM volume, I knew that snapshot was possible, but never tried to create one before. A friend at work encouraged that I should make use of it, and it was not that hard to get started. Well, let&amp;rsquo;s see how it goes as I&amp;rsquo;m about to explore how LVM snapshot works on my desktop.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Systemctl cat is cool</title>
      <link>https://blog.khmersite.net/p/systemctl-cat-is-cool/</link>
      <pubDate>Sat, 20 Jul 2024 12:41:32 +1000</pubDate>
      <guid>https://blog.khmersite.net/p/systemctl-cat-is-cool/</guid>
      <description>&lt;p&gt;Sometimes we want to see the content of a Systemd unit file. One obvious way to do it is to just cat/vim the content of the unit file directly.&lt;/p&gt;
&lt;p&gt;For example, to display the content of &lt;code&gt;systemd-tmpfiles-clean.timer&lt;/code&gt;, we can perform the following step:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;➜ systemctl status systemd-tmpfiles-clean.timer | grep Loaded
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;     Loaded: loaded &lt;span style=&#34;color:#f92672&#34;&gt;(&lt;/span&gt;/usr/lib/systemd/system/systemd-tmpfiles-clean.timer; static&lt;span style=&#34;color:#f92672&#34;&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;➜ cat /usr/lib/systemd/system/systemd-tmpfiles-clean.timer;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#75715e&#34;&gt;#  SPDX-License-Identifier: LGPL-2.1-or-later&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#75715e&#34;&gt;#&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#75715e&#34;&gt;#  This file is part of systemd.&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#75715e&#34;&gt;#&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#75715e&#34;&gt;#  systemd is free software; you can redistribute it and/or modify it&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#75715e&#34;&gt;#  under the terms of the GNU Lesser General Public License as published by&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#75715e&#34;&gt;#  the Free Software Foundation; either version 2.1 of the License, or&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#75715e&#34;&gt;#  (at your option) any later version.&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#f92672&#34;&gt;[&lt;/span&gt;Unit&lt;span style=&#34;color:#f92672&#34;&gt;]&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Description&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;Daily Cleanup of Temporary Directories
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Documentation&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;man:tmpfiles.d&lt;span style=&#34;color:#f92672&#34;&gt;(&lt;/span&gt;5&lt;span style=&#34;color:#f92672&#34;&gt;)&lt;/span&gt; man:systemd-tmpfiles&lt;span style=&#34;color:#f92672&#34;&gt;(&lt;/span&gt;8&lt;span style=&#34;color:#f92672&#34;&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;ConditionPathExists&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;!/etc/initrd-release
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#f92672&#34;&gt;[&lt;/span&gt;Timer&lt;span style=&#34;color:#f92672&#34;&gt;]&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;OnBootSec&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;15min
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;OnUnitActiveSec&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;1d
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;But, can we do better than manually looking up the unit file and read it? Sure, can!&lt;/p&gt;</description>
    </item>
    <item>
      <title>SELinux revision note</title>
      <link>https://blog.khmersite.net/p/selinux-revision-note/</link>
      <pubDate>Sat, 20 Jul 2024 02:06:28 +1000</pubDate>
      <guid>https://blog.khmersite.net/p/selinux-revision-note/</guid>
      <description>&lt;p&gt;Today, I decided to have a quick revision on SELinux as it&amp;rsquo;s been a long while that I worked on any projects
that required my attention to fiddling with SELinux.&lt;/p&gt;
&lt;p&gt;While I was looking for an &lt;code&gt;sealert&lt;/code&gt; in &lt;code&gt;/var/log/messages&lt;/code&gt; on my Fedora based desktop, I found a real issue that I need to fix.
Like most of my blog posts, I&amp;rsquo;d like to start writing the post while I was about to solve the issue.&lt;/p&gt;</description>
    </item>
    <item>
      <title>How to test UDP port connectivity</title>
      <link>https://blog.khmersite.net/p/how-to-test-udp-port-connectivity/</link>
      <pubDate>Wed, 17 Jul 2024 20:13:16 +1000</pubDate>
      <guid>https://blog.khmersite.net/p/how-to-test-udp-port-connectivity/</guid>
      <description>&lt;p&gt;Earlier today, I have a need to check for a UDP opening port on a remote Linux server. And I felt blank in my brain,
like I never done this before. Then I remember with TCP, I could use &lt;code&gt;nc&lt;/code&gt; command to check it. Something like:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;➜ nc -vz opnsense 22
Ncat: Version 7.92 ( https://nmap.org/ncat )
Ncat: Connection to 2400:a888:333:0:222:ffff:fe54:67de failed: TIMEOUT.
Ncat: Trying next address...
Ncat: Connection to 192.168.1.1 failed: TIMEOUT.
Ncat: Trying next address...
Ncat: TIMEOUT.
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;The above output indicates that there is a failed connection between my computer to the remote host &amp;lsquo;opnsense&amp;rsquo; on port 22.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Axum custom request extractor and validator using FromRequest</title>
      <link>https://blog.khmersite.net/p/axum-request-extractor-using-fromrequest/</link>
      <pubDate>Fri, 12 Jul 2024 16:41:07 +1000</pubDate>
      <guid>https://blog.khmersite.net/p/axum-request-extractor-using-fromrequest/</guid>
      <description>&lt;p&gt;This post documents what I learned about creating custom Axum extractor which can be used with the &lt;code&gt;validator&lt;/code&gt; for validation.&lt;/p&gt;
&lt;p&gt;Create a new test project:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;➜ cargo new request-validator
cd request-validator
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;The first crate to be added is &lt;code&gt;axum&lt;/code&gt; for Axum framework.&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;request-validator on  main [?] via 🦀 v1.79.0
➜ cargo add axum
    Updating crates.io index
      Adding axum v0.7.5 to dependencies
             Features:
             + form
             + http1
             + json
             + matched-path
             + original-uri
             + query
             + tokio
             + tower-log
             + tracing
             - __private_docs
             - http2
             - macros
             - multipart
             - ws
    Updating crates.io index
     Locking 82 packages to latest compatible versions
...
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;We also need &lt;code&gt;tokio&lt;/code&gt; crate that works together with &lt;code&gt;axum&lt;/code&gt;.&lt;/p&gt;</description>
    </item>
    <item>
      <title>How to force kill a Podman container</title>
      <link>https://blog.khmersite.net/p/how-to-force-kill-podman-container/</link>
      <pubDate>Sun, 07 Jul 2024 22:43:12 +1000</pubDate>
      <guid>https://blog.khmersite.net/p/how-to-force-kill-podman-container/</guid>
      <description>&lt;p&gt;There is a container that I cannot stop. TL;DR the solution that worked for me was rebooting the host system.&lt;/p&gt;
&lt;p&gt;Anyhow, I&amp;rsquo;ll share the troubleshooting steps that did not work.&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;❯ podman stop semaphore-postgres
WARN[0010] StopSignal SIGINT failed to stop container semaphore-postgres in 10 seconds, resorting to SIGKILL
Error: given PID did not die within timeout

❯ podman ps -a | grep semaphore-postgres
a688a42c4c15  docker.io/library/postgres:16              postgres              17 minutes ago  Stopping               0.0.0.0:3000-&amp;gt;3
000/tcp                          semaphore-postgres
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Instead of &amp;ldquo;If at first you can&amp;rsquo;t stop a container, try, try again&amp;rdquo;, can we just &lt;code&gt;kill&lt;/code&gt; it?&lt;/p&gt;</description>
    </item>
    <item>
      <title>How to find instance Id from the instance metadata</title>
      <link>https://blog.khmersite.net/p/how-to-find-instance-id-from-instance-metadata/</link>
      <pubDate>Sun, 07 Jul 2024 17:07:26 +1000</pubDate>
      <guid>https://blog.khmersite.net/p/how-to-find-instance-id-from-instance-metadata/</guid>
      <description>&lt;p&gt;For instances which use version 2 of instance metadata, IMDSv2, run the following 2 commands:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;[ec2-user@ip-172-31-45-35 ~]$ TOKEN=`curl -X PUT &amp;#34;http://169.254.169.254/latest/api/token&amp;#34; -H &amp;#34;X-aws-ec2-metadata-token-ttl-seconds: 21600&amp;#34;`
[ec2-user@ip-172-31-45-35 ~]$ curl -w &amp;#34;\n&amp;#34; -H &amp;#34;X-aws-ec2-metadata-token: $TOKEN&amp;#34; http://169.254.169.254/latest/meta-data/instance-id
i-04bd6066612345678
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;If you use IMDsv1, then there is no need generate the &lt;code&gt;TOKEN&lt;/code&gt; value first, just query the &lt;code&gt;instance-id&lt;/code&gt; directly:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;[ec2-user@ip-172-31-45-35 ~]$ curl -w &amp;#34;\n&amp;#34; http://169.254.169.254/latest/meta-data/instance-id
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;In my case, it returned nothing as my EC2 instances uses IMDsV2. Oh, by the way, are you aware of &lt;code&gt;-w&lt;/code&gt; or &lt;code&gt;--write-out&lt;/code&gt; flag for &lt;code&gt;curl&lt;/code&gt;? It&amp;rsquo;s pretty cool, you can use it to inject a newline character
e.g. &lt;code&gt;&amp;quot;\n&amp;quot;&lt;/code&gt; to the end of output from the curl command.&lt;/p&gt;</description>
    </item>
    <item>
      <title>How to initiate Session Manager session using CLI</title>
      <link>https://blog.khmersite.net/p/how-to-initiate-session-manager-session-using-cli/</link>
      <pubDate>Fri, 05 Jul 2024 22:36:13 +1000</pubDate>
      <guid>https://blog.khmersite.net/p/how-to-initiate-session-manager-session-using-cli/</guid>
      <description>&lt;p&gt;Tonight I want to connect to an EC2 instance that resides in a private subnet. I currently don&amp;rsquo;t have a bastion host I can use as an
intermediary to jump to this instance. Well, as you might have guessed from this post&amp;rsquo;s title, the AWS Session Manager is something
that might be helpful in this case. So, join me in this journey to configure and set up the Session Manager, using AWS CLI only.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Delete ElastiCache Redis Cluster Using AWS CLI</title>
      <link>https://blog.khmersite.net/p/delete-elasticache-redis-cluster-using-aws-cli/</link>
      <pubDate>Wed, 03 Jul 2024 21:46:56 +1000</pubDate>
      <guid>https://blog.khmersite.net/p/delete-elasticache-redis-cluster-using-aws-cli/</guid>
      <description>&lt;p&gt;Once upon a time there exist an ElastiCache Redis cluster that I no longer needed. I know that the cluster could be deleted via ElastiCache web console.
However, as a command-line addict as myself, I wanted to use AWS CLI to delete the cluster instead.&lt;/p&gt;
&lt;p&gt;Well, actually this is my first time trying to delete an ElastiCache cluster using the CLI. I&amp;rsquo;m going to try to document how I do this, and what mistakes
I&amp;rsquo;d make a long the way. The cluster name is called &amp;lsquo;my-test-cluster&amp;rsquo;. Let&amp;rsquo;s get started&lt;/p&gt;</description>
    </item>
    <item>
      <title>Get connection status for a managed node with AWS CLI</title>
      <link>https://blog.khmersite.net/p/get-connection-status-for-a-managed-node-with-cli/</link>
      <pubDate>Wed, 26 Jun 2024 14:04:44 +1000</pubDate>
      <guid>https://blog.khmersite.net/p/get-connection-status-for-a-managed-node-with-cli/</guid>
      <description>&lt;p&gt;I kept forgetting about the AWS CLI which is quite handy to quickly check if SSM is working on an EC2 instance.&lt;/p&gt;
&lt;p&gt;So here it is again for my future-self. Use &lt;code&gt;get-connection-status&lt;/code&gt; to return the connection status of the specified managed instance.&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;$ aws ssm get-connection-status --target i-092af3b3c1234567

{
  &amp;#34;Status&amp;#34;: &amp;#34;connected&amp;#34;,
  &amp;#34;Target&amp;#34;: &amp;#34;i-092af3b3c1234567&amp;#34;
}
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Reference:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;https://awscli.amazonaws.com/v2/documentation/api/latest/reference/ssm/get-connection-status.html&#34;&gt;get-connection-status&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;</description>
    </item>
    <item>
      <title>PostgreSQL FATAL: Peer Authentication Failed for User Postgres</title>
      <link>https://blog.khmersite.net/p/postgresql-fatal-peer-authentication-failed-for-user-postgres/</link>
      <pubDate>Fri, 21 Jun 2024 14:43:35 +1000</pubDate>
      <guid>https://blog.khmersite.net/p/postgresql-fatal-peer-authentication-failed-for-user-postgres/</guid>
      <description>&lt;p&gt;Recently, I upgraded a server running Ubuntu 22.04 to 24.04, that also comes with PostgreSQL 16.
For some odd reasons, the Postgres server was not managed by Ansible, and changes previously
made to Postgres 15 was not recorded.&lt;/p&gt;
&lt;p&gt;I noticed that the backup database (pg_dump) was not working properly, the backup database size
was just a few kilobytes. Let&amp;rsquo;s investigate, shall we?&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;root@toto:/etc/cron.daily# ./postgresql-backup
pg_dump: error: connection to server on socket &amp;#34;/var/run/postgresql/.s.PGSQL.5432&amp;#34; failed: FATAL:  Peer authentication failed for user &amp;#34;postgres&amp;#34;
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;You might be wondering, what&amp;rsquo;s in &lt;code&gt;postgresql-backup&lt;/code&gt;? Well, nothing fancy.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Postgres: Getting Permission Denied for Schema Public</title>
      <link>https://blog.khmersite.net/p/getting-permission-denied-for-schema-public-postgres/</link>
      <pubDate>Fri, 21 Jun 2024 00:19:52 +1000</pubDate>
      <guid>https://blog.khmersite.net/p/getting-permission-denied-for-schema-public-postgres/</guid>
      <description>&lt;p&gt;I recently upgraded the PostgreSQL server on one my server from version 14 to 16. Why the big jump? This was due to the OS running on this
server was upgraded from Ubuntu 22.04 to 24.04.&lt;/p&gt;
&lt;p&gt;When the database was restored from the database dump, the application that requires that the database detects the new version and tried
to perform the database migration. That&amp;rsquo;s when it failed and produced the following error message:&lt;/p&gt;</description>
    </item>
    <item>
      <title>How to use auto-update in Podman</title>
      <link>https://blog.khmersite.net/p/how-to-use-auto-update-in-podman/</link>
      <pubDate>Sat, 15 Jun 2024 18:42:35 +1000</pubDate>
      <guid>https://blog.khmersite.net/p/how-to-use-auto-update-in-podman/</guid>
      <description>&lt;p&gt;I have a Podman container that needs periodically manual update once in a while. I&amp;rsquo;d like this container to
auto-update, and found that this was possible with podman auto-updates feature.&lt;/p&gt;
&lt;p&gt;Essentially, I need to set a label for the container - &lt;code&gt;--label io.containers.autoupdate=registry&lt;/code&gt;. More details
with and very good explanation about this topic is available at a Red Hat Enable Sysadmin article titled &amp;ldquo;&lt;a href=&#34;https://www.redhat.com/sysadmin/podman-auto-updates-rollbacks&#34;&gt;How to use auto-updates and rollbacks in Podman&lt;/a&gt;&amp;rdquo;.&lt;/p&gt;</description>
    </item>
    <item>
      <title>How to upgrade openSUSE 15.5 to 15.6 using the cli</title>
      <link>https://blog.khmersite.net/p/how-to-upgrade-opensuse-15.5-to-15.6-using-the-cli/</link>
      <pubDate>Wed, 12 Jun 2024 22:44:09 +1000</pubDate>
      <guid>https://blog.khmersite.net/p/how-to-upgrade-opensuse-15.5-to-15.6-using-the-cli/</guid>
      <description>&lt;p&gt;The following note shows how to use Zypper to do a live distribution upgrade of openSUSE Leap 15.5 to openSUSE Leap 15.6.&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;thounchey3:~ # cat /etc/os-release
NAME=&amp;#34;openSUSE Leap&amp;#34;
VERSION=&amp;#34;15.5&amp;#34;
ID=&amp;#34;opensuse-leap&amp;#34;
ID_LIKE=&amp;#34;suse opensuse&amp;#34;
VERSION_ID=&amp;#34;15.5&amp;#34;
PRETTY_NAME=&amp;#34;openSUSE Leap 15.5&amp;#34;
ANSI_COLOR=&amp;#34;0;32&amp;#34;
CPE_NAME=&amp;#34;cpe:/o:opensuse:leap:15.5&amp;#34;
BUG_REPORT_URL=&amp;#34;https://bugs.opensuse.org&amp;#34;
HOME_URL=&amp;#34;https://www.opensuse.org/&amp;#34;
DOCUMENTATION_URL=&amp;#34;https://en.opensuse.org/Portal:Leap&amp;#34;
LOGO=&amp;#34;distributor-logo-Leap&amp;#34;
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Check for the 3 required repositories, ensure they are enabled.`&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;thounchey3:~ # zypper lr -u
Repository priorities are without effect. All enabled repositories share the same priority.

#  | Alias                       | Name                                                                                        | Enabled | GPG Check | Refresh | URI
---+-----------------------------+---------------------------------------------------------------------------------------------+---------+-----------+---------+------------------------------------------------------------------------
 1 | repo-backports-debug-update | Update repository with updates for openSUSE Leap debuginfo packages from openSUSE Backports | No      | ----      | ----    | http://download.opensuse.org/update/leap/15.5/backports_debug/
 2 | repo-backports-update       | Update repository of openSUSE Backports                                                     | Yes     | (r ) Yes  | Yes     | http://download.opensuse.org/update/leap/15.5/backports/
 3 | repo-debug                  | Debug Repository                                                                            | No      | ----      | ----    | http://download.opensuse.org/debug/distribution/leap/15.5/repo/oss/
 4 | repo-debug-non-oss          | Debug Repository (Non-OSS)                                                                  | No      | ----      | ----    | http://download.opensuse.org/debug/distribution/leap/15.5/repo/non-oss/
 5 | repo-debug-update           | Update Repository (Debug)                                                                   | No      | ----      | ----    | http://download.opensuse.org/debug/update/leap/15.5/oss/
 6 | repo-debug-update-non-oss   | Update Repository (Debug, Non-OSS)                                                          | No      | ----      | ----    | http://download.opensuse.org/debug/update/leap/15.5/non-oss/
 7 | repo-non-oss                | Non-OSS Repository                                                                          | Yes     | (r ) Yes  | Yes     | http://download.opensuse.org/distribution/leap/15.5/repo/non-oss/
 8 | repo-openh264               | Open H.264 Codec (openSUSE Leap)                                                            | Yes     | (r ) Yes  | Yes     | http://codecs.opensuse.org/openh264/openSUSE_Leap/
 9 | repo-oss                    | Main Repository                                                                             | Yes     | (r ) Yes  | Yes     | http://download.opensuse.org/distribution/leap/15.5/repo/oss/
10 | repo-sle-debug-update       | Update repository with debuginfo for updates from SUSE Linux Enterprise 15                  | No      | ----      | ----    | http://download.opensuse.org/debug/update/leap/15.5/sle/
11 | repo-sle-update             | Update repository with updates from SUSE Linux Enterprise 15                                | Yes     | (r ) Yes  | Yes     | http://download.opensuse.org/update/leap/15.5/sle/
12 | repo-source                 | Source Repository                                                                           | No      | ----      | ----    | http://download.opensuse.org/source/distribution/leap/15.5/repo/oss/
13 | repo-update                 | Main Update Repository                                                                      | Yes     | (r ) Yes  | Yes     | http://download.opensuse.org/update/leap/15.5/oss/
14 | repo-update-non-oss         | Update Repository (Non-Oss)                                                                 | Yes     | (r ) Yes  | Yes     | http://download.opensuse.org/update/leap/15.5/non-oss/

thounchey3:~ # zypper refresh
Repository &amp;#39;Update repository of openSUSE Backports&amp;#39; is up to date.
Repository &amp;#39;Non-OSS Repository&amp;#39; is up to date.
Repository &amp;#39;Open H.264 Codec (openSUSE Leap)&amp;#39; is up to date.
Repository &amp;#39;Main Repository&amp;#39; is up to date.
Repository &amp;#39;Update repository with updates from SUSE Linux Enterprise 15&amp;#39; is up to date.
Repository &amp;#39;Main Update Repository&amp;#39; is up to date.
Repository &amp;#39;Update Repository (Non-Oss)&amp;#39; is up to date.
All repositories have been refreshed.

thounchey3:~ # zypper update
Loading repository data...
Reading installed packages...
Nothing to do.
&lt;/code&gt;&lt;/pre&gt;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;thounchey3:~ # grep baseurl /etc/zypp/repos.d/*.repo | grep -v releasever                                                     [1321/1321]
/etc/zypp/repos.d/repo-openh264.repo:baseurl=http://codecs.opensuse.org/openh264/openSUSE_Leap/
&lt;/code&gt;&lt;/pre&gt;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;thounchey3:~ # zypper --releasever=15.6 refresh
Warning: Enforced setting: $releasever=15.6
Retrieving repository &amp;#39;Update repository of openSUSE Backports&amp;#39; metadata ..........................................................[done]
Building repository &amp;#39;Update repository of openSUSE Backports&amp;#39; cache ...............................................................[done]
Retrieving repository &amp;#39;Non-OSS Repository&amp;#39; metadata ...............................................................................[done]
Building repository &amp;#39;Non-OSS Repository&amp;#39; cache ....................................................................................[done]
Repository &amp;#39;Open H.264 Codec (openSUSE Leap)&amp;#39; is up to date.                                                                             Retrieving repository &amp;#39;Main Repository&amp;#39; metadata ..................................................................................[done]
Building repository &amp;#39;Main Repository&amp;#39; cache .......................................................................................[done]
Retrieving repository &amp;#39;Update repository with updates from SUSE Linux Enterprise 15&amp;#39; metadata .....................................[done]
Building repository &amp;#39;Update repository with updates from SUSE Linux Enterprise 15&amp;#39; cache ..........................................[done]
Retrieving repository &amp;#39;Main Update Repository&amp;#39; metadata ...........................................................................[done]
Building repository &amp;#39;Main Update Repository&amp;#39; cache ................................................................................[done]
Retrieving repository &amp;#39;Update Repository (Non-Oss)&amp;#39; metadata ......................................................................[done]
Building repository &amp;#39;Update Repository (Non-Oss)&amp;#39; cache ...........................................................................[done]
All repositories have been refreshed.
&lt;/code&gt;&lt;/pre&gt;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;thounchey3:~ # zypper --releasever=15.6 dup --download-in-advance
Warning: Enforced setting: $releasever=15.6
Loading repository data...
Reading installed packages...
Warning: You are about to do a distribution upgrade with all enabled repositories. Make sure these repositories are compatible before you
 continue. See &amp;#39;man zypper&amp;#39; for more information about this command.
Computing distribution upgrade...

The following 163 packages are going to be upgraded:
  ansible apparmor-abstractions apparmor-parser apparmor-profiles bind-utils branding-openSUSE cracklib cracklib-dict-small
  crypto-policies curl dracut dracut-mkinitrd-deprecated e2fsprogs fipscheck firewalld fish gettext-runtime gio-branding-openSUSE
  girepository-1_0 git git-core glib2-tools glibc glibc-devel glibc-locale glibc-locale-base gpg2 grub2 grub2-branding-openSUSE
  grub2-i386-pc grub2-x86_64-efi haveged htop hwloc-data ipset jeos-firstboot kmod krb5 less libapparmor1 libargon2-1 libaugeas0
  libblkid1 libbsd0 libcom_err2 libcontainers-common libcontainers-default-policy libcrack2 libcryptsetup12 libcurl4 libdevmapper1_03
  libext2fs2 libfdisk1 libfido2-1 libfido2-udev libfipscheck1 libgcrypt20 libgio-2_0-0 libgirepository-1_0-1 libglib-2_0-0
...

...
dracut[I]: *** Stripping files ***
dracut[I]: *** Stripping files done ***
dracut[I]: *** Creating image file &amp;#39;/boot/initrd-6.4.0-150600.21-default&amp;#39; ***
dracut[I]: *** Creating initramfs image file &amp;#39;/boot/initrd-6.4.0-150600.21-default&amp;#39; done ***
Running post-transaction scripts ..................................................................................................[done]
There are running programs which still use files and libraries deleted or updated by recent upgrades. They should be restarted to benefit from the latest updates. Run &amp;#39;zypper ps -s&amp;#39; to list these programs.

Since the last system boot core libraries or services have been updated.
Reboot is suggested to ensure that your system benefits from these updates.
&lt;/code&gt;&lt;/pre&gt;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;reboot
&lt;/code&gt;&lt;/pre&gt;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;❯ cat /etc/os-release
NAME=&amp;#34;openSUSE Leap&amp;#34;
VERSION=&amp;#34;15.6&amp;#34;
ID=&amp;#34;opensuse-leap&amp;#34;
ID_LIKE=&amp;#34;suse opensuse&amp;#34;
VERSION_ID=&amp;#34;15.6&amp;#34;
PRETTY_NAME=&amp;#34;openSUSE Leap 15.6&amp;#34;
ANSI_COLOR=&amp;#34;0;32&amp;#34;
CPE_NAME=&amp;#34;cpe:/o:opensuse:leap:15.6&amp;#34;
BUG_REPORT_URL=&amp;#34;https://bugs.opensuse.org&amp;#34;
HOME_URL=&amp;#34;https://www.opensuse.org/&amp;#34;
DOCUMENTATION_URL=&amp;#34;https://en.opensuse.org/Portal:Leap&amp;#34;
LOGO=&amp;#34;distributor-logo-Leap&amp;#34;
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Reference:&lt;/p&gt;</description>
    </item>
    <item>
      <title>Delete unused ENIs on AWS with AWS CLI</title>
      <link>https://blog.khmersite.net/p/delete-unused-enis-on-aws-with-cli/</link>
      <pubDate>Sun, 09 Jun 2024 17:16:23 +1000</pubDate>
      <guid>https://blog.khmersite.net/p/delete-unused-enis-on-aws-with-cli/</guid>
      <description>&lt;p&gt;So I want to clean up Elastic Network Interfaces (ENIs) that were created for testing and no longer needed, and I want to use AWS CLI to do that.&lt;/p&gt;
&lt;p&gt;For me, I know that all unused ENIs will have their status as &amp;ldquo;available&amp;rdquo;. So I will find all those ENIs and will delete them.&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;➜ aws ec2 describe-network-interfaces --filters Name=status,Values=available \
--query &amp;#39;NetworkInterfaces[].{NetworkInterfaceId:NetworkInterfaceId,Description:Description}&amp;#39;
[
    {
        &amp;#34;NetworkInterfaceId&amp;#34;: &amp;#34;eni-0dc616df583312345&amp;#34;,
        &amp;#34;Description&amp;#34;: &amp;#34;2nd nic in 2b az&amp;#34;
    },
    {
        &amp;#34;NetworkInterfaceId&amp;#34;: &amp;#34;eni-0bf98b53cf1b12345&amp;#34;,
        &amp;#34;Description&amp;#34;: &amp;#34;2nd nic&amp;#34;
    },
    {
        &amp;#34;NetworkInterfaceId&amp;#34;: &amp;#34;eni-034bcff8ceef12345&amp;#34;,
        &amp;#34;Description&amp;#34;: &amp;#34;test-eni&amp;#34;
    },
    {
        &amp;#34;NetworkInterfaceId&amp;#34;: &amp;#34;eni-09adbc3a20c912345&amp;#34;,
        &amp;#34;Description&amp;#34;: &amp;#34;Test 2nd eni on custom subnet 2a AZ&amp;#34;
    }
]
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Next, I need to feed each of the values of &amp;ldquo;NetworkInterfaceId&amp;rdquo; to the delete command &lt;code&gt;aws ec2 delete-network-interface&lt;/code&gt;, which takes only 1 NetworkInterfaceId
at a time.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Installing Xe Guest Utilities on OpenSUSE Leap 15.5</title>
      <link>https://blog.khmersite.net/p/installing-xe-guest-utilities-on-opensuse-leap-15.5/</link>
      <pubDate>Sun, 02 Jun 2024 23:02:04 +1000</pubDate>
      <guid>https://blog.khmersite.net/p/installing-xe-guest-utilities-on-opensuse-leap-15.5/</guid>
      <description>&lt;p&gt;This is a quick note on how to install &lt;code&gt;xe-guest-utilities&lt;/code&gt; on OpenSUSE Leap 15.5.&lt;/p&gt;
&lt;p&gt;Unlike other distros like AlmaLinux where &lt;code&gt;xe-guest-utilities&lt;/code&gt; is provided by EPEL repository, on OpenSUSE Leap, this package
is available in the &lt;code&gt;guest-tools.iso&lt;/code&gt; disk. At least, I was not able to find any similar package on OpenSUSE&amp;rsquo;s repositories
which provide this Xe guest utilities.&lt;/p&gt;
&lt;p&gt;Therefore, we first need to attach the &lt;code&gt;guest-tools.iso&lt;/code&gt; disk to the VM.&lt;/p&gt;
&lt;p&gt;On Xen Orchestra web ui, perform the following:&lt;/p&gt;</description>
    </item>
    <item>
      <title>Wicked keeps DUID on OpenSuse 15 even when NIC is replaced</title>
      <link>https://blog.khmersite.net/p/wicked-keeps-duid-on-opensuse-15-even-when-nic-is-replaced/</link>
      <pubDate>Fri, 31 May 2024 20:58:55 +1000</pubDate>
      <guid>https://blog.khmersite.net/p/wicked-keeps-duid-on-opensuse-15-even-when-nic-is-replaced/</guid>
      <description>&lt;p&gt;I have migrated a VM running on Proxmox to Xcpng host. Despite the imported VM on Xcpng has a new NIC with new MAC address, it still retained old IP address asssigned
to the old MAC of the VM running on Proxmox. The VM is running OpenSUSE Leap 15.5 and use &lt;code&gt;wicked&lt;/code&gt; for network management. How to fix this?&lt;/p&gt;
&lt;p&gt;Spoiler alert, I figured out how to fix it.&lt;/p&gt;
&lt;p&gt;First, let&amp;rsquo;s run some commands to display some information. Here, the new MAC address for &lt;code&gt;eth0&lt;/code&gt; NIC is &lt;code&gt;12:ea:4c:8f:34:f2&lt;/code&gt;. The IP addres &lt;code&gt;192.168.1.132&lt;/code&gt; is allocated by DHCP
service running on OPNsense router for a device with MAC &lt;code&gt;02:14:98:8a:c5:2c&lt;/code&gt;.&lt;/p&gt;</description>
    </item>
    <item>
      <title>How to upgrade FreeBSD 13.2 to 14.0</title>
      <link>https://blog.khmersite.net/p/how-to-upgrade-freebsd-13.2-to-14.0/</link>
      <pubDate>Wed, 29 May 2024 22:24:45 +1000</pubDate>
      <guid>https://blog.khmersite.net/p/how-to-upgrade-freebsd-13.2-to-14.0/</guid>
      <description>&lt;p&gt;I just found out that FreeBSD 13.2-RELEASE will be end-of-life support within 1 month time from now. It&amp;rsquo;s time to upgrade FreeBSD on one of nas boxes
to 14.0-RELEASE. The following is to capture the steps used to perform the upgrade. It&amp;rsquo;s similar to my old &lt;a href=&#34;https://blog.khmersite.net/p/how-to-upgrade-freebsd-13.0-to-13.1/&#34;&gt;post&lt;/a&gt;.&lt;/p&gt;
&lt;ol start=&#34;0&#34;&gt;
&lt;li&gt;SSH into the server, and run &lt;code&gt;tmux&lt;/code&gt; or &lt;code&gt;screen&lt;/code&gt;. You really don&amp;rsquo;t want to lose SSH connection during the upgrade.&lt;/li&gt;
&lt;/ol&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;$ ssh kenno@nas2

$ tmux
&lt;/code&gt;&lt;/pre&gt;&lt;ol&gt;
&lt;li&gt;Check the current running version of FreeBSD:&lt;/li&gt;
&lt;/ol&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;root@nas2:~ # freebsd-version
13.2-RELEASE-p11
&lt;/code&gt;&lt;/pre&gt;&lt;ol start=&#34;2&#34;&gt;
&lt;li&gt;Make sure the system is up-to-date with all the patches:&lt;/li&gt;
&lt;/ol&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;root@nas2:~ # freebsd-update fetch
root@nas2:~ # freebsd-update install

root@nas2:~ # pkg update
root@nas2:~ # pkg upgrade
&lt;/code&gt;&lt;/pre&gt;&lt;ol start=&#34;3&#34;&gt;
&lt;li&gt;Upgrade FreeBSD from 13.2 to 14.0&lt;/li&gt;
&lt;/ol&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;root@nas2:~ # freebsd-update -r 14.0-RELEASE upgrade
src component not installed, skipped
Looking up update.FreeBSD.org mirrors... 3 mirrors found.
Fetching metadata signature for 13.2-RELEASE from update1.freebsd.org... done.
Fetching metadata index... done.
Inspecting system... done.

The following components of FreeBSD seem to be installed:
kernel/generic kernel/generic-dbg world/base world/lib32

The following components of FreeBSD do not seem to be installed:
world/base-dbg world/lib32-dbg

Does this look reasonable (y/n)? y

Fetching metadata signature for 14.0-RELEASE from update1.freebsd.org... done.
Fetching metadata index... done.
Fetching 1 metadata patches. done.
Applying metadata patches... done.
Fetching 1 metadata files... done.
Inspecting system...
&lt;/code&gt;&lt;/pre&gt;&lt;ol start=&#34;4&#34;&gt;
&lt;li&gt;Wait for a long while&amp;hellip; then when the update process detects changes in some important files, I&amp;rsquo;m asked to decide what to do by editing that file,
pick the desired changes, and save them. For example:&lt;/li&gt;
&lt;/ol&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;The following changes, which occurred between FreeBSD 13.2-RELEASE and                                                                       [0/143]
FreeBSD 14.0-RELEASE have been merged into /etc/ssh/sshd_config:
--- current version
+++ new version
@@ -87,11 +87,11 @@
 #UsePAM yes

 #AllowAgentForwarding yes
 #AllowTcpForwarding yes
 #GatewayPorts no
-#X11Forwarding yes
+#X11Forwarding no
 #X11DisplayOffset 10
 #X11UseLocalhost yes
 #PermitTTY yes
 #PrintMotd yes
 #PrintLastLog yes
@@ -104,11 +104,11 @@
 #PidFile /var/run/sshd.pid
 #MaxStartups 10:30:100
 #PermitTunnel no
 #ChrootDirectory none
 #UseBlacklist no
-#VersionAddendum FreeBSD-20230719
+#VersionAddendum FreeBSD-20231004

 # no default banner path
 #Banner none

 # override default of no subsystems
Does this look reasonable (y/n)? y

The following changes, which occurred between FreeBSD 13.2-RELEASE and
FreeBSD 14.0-RELEASE have been merged into /etc/sysctl.conf:
--- current version
+++ new version
@@ -1,6 +1,5 @@
-# $FreeBSD$
 #
 #  This file is read when going to multi-user and its contents piped thru
 #  ``sysctl&amp;#39;&amp;#39; to adjust kernel values.  ``man 5 sysctl.conf&amp;#39;&amp;#39; for details.
 #

Does this look reasonable (y/n)? y
To install the downloaded upgrades, run &amp;#34;/usr/sbin/freebsd-update install&amp;#34;.
&lt;/code&gt;&lt;/pre&gt;&lt;ol start=&#34;5&#34;&gt;
&lt;li&gt;Perform the update by running the above suggested command.&lt;/li&gt;
&lt;/ol&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;root@nas2:~ # /usr/sbin/freebsd-update install
src component not installed, skipped
Creating snapshot of existing boot environment... done.
Installing updates...
Kernel updates have been installed.  Please reboot and run
&amp;#34;/usr/sbin/freebsd-update install&amp;#34; again to finish installing updates.
&lt;/code&gt;&lt;/pre&gt;&lt;ol start=&#34;6&#34;&gt;
&lt;li&gt;I guess we know what to do next&amp;hellip;&lt;/li&gt;
&lt;/ol&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;root@nas2:~ # reboot
Connection to nas2 closed by remote host.
Connection to nas2 closed.
&lt;/code&gt;&lt;/pre&gt;&lt;ol start=&#34;7&#34;&gt;
&lt;li&gt;Reconnect to the server with SSH. There is no need to run &amp;rsquo;tmux&amp;rsquo; session this time.&lt;/li&gt;
&lt;/ol&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;root@nas2:~ # /usr/sbin/freebsd-update install
src component not installed, skipped
Creating snapshot of existing boot environment... done.
Installing updates...rm: ///usr/include/c++/v1/__string: is a directory

Restarting sshd after upgrade
Performing sanity check on sshd configuration.
Stopping sshd.
Waiting for PIDS: 863.
Performing sanity check on sshd configuration.
Starting sshd.
Scanning /usr/share/certs/untrusted for certificates...
Scanning /usr/share/certs/trusted for certificates...

Completing this upgrade requires removing old shared object files.
Please rebuild all installed 3rd party software (e.g., programs
installed from the ports tree) and then run &amp;#34;/usr/sbin/freebsd-update install&amp;#34;
again to finish installing updates.
&lt;/code&gt;&lt;/pre&gt;&lt;ol start=&#34;8&#34;&gt;
&lt;li&gt;How to rebuild all installed 3rd party software? I&amp;rsquo;m guessing I need to run &lt;code&gt;pkg update &amp;amp;&amp;amp; pkg upgrade&lt;/code&gt;.&lt;/li&gt;
&lt;/ol&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;root@nas2:~ # pkg update
pkg: Warning: Major OS version upgrade detected.  Running &amp;#34;pkg bootstrap -f&amp;#34; recommended
Updating FreeBSD repository catalogue...
pkg: Repository FreeBSD has a wrong packagesite, need to re-create database
Fetching meta.conf: 100%    178 B   0.2kB/s    00:01
Fetching data.pkg: 100%    7 MiB   3.6MB/s    00:02
Processing entries: 100%
FreeBSD repository update completed. 34072 packages processed.
All repositories are up to date.
&lt;/code&gt;&lt;/pre&gt;&lt;ol start=&#34;9&#34;&gt;
&lt;li&gt;Love the suggestion about running &lt;code&gt;pkg bootstrap -f&lt;/code&gt;.&lt;/li&gt;
&lt;/ol&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;root@nas2:~ # pkg bootstrap -f
The package management tool is not yet installed on your system.
Do you want to fetch and install it now? [y/N]: y
Bootstrapping pkg from pkg+http://pkg.FreeBSD.org/FreeBSD:14:amd64/quarterly, please wait...
Verifying signature with trusted certificate pkg.freebsd.org.2013102301... done
Installing pkg-1.21.3...
package pkg is already installed, forced install
Extracting pkg-1.21.3: 100%
&lt;/code&gt;&lt;/pre&gt;&lt;ol start=&#34;10&#34;&gt;
&lt;li&gt;This time, I should be able to continue updating the 3rd party software.&lt;/li&gt;
&lt;/ol&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;root@nas2:~ # pkg update
Updating FreeBSD repository catalogue...
FreeBSD repository is up to date.
All repositories are up to date.
root@nas2:~ # pkg upgrade
Updating FreeBSD repository catalogue...
FreeBSD repository is up to date.
All repositories are up to date.
Updating database digests format: 100%
Checking for upgrades (44 candidates): 100%
Processing candidates (44 candidates): 100%
The following 43 package(s) will be affected (of 0 checked):

Installed packages to be REINSTALLED:
        binutils-2.40_5,1 (ABI changed: &amp;#39;freebsd:13:x86:64&amp;#39; -&amp;gt; &amp;#39;freebsd:14:x86:64&amp;#39;)
        bsdinfo-0.22_2 (ABI changed: &amp;#39;freebsd:13:x86:64&amp;#39; -&amp;gt; &amp;#39;freebsd:14:x86:64&amp;#39;)
        btop-1.3.2 (ABI changed: &amp;#39;freebsd:13:x86:64&amp;#39; -&amp;gt; &amp;#39;freebsd:14:x86:64&amp;#39;)
        dmidecode-3.5 (ABI changed: &amp;#39;freebsd:13:x86:64&amp;#39; -&amp;gt; &amp;#39;freebsd:14:x86:64&amp;#39;)
...&amp;lt;SNIP&amp;gt;...
        tmux-3.3a_2 (ABI changed: &amp;#39;freebsd:13:x86:64&amp;#39; -&amp;gt; &amp;#39;freebsd:14:x86:64&amp;#39;)
        tree-sitter-0.22.2 (ABI changed: &amp;#39;freebsd:13:x86:64&amp;#39; -&amp;gt; &amp;#39;freebsd:14:x86:64&amp;#39;)
        unibilium-2.1.1_1 (ABI changed: &amp;#39;freebsd:13:x86:64&amp;#39; -&amp;gt; &amp;#39;freebsd:14:x86:64&amp;#39;)
        zstd-1.5.6 (ABI changed: &amp;#39;freebsd:13:x86:64&amp;#39; -&amp;gt; &amp;#39;freebsd:14:x86:64&amp;#39;)

Number of packages to be reinstalled: 43

395 MiB to be downloaded.

Proceed with this action? [y/N]: y
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;That&amp;rsquo;s it!&lt;/p&gt;</description>
    </item>
    <item>
      <title>Rust cannot find derive macro `Serialize` in this scope</title>
      <link>https://blog.khmersite.net/p/rust-cannot-derive-macro-in-this-scope/</link>
      <pubDate>Wed, 22 May 2024 22:46:23 +1000</pubDate>
      <guid>https://blog.khmersite.net/p/rust-cannot-derive-macro-in-this-scope/</guid>
      <description>&lt;p&gt;While trying out some Rust exercises, I came across the following error:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;$ cargo run --bin iter2
   Compiling tutor-web-app-ssr v0.1.0 (/home/kenno/dev/rust/chapter7/ezytutors/tutor-web-app-ssr)
error: cannot find derive macro `Serialize` in this scope
  --&amp;gt; tutor-web-app-ssr/src/bin/iter2.rs:17:10
   |
17 | #[derive(Serialize, Deserialize)]
   |          ^^^^^^^^^
   |
note: `Serialize` is imported here, but it is only a trait, without a derive macro
  --&amp;gt; tutor-web-app-ssr/src/bin/iter2.rs:5:26
   |
5  | use serde::{Deserialize, Serialize};
   |                          ^^^^^^^^^

error: cannot find derive macro `Deserialize` in this scope
  --&amp;gt; tutor-web-app-ssr/src/bin/iter2.rs:17:21
   |
17 | #[derive(Serialize, Deserialize)]

&amp;lt;SNIP&amp;gt;
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;This happened because I didn&amp;rsquo;t specify the required dependency feature for &lt;code&gt;serde&lt;/code&gt; crate. Here is what I had in &lt;code&gt;Cargo.toml&lt;/code&gt; when the above error occurred:&lt;/p&gt;</description>
    </item>
    <item>
      <title>How to generate Let&#39;s Encrypt SSL cert for Bitnami Lightsail</title>
      <link>https://blog.khmersite.net/p/how-to-generate-letsencrypt-ssl-cert-for-bitnami-lightsail/</link>
      <pubDate>Wed, 22 May 2024 15:10:58 +1000</pubDate>
      <guid>https://blog.khmersite.net/p/how-to-generate-letsencrypt-ssl-cert-for-bitnami-lightsail/</guid>
      <description>&lt;p&gt;So you just setup a new shiny WordPress website on a Lightsail (WordPress) instance. Now, you&amp;rsquo;ve been told to setup an SSL certificate for your
website domain. What to do? The following steps show how to generate a free SSL certificate provided by Let&amp;rsquo;s Encrypt.&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;bitnami@ip-172-26-12-25:~$ sudo /opt/bitnami/bncert-tool
----------------------------------------------------------------------------
Welcome to the Bitnami HTTPS Configuration tool.

----------------------------------------------------------------------------
Domains

Please provide a valid space-separated list of domains for which you wish to 
configure your web server.

Domain list []: lightsail.example.com

The following domains were not included: www.lightsail.example.com.
Do you want to add them? [Y/n]: n

Warning: No www domains (e.g. www.example.com) or non-www domains (e.g. www.example.com)
have been provided, so the following redirections will be disabled: non-www 
to www, www to non-www.
Press [Enter] to continue:

----------------------------------------------------------------------------
Enable/disable redirections

Please select the redirections you wish to enable or disable on your Bitnami installation.

Enable HTTP to HTTPS redirection [Y/n]: Y

----------------------------------------------------------------------------
Changes to perform

The following changes will be performed to your Bitnami installation:

1. Stop web server
2. Configure web server to use a free Let&amp;#39;s Encrypt certificate for the domains: lightsail.example.com
3. Configure a cron job to automatically renew the certificate each month
4. Configure web server name to: lightsail.example.com
5. Enable HTTP to HTTPS redirection (example: redirect http://lightsail.example.com to https://lightsail.example.com)
6. Start web server once all changes have been performed

Do you agree to these changes? [Y/n]: Y

----------------------------------------------------------------------------
Create a free HTTPS certificate with Let&amp;#39;s Encrypt

Please provide a valid e-mail address for which to associate your Let&amp;#39;s Encrypt certificate.

Domain list: lightsail.example.com

Server name: lightsail.example.com

E-mail address []: validemail@example.com

The Let&amp;#39;s Encrypt Subscriber Agreement can be found at:

https://letsencrypt.org/documents/LE-SA-v1.3-September-21-2022.pdf

Do you agree to the Let&amp;#39;s Encrypt Subscriber Agreement? [Y/n]:

----------------------------------------------------------------------------
Performing changes to your installation

The Bitnami HTTPS Configuration Tool will perform any necessary actions to your Bitnami installation. 
This may take some time, please be patient.

----------------------------------------------------------------------------
Success

The Bitnami HTTPS Configuration Tool succeeded in modifying your installation.

The configuration report is shown below.

Backup files:
* /opt/bitnami/apache/conf/httpd.conf.back.202405220509
* /opt/bitnami/apache/conf/bitnami/bitnami.conf.back.202405220509
* /opt/bitnami/apache/conf/bitnami/bitnami-ssl.conf.back.202405220509
* /opt/bitnami/apache/conf/vhosts/wordpress-https-vhost.conf.back.202405220509
* /opt/bitnami/apache/conf/vhosts/wordpress-vhost.conf.back.202405220509

Find more details in the log file:

/tmp/bncert-202405220509.log

If you find any issues, please check Bitnami Support forums at:

https://github.com/bitnami/vms

Press [Enter] to continue:
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;That&amp;rsquo;s it.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Nvim Treesitter reinstalls parser every time Neovim starts</title>
      <link>https://blog.khmersite.net/p/nvim-treesitter-reinstalls-parser-every-time-neovim-starts/</link>
      <pubDate>Sat, 18 May 2024 13:23:05 +1000</pubDate>
      <guid>https://blog.khmersite.net/p/nvim-treesitter-reinstalls-parser-every-time-neovim-starts/</guid>
      <description>&lt;p&gt;I&amp;rsquo;m in the process of migrating existing Neovim plugins managed by Packer to a new plugin manager called &amp;lsquo;Lazy&amp;rsquo;.&lt;/p&gt;
&lt;p&gt;While setting the nvim-treesitter plugin, I came across this issue that &lt;strong&gt;nvim-treesitter&lt;/strong&gt; keeps reinstalling all language parsers every time Neovim is started.&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;[nvim-treesitter] [5/5] Treesitter parse for vim has been installed
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;What happened? Well, it turns out this is is pretty much a common issue when you switching from Packer to Lazy plugin manager without cleaning up files and directories created by Packer according to &lt;a href=&#34;https://www.reddit.com/r/neovim/comments/12oje2g/treesitter_reinstalls_parsers_every_time_neovim/&#34;&gt;this&lt;/a&gt; [1].&lt;/p&gt;</description>
    </item>
    <item>
      <title>Adjusting Firefox DPI</title>
      <link>https://blog.khmersite.net/p/adjusting-firefox-dpi/</link>
      <pubDate>Sat, 04 May 2024 21:33:15 +1000</pubDate>
      <guid>https://blog.khmersite.net/p/adjusting-firefox-dpi/</guid>
      <description>&lt;p&gt;On a few of my computers with 4K monitors running Linux, Firefox either display with tiny fonts or very large fonts, while most applications behave normally.&lt;/p&gt;
&lt;p&gt;After searching for a work around, I found the following solution works for me: setting the &lt;code&gt;layout.css.devPixelsPerPx&lt;/code&gt; to a smaller number, e.g. 0.7.&lt;/p&gt;
&lt;p&gt;From this &lt;a href=&#34;https://support.mozilla.org/mk/questions/1378420&#34;&gt;this page&lt;/a&gt;:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;You can set layout.css.devPixelsPerPx to 1.0 (default is -1) on the about:config page. Adjust its value in 0.1 or 0.05 steps (1.1 to enlarge or 0.9 to reduce) until icons or text looks right. You may need values above 2.0 if you have a high resolution display but make sure not to use values too large or too small.&lt;/p&gt;</description>
    </item>
    <item>
      <title>ipcalc - Perform simple operations on IP addresses and networks</title>
      <link>https://blog.khmersite.net/p/ipcalc/</link>
      <pubDate>Thu, 02 May 2024 22:37:48 +1000</pubDate>
      <guid>https://blog.khmersite.net/p/ipcalc/</guid>
      <description>&lt;p&gt;Tonight I just stumbled on a command line tool or utility called &lt;code&gt;ipcacl&lt;/code&gt;. This tool is used to perform operations on IP addresses and networks.&lt;/p&gt;
&lt;p&gt;On Fedora, &lt;code&gt;ipcalc&lt;/code&gt; is provided by &lt;code&gt;ipcacl&lt;/code&gt; package. If you on a different distro, search for &lt;code&gt;ipcaclc&lt;/code&gt;, there should be a similar package name.&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;➜ rpm -q ipcalc
ipcalc-1.0.3-9.fc40.x86_64
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Here are some examples of what we can use this utility for, though I encourage you to run &lt;code&gt;man ipcalc&lt;/code&gt; to learn more what you can do with it.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Deploy metrics-server in Kubernetes using Helm</title>
      <link>https://blog.khmersite.net/p/deploy-metrics-server-in-kubernetes-using-helm/</link>
      <pubDate>Wed, 24 Apr 2024 01:20:00 +1000</pubDate>
      <guid>https://blog.khmersite.net/p/deploy-metrics-server-in-kubernetes-using-helm/</guid>
      <description>&lt;p&gt;This is a short note on how to install &lt;a href=&#34;https://github.com/kubernetes-sigs/metrics-server&#34;&gt;metrics-server&lt;/a&gt; using Helm on my k8s cluster.&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;$ kubectl version
Client Version: v1.29.3
Kustomize Version: v5.0.4-0.20230601165947-6ce0bf390ce3
Server Version: v1.29.3

$ helm version --short
v3.14.4+g81c902a
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Before we can install the chart, we will need to add the metrics-server repo to Helm.&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;$ helm repo add metrics-server https://kubernetes-sigs.github.io/metrics-server/
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Update the repo:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;$ helm repo update
Hang tight while we grab the latest from your chart repositories...
...Successfully got an update from the &amp;#34;metrics-server&amp;#34; chart repository
Update Complete. ⎈Happy Helming!⎈
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;I also need to make a small customization to the chart&amp;rsquo;s default value since my k8s cluster uses self-signed certificates.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Connect to a Redis cluster with Python</title>
      <link>https://blog.khmersite.net/p/connect-to-redis-cluster-with-python/</link>
      <pubDate>Wed, 03 Apr 2024 22:27:50 +1100</pubDate>
      <guid>https://blog.khmersite.net/p/connect-to-redis-cluster-with-python/</guid>
      <description>&lt;p&gt;To connect to a Redis server with Python, one can use &lt;code&gt;python3-redis&lt;/code&gt; module.&lt;/p&gt;
&lt;p&gt;First verify that &lt;code&gt;python3-redis&lt;/code&gt; module is installed. I&amp;rsquo;m showing the package name in Fedora 39, if you use a different distro, then check for the relevant package name.&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;$ rpm -q python3-redis
python3-redis-4.3.3-1.el9.noarch
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Here is the sample code to connect to a non-cluster Redis server:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-python&#34; data-lang=&#34;python&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#f92672&#34;&gt;import&lt;/span&gt; redis
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#75715e&#34;&gt;# Connect to Redis&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;r &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; redis&lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt;Redis(host&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#39;10.97.147.175&amp;#39;&lt;/span&gt;, port&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;&lt;span style=&#34;color:#ae81ff&#34;&gt;6379&lt;/span&gt;)
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#75715e&#34;&gt;# Set a key-value pair&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;r&lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt;set(&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#39;my_key&amp;#39;&lt;/span&gt;, &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#39;Hello, Redis!&amp;#39;&lt;/span&gt;)
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#75715e&#34;&gt;# Get the value of the key&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;value &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; r&lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt;get(&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#39;my_key&amp;#39;&lt;/span&gt;)
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;print(value&lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt;decode(&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#39;utf-8&amp;#39;&lt;/span&gt;))
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;If you want to connect to a Redis cluster (that has both master and replicas), use this version instead:&lt;/p&gt;</description>
    </item>
    <item>
      <title>How to convert putty ppk to pem on macOS</title>
      <link>https://blog.khmersite.net/p/how-to-convert-putty-ppk-to-pem-on-macos/</link>
      <pubDate>Thu, 28 Mar 2024 17:03:00 +1100</pubDate>
      <guid>https://blog.khmersite.net/p/how-to-convert-putty-ppk-to-pem-on-macos/</guid>
      <description>&lt;p&gt;Assuming that you use &lt;code&gt;brew&lt;/code&gt; on your macOS, converting a ppk file to pem file is relatively easy.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Install putty on your mac&lt;/li&gt;
&lt;/ol&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;➜ brew install putty
&lt;/code&gt;&lt;/pre&gt;&lt;ol start=&#34;2&#34;&gt;
&lt;li&gt;Generate the key&lt;/li&gt;
&lt;/ol&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;➜ puttygen existing_key.ppk -O private-openssh -o new_key.pem
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Here are the options used in above command:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;-O private-openssh&lt;/code&gt; : save the output as a SSH-2 private key&lt;/li&gt;
&lt;li&gt;&lt;code&gt;-o new_key.pem&lt;/code&gt; : save the output to &lt;code&gt;new_key.pem&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Full credit go to this blog post [1], where I had learned to convert a PPK to PEM file.&lt;/p&gt;</description>
    </item>
    <item>
      <title>How to deploy Uptime Kuma on kubernetes</title>
      <link>https://blog.khmersite.net/p/how-to-deploy-uptime-kuma-on-kubernetes/</link>
      <pubDate>Fri, 15 Mar 2024 18:39:02 +1100</pubDate>
      <guid>https://blog.khmersite.net/p/how-to-deploy-uptime-kuma-on-kubernetes/</guid>
      <description>&lt;p&gt;I&amp;rsquo;ve been running Uptime Kuma on a podman-container for a long time with no problem. Recently, though, I&amp;rsquo;ve been running a mini Kubernetes cluster at home, and decided to move this conatainer to the same cluster.&lt;/p&gt;
&lt;p&gt;The following is to document how I deploy Uptime Kuma on a Kubernetes cluster.&lt;/p&gt;
&lt;p&gt;As I&amp;rsquo;m new to Kubernetes world, I broke down the tasks I need to do in 6 pieces:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;$ ls -1
1.namespace.yaml
2.service.yaml
3.pvc.yaml
4.deployment.yaml
5.tls-secret.yaml
6.ingress.yaml
&lt;/code&gt;&lt;/pre&gt;&lt;ol&gt;
&lt;li&gt;The first step is to create a new namespace for this application or deployment. It&amp;rsquo;ll be called &amp;lsquo;uptime-kuma&amp;rsquo;.&lt;/li&gt;
&lt;/ol&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;$ cat 1.namespace.yaml
kind: Namespace
apiVersion: v1
metadata:
  name: uptime-kuma

$ kubectl apply -f ./1.namespace.yaml
&lt;/code&gt;&lt;/pre&gt;&lt;ol start=&#34;2&#34;&gt;
&lt;li&gt;Create a new service, which will listen on port 3001.&lt;/li&gt;
&lt;/ol&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;$ cat 2.service.yaml
apiVersion: v1
kind: Service
metadata:
  name: uptime-kuma-svc
  namespace: uptime-kuma
spec:
  selector:
    app: uptime-kuma
  ports:
  - name: uptime-kuma
    port: 3001
    targetPort: 3001
    protocol: TCP
&lt;/code&gt;&lt;/pre&gt;&lt;ol start=&#34;3&#34;&gt;
&lt;li&gt;Next is to create a persistent volume claim for Uptime Kuma&amp;rsquo;s app data. Based on the current usage on my existing podman-container, 512 MiB is plenty. In my cluster, I use Longhorn as the persistent block storage.&lt;/li&gt;
&lt;/ol&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;$ cat 3.pvc.yaml
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
  name: uptime-kuma-pvc
  namespace: uptime-kuma
spec:
  accessModes:
    - ReadWriteOnce
  storageClassName: longhorn
  resources:
    requests:
      storage: 512Mi
&lt;/code&gt;&lt;/pre&gt;&lt;ol start=&#34;4&#34;&gt;
&lt;li&gt;Here is the deployment file.&lt;/li&gt;
&lt;/ol&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;$ cat 4.deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
  name: uptime-kuma
  namespace: uptime-kuma
spec:
  selector:
    matchLabels:
      app: uptime-kuma
  replicas: 1
  strategy:
    type: RollingUpdate
    rollingUpdate:
      maxSurge: 1
      maxUnavailable: 1
  template:
    metadata:
      labels:
        app: uptime-kuma
    spec:
      containers:
      - name: uptime-kuma
        image: louislam/uptime-kuma:1.23.11
        imagePullPolicy: IfNotPresent
        ports:
        - containerPort: 3001
          name: web-ui
        resources:
          limits:
            cpu: 200m
            memory: 512Mi
          requests:
            cpu: 50m
            memory: 128Mi
        livenessProbe:
          tcpSocket:
            port: web-ui
          initialDelaySeconds: 60
          periodSeconds: 10
        readinessProbe:
          httpGet:
            scheme: HTTP
            path: /
            port: web-ui
          initialDelaySeconds: 30
          periodSeconds: 10
        volumeMounts:
        - name: data
          mountPath: /app/data
      volumes:
      - name: data
        persistentVolumeClaim:
          claimName: uptime-kuma-pvc
&lt;/code&gt;&lt;/pre&gt;&lt;ol start=&#34;5&#34;&gt;
&lt;li&gt;(Optional) I want to use SSL when accessing the web UI of Uptime Kuma, therefore I need to create a new TLS secret.&lt;/li&gt;
&lt;/ol&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;$ cat 5.tls-secret.yaml
apiVersion: v1
data:
  tls.crt: VERY-LONG-BASE-64-ENCODED-STRING
  tls.key: ANOTHER-LONG-BASE-64-ENCODED-STRING
kind: Secret
metadata:
  name: wildcard-tls-secret
  namespace: uptime-kuma
type: kubernetes.io/tls
&lt;/code&gt;&lt;/pre&gt;&lt;ol start=&#34;6&#34;&gt;
&lt;li&gt;The last file &lt;code&gt;6.ingress.yaml&lt;/code&gt; contains the manifest for ingress-nginx which allows me to access the Uptime Kuma at &lt;a href=&#34;https://uptime.home-lab-internal-domain.com&#34;&gt;https://uptime.home-lab-internal-domain.com&lt;/a&gt;:&lt;/li&gt;
&lt;/ol&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;$ cat 6.ingress.yaml
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: uptime-kuma-ingress
  namespace: uptime-kuma
spec:
  ingressClassName: nginx
  tls:
  - hosts:
    - uptime.home-lab-internal-domain.com
    secretName: wildcard-tls-secret
  rules:
  - host: uptime.home-lab-internal-domain.com
    http:
      paths:
      - path: /
        pathType: Prefix
        backend:
          service:
            name: uptime-kuma-svc
            port:
              number: 3001
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;References:&lt;/p&gt;</description>
    </item>
    <item>
      <title>How to attach instance profile on EC2 with AWS CLI</title>
      <link>https://blog.khmersite.net/p/how-to-attach-instance-profile-on-ec2-with-cli/</link>
      <pubDate>Tue, 05 Mar 2024 18:08:15 +1100</pubDate>
      <guid>https://blog.khmersite.net/p/how-to-attach-instance-profile-on-ec2-with-cli/</guid>
      <description>&lt;p&gt;This is a quick note to remind me on how to attach or associate an instance profile (IAM role) to an EC2 instance using AWS CLI. There is
a bonus section at the end to show how to replace one IAM role with another one directly.&lt;/p&gt;
&lt;p&gt;In this example, I already have a running EC2 instance i-0357ecc1111111111 running. I want to attach a new instance profile called
&lt;strong&gt;SSMInstanceProfile&lt;/strong&gt; to this instance. But as we all know, only one instance profile can be associated with an EC2 instance at one time. So, let&amp;rsquo;s check
to see if our instance already has one attached:&lt;/p&gt;</description>
    </item>
    <item>
      <title>Transform SSL cert to inline format</title>
      <link>https://blog.khmersite.net/p/transform-ssl-cert-to-inline-format/</link>
      <pubDate>Tue, 27 Feb 2024 23:31:27 +1100</pubDate>
      <guid>https://blog.khmersite.net/p/transform-ssl-cert-to-inline-format/</guid>
      <description>&lt;p&gt;We all know that the content of SSL CRT and KEY is a long string of characters broken by new line characters. If we want to use those SSL .crt and .key files with Kubernetes as a TLS secret, they required to be encoded as base64 and be in one-line.&lt;/p&gt;
&lt;p&gt;How to do this? Well, there are at least two ways. The first one is my favorite:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;$ base64 -w0 drone.example.com.crt

LS0tLS1CRUdJTiBDRVJUSUXXX0FURS0tLS0tCk11SOQrekNDQXVPZ0F3SUJBZ0lVZW5BejFjb0ptakd4Q1dGVHRhOWVzeUM2WHZRd0RRWUpLb1pJaHZjTkFRRUwKQlFBd2dZUXhDekFKQmdOVkJBWVRBa0ZWTVJnd0ZnWURWUVFJREE5T1pYY2dVMjkxZEdnZ1YyRnNaWE14RHpBTgpCZ05WQkFjTUJsTjVaRzVsZVRFUk1BOEdBMVVFQ2d3SVUyRnV0eUJKYm1NeEV6QVJCZ05WQkFNTUNsTmhibmtnClUyVjJaVzR4SWpBZ0Jna3Foa2lHOXcwQkNRRVdFMjV2Y21Wd2JIbEFjMkZ1TjJsdVl5NWpiMjB3SGhjTk1qTXcKTmpFNE1ETTFOVFV4V2hjTk1qVXdPVEl3TURNMU5UVXhXakNCalRFTE1Ba0dBMVVFQmhNQ1FWVXhHREFXQmdOVgpCQWdNRDA1bGR5QlRiM1Yw
...
&lt;/code&gt;&lt;/pre&gt;&lt;ul&gt;
&lt;li&gt;&lt;code&gt;w0&lt;/code&gt; : disable line wrapping&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Another way is to use the good old &lt;code&gt;tr&lt;/code&gt; command:&lt;/p&gt;</description>
    </item>
    <item>
      <title>Set Alacritty default dimensions TOML version</title>
      <link>https://blog.khmersite.net/p/set-alacritty-default-dimensions-toml/</link>
      <pubDate>Wed, 14 Feb 2024 16:48:10 +1100</pubDate>
      <guid>https://blog.khmersite.net/p/set-alacritty-default-dimensions-toml/</guid>
      <description>&lt;p&gt;I have previously posted a similar &lt;a href=&#34;https://blog.khmersite.net/p/set-alacritty-default-dimensions/&#34;&gt;topic&lt;/a&gt; on how to set the default dimension for Alacritty
at launch. However, recently, Alacritty switched to &lt;a href=&#34;https://toml.io/en/&#34;&gt;TOML&lt;/a&gt; for its configuration.&lt;/p&gt;
&lt;p&gt;Here is the setting needs to be added to &lt;code&gt;~/.config/alacritty/alacritty.toml&lt;/code&gt;:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;[window.dimensions]
columns = 133
lines = 40
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Reference:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;https://blog.khmersite.net/p/set-alacritty-default-dimensions/&#34;&gt;https://blog.khmersite.net/p/set-alacritty-default-dimensions/&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;</description>
    </item>
    <item>
      <title>How to restore a VM to its previous state XCP-ng</title>
      <link>https://blog.khmersite.net/p/how-to-restore-vm-to-its-previous-state-xcpng/</link>
      <pubDate>Thu, 04 Jan 2024 20:21:33 +1100</pubDate>
      <guid>https://blog.khmersite.net/p/how-to-restore-vm-to-its-previous-state-xcpng/</guid>
      <description>&lt;p&gt;This evening while I was running the system update on one of the guest VMs running on my XCP-ng host, I accidentally rebooted the XCP-ng host. Why? Accident!&lt;/p&gt;
&lt;p&gt;The guest VM is very important, it&amp;rsquo;s running Xen Orchestra for this XCP-ng server. Semi-fortunately, I remember I had a snapshot for this VM. The challenge for me was, how could I restore the VM using that previous snapshot without Xen Orchestra.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Using df command showing size in megabytes</title>
      <link>https://blog.khmersite.net/p/using-df-showing-size-in-megabytes/</link>
      <pubDate>Mon, 01 Jan 2024 11:50:12 +1100</pubDate>
      <guid>https://blog.khmersite.net/p/using-df-showing-size-in-megabytes/</guid>
      <description>&lt;p&gt;Happy New Year 2024!&lt;/p&gt;
&lt;p&gt;This is going to be a very short post on how to use &amp;lsquo;df&amp;rsquo; command to display the disk space usage in megabytes.
To display the output in MB (megabytes), we can use the &lt;code&gt;-m&lt;/code&gt; flag with the &lt;code&gt;df&lt;/code&gt; command as the following:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;❯ df -m
Filesystem                 1M-blocks  Used Available Use% Mounted on
devtmpfs                           4     0         4   0% /dev
tmpfs                            852     0       852   0% /dev/shm
tmpfs                            341     6       336   2% /run
/dev/mapper/almalinux-root      7578  2068      5511  28% /
/dev/vda2                       1014   280       735  28% /boot
/dev/vda1                        599     8       592   2% /boot/efi
tmpfs                            171     0       171   0% /run/user/1000
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;It&amp;rsquo;s simple, isn&amp;rsquo;t it?&lt;/p&gt;</description>
    </item>
    <item>
      <title>FreeBSD 14 shared object libssl.so.111 not found</title>
      <link>https://blog.khmersite.net/p/freebsd-14-shared-object-libssl-so-111-not-found/</link>
      <pubDate>Sat, 02 Dec 2023 20:32:28 +1100</pubDate>
      <guid>https://blog.khmersite.net/p/freebsd-14-shared-object-libssl-so-111-not-found/</guid>
      <description>&lt;p&gt;FreeBSD 14.0-RELEASE just got relesed at the end of last month, and I wanted to upgrade my NAS server running FreeBSD 13.x-RELEASE to 14.0.&lt;/p&gt;
&lt;p&gt;Using the installation instruction from [1], I was able to upgrade smoothly without any issues. Here are the steps:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;# freebsd-update fetch
# freebsd-update install
&lt;/code&gt;&lt;/pre&gt;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;# freebsd-update upgrade -r 14.0-RELEASE
# freebsd-update install
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Reboot:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;# reboot
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;After rebooting, freebsd-update(8)[2] needs to be run again to install the new userland components:&lt;/p&gt;</description>
    </item>
    <item>
      <title>Upgrading RHEL 8 to RHEL 9 on AWS</title>
      <link>https://blog.khmersite.net/p/upgrading-rhel8-to-rhel9-on-aws/</link>
      <pubDate>Wed, 22 Nov 2023 23:16:05 +1100</pubDate>
      <guid>https://blog.khmersite.net/p/upgrading-rhel8-to-rhel9-on-aws/</guid>
      <description>&lt;p&gt;So I have an EC2 instance running RHEL 8.9 which was recently upgraded from RHEL 7.9. Now, I want to upgrade it all the way to RHEL 9. Here is the worklog
which recording the steps I performed to achieve that goal.&lt;/p&gt;
&lt;p&gt;Step 0, perform a snapshot of the root volume of the instance, or create an AMI from it. In my case, this is just a test instance, so I skip taking the snapshot.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Install EPEL repository on RHEL 9</title>
      <link>https://blog.khmersite.net/p/install-epel-on-rhel-9/</link>
      <pubDate>Wed, 22 Nov 2023 22:47:27 +1100</pubDate>
      <guid>https://blog.khmersite.net/p/install-epel-on-rhel-9/</guid>
      <description>&lt;p&gt;This evening I&amp;rsquo;m trying to enable EPEL repository on a RHEL 9 server, by following instruction is taken from &lt;a href=&#34;https://www.redhat.com/sysadmin/install-epel-linux&#34;&gt;How to install EPEL on RHEL and CentOS Stream&lt;/a&gt; article [1] by Red Hat Enable Sysadmin.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Enable the CodeReady Linux Builder repository.&lt;/li&gt;
&lt;/ol&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;$ sudo subscription-manager repos --enable \
    codeready-builder-for-rhel-9-$(arch)-rpms

Repository &amp;#39;codeready-builder-for-rhel-9-x86_64-rpms&amp;#39; is enabled for this system.
&lt;/code&gt;&lt;/pre&gt;&lt;ol start=&#34;2&#34;&gt;
&lt;li&gt;Install the EPEL RPM.&lt;/li&gt;
&lt;/ol&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;$ sudo dnf install \
https://dl.fedoraproject.org/pub/epel/epel-release-latest-9.noarch.rpm

...snip...

Installed:
  epel-release-9-7.el9.noarch

Complete!
&lt;/code&gt;&lt;/pre&gt;&lt;ol start=&#34;3&#34;&gt;
&lt;li&gt;Let&amp;rsquo;s try to install &lt;code&gt;htop&lt;/code&gt; (available from the EPEL repo) to verify that everything is working:&lt;/li&gt;
&lt;/ol&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;$ sudo dnf install htop -y
...snip...

$ rpm -q htop
htop-3.2.2-1.el9.x86_64
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;That&amp;rsquo;s it!&lt;/p&gt;</description>
    </item>
    <item>
      <title>Find least common multiple (lcm) with Julia</title>
      <link>https://blog.khmersite.net/p/find-least-common-multiple-with-julia/</link>
      <pubDate>Sun, 19 Nov 2023 23:17:13 +1100</pubDate>
      <guid>https://blog.khmersite.net/p/find-least-common-multiple-with-julia/</guid>
      <description>&lt;p&gt;One joy of being parents when your children are in higher grade (say year 4 or 5) is that you&amp;rsquo;ll get a chance to review math lesson again in order to explain or help your children with their math problem. Nowadays, things are much easier for us parents due to unlimited of resources on the Internet.&lt;/p&gt;
&lt;p&gt;Earlier this evening, after spending time learning with my grade 4 child about Least Common Multiple (LCM) [1], I wanted to know the quickest way to verify the answer when computing of some numbers. While there are many implementations of many programming language, I found one way to do this using &lt;strong&gt;Julia&lt;/strong&gt; with its built-in function &lt;code&gt;Base.lcm&lt;/code&gt; [2].&lt;/p&gt;</description>
    </item>
    <item>
      <title>No support for RHEL with high availability in-place upgrade</title>
      <link>https://blog.khmersite.net/p/no-support-for-rhel-with-ha-in-place-upgrade/</link>
      <pubDate>Wed, 15 Nov 2023 23:06:42 +1100</pubDate>
      <guid>https://blog.khmersite.net/p/no-support-for-rhel-with-ha-in-place-upgrade/</guid>
      <description>&lt;p&gt;Well, if you know you know, otherwise, you could have wasted the whole evening trying to upgrade RHEL 7.9 with High Availability to RHEL 8.x, and failed!&lt;/p&gt;
&lt;p&gt;If you read this post, head to the link at [1] and you&amp;rsquo;d see that Red Hat does not support i-place upgrades or rolling-upgrades of cluster nodes from one major release of RHEL to another. Here is an extract from [1]:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Red Hat does not support in-place upgrades or rolling-upgrades of cluster nodes from one major release of RHEL to another. For example, there is no supported method for updating some nodes in a cluster from RHEL 6 to RHEL 7, introducing them into the cluster with existing RHEL 6 nodes to take over resources from them, and then updating the remaining RHEL 6 nodes. Upgrades in major releases of RHEL must be done by migrating services from a running cluster on the old release to another cluster running the new release.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Here Documents</title>
      <link>https://blog.khmersite.net/p/here-docs/</link>
      <pubDate>Fri, 10 Nov 2023 12:07:37 +1100</pubDate>
      <guid>https://blog.khmersite.net/p/here-docs/</guid>
      <description>&lt;p&gt;So, what&amp;rsquo;s &amp;ldquo;Here Docs&amp;rdquo;? Well, if you don&amp;rsquo;t know what it is yet, then hopefully by the time you finish reading this post you&amp;rsquo;ll know what it is.&lt;/p&gt;
&lt;p&gt;Here docs or here documents is a special block code, of which we can use a form of I/O redirection to feed a command list to an interactive program, e.g. &lt;code&gt;cat&lt;/code&gt; or the &lt;em&gt;ex&lt;/em&gt; text editor according to [1].&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Here&lt;/em&gt; is an example where a file &lt;code&gt;basic-ingress.yaml&lt;/code&gt; was created using here docs.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Deleting old LVM devices file PVID &lt;ID&gt; last seen not found</title>
      <link>https://blog.khmersite.net/p/deleting-old-lvm-devices-file-pvid-last-seen-not-found/</link>
      <pubDate>Thu, 26 Oct 2023 23:50:45 +1100</pubDate>
      <guid>https://blog.khmersite.net/p/deleting-old-lvm-devices-file-pvid-last-seen-not-found/</guid>
      <description>&lt;p&gt;On one of my servers, I used to have a storage device, &lt;code&gt;/dev/sdb&lt;/code&gt;, attached to it. That storage was used as an LVM physical volume. It has later been removed, and now I just noticed the following message:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#f92672&#34;&gt;[&lt;/span&gt;root@banan ~&lt;span style=&#34;color:#f92672&#34;&gt;]&lt;/span&gt;&lt;span style=&#34;color:#75715e&#34;&gt;# lvs&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  Devices file PVID CuDRE3nMN5FMNqYLViHrnE1D7OFDlbX6 last seen on /dev/sdb not found.
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  LV         VG        Attr       LSize   Pool Origin Data%  Meta%  Move Log Cpy%Sync Convert
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  root       almalinux -wi-ao---- &amp;lt;28.40g
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  swap       almalinux -wi-ao----   2.01g
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Based some research found online, there could be outdated &lt;em&gt;device entries&lt;/em&gt; in the &lt;em&gt;device files&lt;/em&gt; located in &lt;code&gt;/etc/lvm/devices/system.devices&lt;/code&gt;.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Rustup - update and remove Rust toolchain</title>
      <link>https://blog.khmersite.net/p/rustup-update-remove-toolchain/</link>
      <pubDate>Thu, 19 Oct 2023 21:13:20 +1100</pubDate>
      <guid>https://blog.khmersite.net/p/rustup-update-remove-toolchain/</guid>
      <description>&lt;p&gt;&lt;code&gt;rustup&lt;/code&gt; is a utility used to install and remove rust toolchain.&lt;/p&gt;
&lt;p&gt;To list the current installed toolchain run:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;kenno@c2:~$ rustup show
Default host: aarch64-unknown-linux-gnu
rustup home:  /home/kenno/.rustup

installed toolchains
--------------------

stable-aarch64-unknown-linux-gnu (default)
1.70.0-aarch64-unknown-linux-gnu
1.71.1-aarch64-unknown-linux-gnu
1.72.0-aarch64-unknown-linux-gnu

active toolchain
----------------

stable-aarch64-unknown-linux-gnu (default)
rustc 1.72.0 (5680fa18f 2023-08-23)
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;To remove a specific version of the toolchain, e.g. &lt;code&gt;1.70.0-aarch64-unknown-linux-gnu&lt;/code&gt; run:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;kenno@c2:~$ rustup toolchain remove 1.70.0-aarch64-unknown-linux-gnu
info: uninstalling toolchain &amp;#39;1.70.0-aarch64-unknown-linux-gnu&amp;#39;
info: toolchain &amp;#39;1.70.0-aarch64-unknown-linux-gnu&amp;#39; uninstalled
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Let&amp;rsquo;s verify:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;kenno@c2:~$ rustup show
Default host: aarch64-unknown-linux-gnu
rustup home:  /home/kenno/.rustup

installed toolchains
--------------------

stable-aarch64-unknown-linux-gnu (default)
1.71.1-aarch64-unknown-linux-gnu
1.72.0-aarch64-unknown-linux-gnu

active toolchain
----------------

stable-aarch64-unknown-linux-gnu (default)
rustc 1.72.0 (5680fa18f 2023-08-23)
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;To install udpate the new toolchain, run:&lt;/p&gt;</description>
    </item>
    <item>
      <title>Array in Bash</title>
      <link>https://blog.khmersite.net/p/array-in-bash/</link>
      <pubDate>Wed, 18 Oct 2023 23:12:59 +1100</pubDate>
      <guid>https://blog.khmersite.net/p/array-in-bash/</guid>
      <description>&lt;p&gt;I have written a hand full of Bash scripts, but none of those utilized array. Why? It&amp;rsquo;s because of two main things: 1. I don&amp;rsquo;t know how to use array in Bash, and 2. I would normally switch to write the script in Python instead.&lt;/p&gt;
&lt;p&gt;Today, however, I need to update an existing script written in Bash to make use of array. This was a perfect excuse for me to spend some 30 minutes to learn about array in Bash. I found a very good tutorial at the following [1].&lt;/p&gt;</description>
    </item>
    <item>
      <title>Install Guest Tools on XCP-ng</title>
      <link>https://blog.khmersite.net/p/install-guest-tools-on-xcpng/</link>
      <pubDate>Mon, 16 Oct 2023 20:08:36 +1100</pubDate>
      <guid>https://blog.khmersite.net/p/install-guest-tools-on-xcpng/</guid>
      <description>&lt;p&gt;On AlmaLinux, the guest-tool for XCP-ng is provided by a package named &lt;code&gt;xe-guest-utilities-latest&lt;/code&gt;, which in turn is available from the &lt;strong&gt;epel-release&lt;/strong&gt; repository.&lt;/p&gt;
&lt;p&gt;The following list a few steps to get XCP-ng guest-tool installed on a VM running AlmaLinux 9.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Enable &lt;strong&gt;epel-release&lt;/strong&gt; repository if not yet enabled by first installing a package called &lt;code&gt;epel-release&lt;/code&gt;. In my case, the repo has been already enabled.&lt;/li&gt;
&lt;/ol&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;[root@xoa1 ~]# rpm -q epel-release
epel-release-9-7.el9.noarch
&lt;/code&gt;&lt;/pre&gt;&lt;ol start=&#34;2&#34;&gt;
&lt;li&gt;Install the guest-tool. If you&amp;rsquo;re unable to remember the full name of the package, just search for &lt;code&gt;xe-guest&lt;/code&gt;.&lt;/li&gt;
&lt;/ol&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;[root@xoa1 ~]# dnf search xe-guest
Last metadata expiration check: 3:41:49 ago on Mon 16 Oct 2023 16:34:47.
=================== Name Matched: xe-guest ==================================
xe-guest-utilities-latest.x86_64 : XAPI Virtual Machine Monitoring Scripts

[root@xoa1 ~]# dnf install xe-guest-utilities-latest -y
...
Installed:
  xe-guest-utilities-latest-7.30.0-7.el9.x86_64

[root@xoa1 ~]# rpm -q xe-guest-utilities-latest
xe-guest-utilities-latest-7.30.0-7.el9.x86_64
&lt;/code&gt;&lt;/pre&gt;&lt;ol start=&#34;3&#34;&gt;
&lt;li&gt;Finally, enable and start the &lt;code&gt;xe-linux-distribution&lt;/code&gt; service.&lt;/li&gt;
&lt;/ol&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;[root@xoa1 ~]# systemctl enable --now xe-linux-distribution.service
Created symlink /etc/systemd/system/multi-user.target.wants/xe-linux-distribution.service → /usr/lib/systemd/system/xe-linux-distribution.service.

[root@xoa1 ~]# systemctl status xe-linux-distribution.service
● xe-linux-distribution.service - Linux Guest Agent
     Loaded: loaded (/usr/lib/systemd/system/xe-linux-distribution.service; enabled; preset: disabled)
     Active: active (running) since Mon 2023-10-16 20:20:11 AEDT; 12s ago
    Process: 1714 ExecStartPre=/usr/sbin/sysctl net.ipv4.conf.all.arp_notify=1 (code=exited, status=0/SUCCESS)
    Process: 1715 ExecStartPre=/usr/sbin/xe-linux-distribution /var/cache/xe-linux-distribution (code=exited, status=0/SUCCESS)
   Main PID: 1720 (xe-daemon)
      Tasks: 9 (limit: 23054)
     Memory: 7.1M
        CPU: 42ms
     CGroup: /system.slice/xe-linux-distribution.service
             ├─1720 /usr/sbin/xe-daemon
             └─1723 logger -t xe-daemon -p debug

Oct 16 20:20:11 xoa1 systemd[1]: Starting Linux Guest Agent...
Oct 16 20:20:11 xoa1 sysctl[1714]: net.ipv4.conf.all.arp_notify = 1
Oct 16 20:20:11 xoa1 systemd[1]: Started Linux Guest Agent.
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;The guest-tool for XCP-ng has now been installed on a VM running AlmaLinux (9).&lt;/p&gt;</description>
    </item>
    <item>
      <title>What is in a Longhorn volume?</title>
      <link>https://blog.khmersite.net/p/what-is-in-a-longhorn-volume/</link>
      <pubDate>Sun, 15 Oct 2023 18:57:07 +1100</pubDate>
      <guid>https://blog.khmersite.net/p/what-is-in-a-longhorn-volume/</guid>
      <description>&lt;p&gt;Do you know? Well, before today, neither did I.&lt;/p&gt;
&lt;p&gt;I&amp;rsquo;m pretty late to Kubernetes. I heard about it many hears ago, but unfortunately, I had no need to use it at home or at work. Even today, there is no workload that requires a Kubernetes cluster to run on. However, I think I can&amp;rsquo;t ignore Kubernetes any longer, and I need to learn about it now, well &amp;ldquo;better be late than never&amp;rdquo;, right?&lt;/p&gt;</description>
    </item>
    <item>
      <title>warning: TERM environment variable set to &#39;tmux-256color&#39;</title>
      <link>https://blog.khmersite.net/p/term-environment-variable-set-to-tmux-256color/</link>
      <pubDate>Thu, 12 Oct 2023 19:02:02 +1100</pubDate>
      <guid>https://blog.khmersite.net/p/term-environment-variable-set-to-tmux-256color/</guid>
      <description>&lt;p&gt;I use &amp;rsquo;tmux&amp;rsquo; on anything that runs it, from FreeBSD, macOS and Linux.&lt;/p&gt;
&lt;p&gt;On some of my Linux servers, noticeably openSUSE ones, when I connect to them via SSH, I would receive the following warning:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;...
Have a lot of fun...
warning: Could not set up terminal.
warning: TERM environment variable set to &amp;#39;tmux-256color&amp;#39;.
warning: Check that this terminal type is supported on this system.
warning: Using fallback terminal type &amp;#39;ansi&amp;#39;.
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;What worse is that, when I switch to &lt;code&gt;root&lt;/code&gt; account, the backspace key doesn&amp;rsquo;t work correctly. For example, hitting backspace
will produce a space instead.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Grow partition with growpart</title>
      <link>https://blog.khmersite.net/p/grow-partition-with-growpart/</link>
      <pubDate>Fri, 06 Oct 2023 21:35:30 +1100</pubDate>
      <guid>https://blog.khmersite.net/p/grow-partition-with-growpart/</guid>
      <description>&lt;p&gt;During the upgrade of Fedora 38 to Fedora 39 (beta) on my main desktop, the first attempt failed due to insufficient free disk space on the root volume. After some manual intervention such as vacuuming the journald logs, I was able to perform the successful upgrade. Not that it matters, but I&amp;rsquo;m writing this blog post on the same desktop running Fedora 39 Beta.&lt;/p&gt;
&lt;p&gt;This post is to record how I increase the root volume on my desktop with the help of a few tools such as &lt;code&gt;growpart&lt;/code&gt;, &lt;code&gt;lsblk&lt;/code&gt;, &lt;code&gt;resize2fs&lt;/code&gt;,&amp;hellip;etc. Like always, if you stumble on this post and want to follow along, please do not just copy and pate the commands from here and run on your system. Try to understand what each command does, if you don&amp;rsquo;t, then you definitely must not copy and pate these commands!&lt;/p&gt;</description>
    </item>
    <item>
      <title>How to delete Lightsail resources using AWS CLI</title>
      <link>https://blog.khmersite.net/p/how-to-delete-lightsail-resources-using-aws-cli/</link>
      <pubDate>Thu, 05 Oct 2023 23:59:44 +1100</pubDate>
      <guid>https://blog.khmersite.net/p/how-to-delete-lightsail-resources-using-aws-cli/</guid>
      <description>&lt;p&gt;In this post, I&amp;rsquo;ll document how to use AWS CLI to delete a few Lightsail resources. I have never done this before, so this would be a good exercise for me. To make it less boring, I&amp;rsquo;m writing this post while I&amp;rsquo;m deleting these resources.&lt;/p&gt;
&lt;p&gt;First step, I need to look for the instance name [1].&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;❯ aws lightsail get-instances --query &amp;#39;instances[].name&amp;#39;
[
    &amp;#34;WordPress-1&amp;#34;
]
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;The above output is the name of the instance I&amp;rsquo;d like to delete. With its name, the instance can be deleted
using the following command line [2]:&lt;/p&gt;</description>
    </item>
    <item>
      <title>How to delete Memcached cluster using AWS CLI</title>
      <link>https://blog.khmersite.net/p/how-to-delete-memcached-cluster-using-aws-cli/</link>
      <pubDate>Fri, 29 Sep 2023 20:41:14 +1000</pubDate>
      <guid>https://blog.khmersite.net/p/how-to-delete-memcached-cluster-using-aws-cli/</guid>
      <description>&lt;p&gt;If you have an ElastiCache Memcached cluster that you no longer need, it&amp;rsquo;s better to delete it. Dno&amp;rsquo;t believe me? Even AWS said so too:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;It is almost always a good idea to delete clusters that you are not actively using. Until a cluster&amp;rsquo;s status is deleted, you continue to incur charges for it. [1]&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Well, I have a Memcached cluster that I don&amp;rsquo;t need anymore. But instead of deleting this cluster using AWS console [1], I&amp;rsquo;m going to do this via AWS CLI.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Deleting VPC Endpoints With AWS CLI</title>
      <link>https://blog.khmersite.net/p/deleting-vpc-endpoints-with-aws-cli/</link>
      <pubDate>Wed, 27 Sep 2023 22:45:41 +1000</pubDate>
      <guid>https://blog.khmersite.net/p/deleting-vpc-endpoints-with-aws-cli/</guid>
      <description>&lt;p&gt;This is a quick note on how to delete VPC endpoints that are no longer needed with AWS CLI.&lt;/p&gt;
&lt;p&gt;First, we need to find all the vpc-endpoints-ids [1].&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;❯ aws ec2 describe-vpc-endpoints --query &amp;#39;VpcEndpoints[].VpcEndpointId&amp;#39;
[
    &amp;#34;vpce-097008f8d26caxxxx&amp;#34;,
    &amp;#34;vpce-07aaeabdefd8xxxx&amp;#34;,
    &amp;#34;vpce-0bc6d548ff2e0xxxx&amp;#34;
]
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Note: I replaced the last 4 digit with &amp;lsquo;xxxx&amp;rsquo;. It&amp;rsquo;s a good idea to try out without really deleting the VPC endpoints by supplying &lt;code&gt;--dry-run&lt;/code&gt; to the command below:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;❯ aws ec2 delete-vpc-endpoints --vpc-endpoint-ids vpce-097008f8d26caxxxx vpce-07aaeabdefd8xxxx vpce-0bc6d548ff2e0xxxx --dry-run

An error occurred (DryRunOperation) when calling the DeleteVpcEndpoints operation: Request would have succeeded, but DryRun flag is set.
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Let&amp;rsquo;s  delete all of the 3 resources:&lt;/p&gt;</description>
    </item>
    <item>
      <title>How to extract a zip archive with Python on Windows</title>
      <link>https://blog.khmersite.net/p/how-to-extract-zip-archive-with-python/</link>
      <pubDate>Tue, 26 Sep 2023 23:52:38 +1000</pubDate>
      <guid>https://blog.khmersite.net/p/how-to-extract-zip-archive-with-python/</guid>
      <description>&lt;p&gt;Have you ever been asked or wonder how to learning a programming language? If not, then you can skip this blog post. :-)&lt;/p&gt;
&lt;p&gt;At work, a coworker said to me &amp;ldquo;I want to learn a programming language. Where do I start or how do I even start it?&amp;rdquo; I was asked this question because I had explicitly expressed my interest to my teams that I like programming a lot, though programming is not being used my professional career at the moment.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Installing Ingress-Nginx Controller with Helm</title>
      <link>https://blog.khmersite.net/p/installing-ingress-nginx-controller-with-helm/</link>
      <pubDate>Tue, 26 Sep 2023 22:35:22 +1000</pubDate>
      <guid>https://blog.khmersite.net/p/installing-ingress-nginx-controller-with-helm/</guid>
      <description>&lt;p&gt;In my previous &lt;a href=&#34;https://blog.khmersite.net/2023/09/install-helm-cli-on-almalinux-9/&#34;&gt;post&lt;/a&gt;, I showed how to install &lt;code&gt;helm&lt;/code&gt; CLI on a server/instance running AlmaLinux 9. Now, I will share how to use &lt;code&gt;helm&lt;/code&gt; to install the Ingress-Nginx Controller for a Kubernetes cluster.&lt;/p&gt;
&lt;p&gt;We install a package known as &amp;ldquo;chart&amp;rdquo; from a Helm repository. Initially, there is no repo, and can be seen below:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;$ helm repo list
Error: no repositories to show
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;In order to install Ingress-Nginx Controller, I first need to add a new repository.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Installing HELM Cli on AlmaLinux 9</title>
      <link>https://blog.khmersite.net/p/install-helm-cli-on-almalinux-9/</link>
      <pubDate>Tue, 26 Sep 2023 21:01:05 +1000</pubDate>
      <guid>https://blog.khmersite.net/p/install-helm-cli-on-almalinux-9/</guid>
      <description>&lt;p&gt;Recently, I decided to pick up learning Kubernetes again after completely being absent from this world for many years. In this post, I&amp;rsquo;ll document how to install Helm CLI on AlmaLinx 9. &lt;a href=&#34;https://helm.sh/docs/&#34;&gt;Helm&lt;/a&gt; is like a package manager for Kubernetes. Helm CLI can be installed on your local machine, it does not to be installed on the Kubenetes node. However, in order to interact with your Kubernetes cluster, you&amp;rsquo;ll need to also have &lt;code&gt;kubectl&lt;/code&gt; command as well as properly configured it to interact with your Kubernetes cluster.&lt;/p&gt;</description>
    </item>
    <item>
      <title>How to restart KDE Plasma without logging out</title>
      <link>https://blog.khmersite.net/p/how-to-restart-kde-plasma-without-logging-out/</link>
      <pubDate>Sun, 24 Sep 2023 22:46:10 +1000</pubDate>
      <guid>https://blog.khmersite.net/p/how-to-restart-kde-plasma-without-logging-out/</guid>
      <description>&lt;p&gt;I&amp;rsquo;m running KDE Plasma Version 5.27.8 on Fedora 38. It&amp;rsquo;s been very stable and Plasma crashes a lot less comparing to the old day when running Plasma 5.0 on (older) Kubuntu.&lt;/p&gt;
&lt;p&gt;Anyway, today, my Plasma&amp;rsquo;s taskbar froze and I needed to restarted. Instead of logging out and logging back in, I found a way to restart the Plasmashell. Here is the command which worked for me for this Plasma version:&lt;/p&gt;</description>
    </item>
    <item>
      <title>IPv6 addr-gen-mode = default - But what is that default value?</title>
      <link>https://blog.khmersite.net/p/ipv6-addr-gen-mode-default/</link>
      <pubDate>Sun, 17 Sep 2023 19:01:19 +1000</pubDate>
      <guid>https://blog.khmersite.net/p/ipv6-addr-gen-mode-default/</guid>
      <description>&lt;p&gt;On Fedora 38, the version of NetworkMnager is 1.42.8, and the &amp;ldquo;default&amp;rdquo; setting for &lt;code&gt;ipv6.add-gen-mode&lt;/code&gt; is &lt;code&gt;default&lt;/code&gt;. The possible value for &lt;code&gt;ipv6.add-gen-mode&lt;/code&gt; is &lt;code&gt;eui64&lt;/code&gt;, &lt;code&gt;stable-privacy&lt;/code&gt;, &lt;code&gt;default-or-eui64&lt;/code&gt;, and &lt;code&gt;default&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;This blog post is my attempt to understand a bit more about this IPv6 setting &lt;code&gt;addr-gen-mode&lt;/code&gt;. On my workstation, the NetworkManager connection in use in this post is called &lt;code&gt;br0&lt;/code&gt;. Here are are some commands to display the version number of &lt;code&gt;NetworkManager&lt;/code&gt; and the (default) current setting of &lt;code&gt;ipv6.addr-gen-mode&lt;/code&gt;:&lt;/p&gt;</description>
    </item>
    <item>
      <title>Configure IPv6 for Proxmox Host via Slaac</title>
      <link>https://blog.khmersite.net/p/configure-ipv6-for-proxmox-host-via-slaac/</link>
      <pubDate>Sat, 16 Sep 2023 01:21:05 +1000</pubDate>
      <guid>https://blog.khmersite.net/p/configure-ipv6-for-proxmox-host-via-slaac/</guid>
      <description>&lt;p&gt;The Proxmox server running at home only has an IPv4 statically assigned to it. Since I&amp;rsquo;ve been trying to get all my connected devices at home to get IPv6 assigned, I figured I should try with this Proxmox server next.&lt;/p&gt;
&lt;p&gt;I&amp;rsquo;m running Proxmox VE 8.0.4, and it&amp;rsquo;s based on Debian 12 (bookwarm). The settings for its network interfaces are stored in &lt;code&gt;/etc/network/interfaces&lt;/code&gt;:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;root@pve:~# cat /etc/network/interfaces
auto lo
iface lo inet loopback

auto vmbr0
iface vmbr0 inet static
        address 192.168.1.8/24
        gateway 192.168.1.1
        bridge-ports enp2s0
        bridge-stp off
        bridge-fd 0
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Here is the output of &lt;code&gt;vmbr0&lt;/code&gt; device:&lt;/p&gt;</description>
    </item>
    <item>
      <title>Nginx Redirect One Path to Another</title>
      <link>https://blog.khmersite.net/p/nginx-redirect-one-path-to-another/</link>
      <pubDate>Thu, 14 Sep 2023 00:51:40 +1000</pubDate>
      <guid>https://blog.khmersite.net/p/nginx-redirect-one-path-to-another/</guid>
      <description>&lt;p&gt;Nginx is probably my favorite web server up to this moment, and it runs and serves websites on all of my servers. I should say, I also like Apache web server too, but not as much as Nginx.&lt;/p&gt;
&lt;p&gt;Today, I need to redirect from one url path to another. It took me a while to get it right, and I&amp;rsquo;d better write it down before it&amp;rsquo;s forgotten.&lt;/p&gt;
&lt;p&gt;This is what I want: &lt;a href=&#34;https://demo.example.com/login&#34;&gt;https://demo.example.com/login&lt;/a&gt; -&amp;gt; https//demo.example.com/demo/login.&lt;/p&gt;</description>
    </item>
    <item>
      <title>How to configure IPv6 on FreeBSD via SLAAC</title>
      <link>https://blog.khmersite.net/p/how-to-configure-ipv6-on-freebsd-via-slaac/</link>
      <pubDate>Fri, 08 Sep 2023 19:05:36 +1000</pubDate>
      <guid>https://blog.khmersite.net/p/how-to-configure-ipv6-on-freebsd-via-slaac/</guid>
      <description>&lt;p&gt;I recently got IPv6 running at home, with most devices including my iPhone happily get an IPv6 assigned. My NAS running FreeBSD13.2 currently only has an IPv4 assigned, so I&amp;rsquo;m going to configure IPv6 for it too.&lt;/p&gt;
&lt;p&gt;I&amp;rsquo;m still new to IPv6. The way I have it setup on my router, running OPNsense, is to set the &amp;ldquo;Router Advertisements&amp;rdquo; to &amp;ldquo;Unmanaged&amp;rdquo; with DHCPv6 disabled. &amp;ldquo;Unmanaged&amp;rdquo; for SLAAC (A flag), and SLAAC stands for Stateless Address Autoconfiguration. In simple term, each client will pick its own IPv6 based on the route prefix advertised by the router. This is just a simplification, and you should not quote for me this.&lt;/p&gt;</description>
    </item>
    <item>
      <title>How did I renew Red Hat Developer Subscription</title>
      <link>https://blog.khmersite.net/p/how-do-i-renew-red-hat-developer-subscription/</link>
      <pubDate>Wed, 30 Aug 2023 22:52:16 +1000</pubDate>
      <guid>https://blog.khmersite.net/p/how-do-i-renew-red-hat-developer-subscription/</guid>
      <description>&lt;p&gt;If you&amp;rsquo;re reading this post, it&amp;rsquo;s quite likely that you&amp;rsquo;re fully aware that Red Hat provide a no-cost Red Hat Developer Subscription for individuals. With this subscript you can use it run RHEL for free. The subscription only lasts one year, and when it expires it can&amp;rsquo;t be renewed. You must &lt;strong&gt;re-register&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;I have a test RHEL vm, but I hardly use. So today when I turned it on and logged into it, the following message came up when i tried to update the system:&lt;/p&gt;</description>
    </item>
    <item>
      <title>Fix cc: error trying to exec &#39;cc1plus&#39; on openSUSE Leap</title>
      <link>https://blog.khmersite.net/p/fix-cc-error-trying-to-exec-cc1plus-on-opensuse-leap/</link>
      <pubDate>Tue, 29 Aug 2023 23:07:48 +1000</pubDate>
      <guid>https://blog.khmersite.net/p/fix-cc-error-trying-to-exec-cc1plus-on-opensuse-leap/</guid>
      <description>&lt;p&gt;It&amp;rsquo;s currently almost 23:15, and I&amp;rsquo;m already sleepy. Therefore, this is going to be a short note on how I fixed an minor but annoying issue &lt;code&gt;nvim-treesiter&lt;/code&gt; (Neovim&amp;rsquo;s plugin) on openSUSE Leap (15.5).&lt;/p&gt;
&lt;p&gt;The error message is or was as below:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;nvim-treesitter[yaml]: Error during compilation
cc: error trying to exec &amp;#39;cc1plus&amp;#39;: execvp: No such file or directory
Press ENTER or type command to continue
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;I don&amp;rsquo;t code in C++ nowadays, but the error looks like the C or C++ compiler was missing. But first, let&amp;rsquo;s show the version of openSUSE running on this instance, I mean VM:&lt;/p&gt;</description>
    </item>
    <item>
      <title>Installing AWS CLI on AlmaLinux</title>
      <link>https://blog.khmersite.net/p/installing-aws-cli-on-almalinux/</link>
      <pubDate>Sun, 20 Aug 2023 18:37:13 +1000</pubDate>
      <guid>https://blog.khmersite.net/p/installing-aws-cli-on-almalinux/</guid>
      <description>&lt;p&gt;I already wrote a blog post on &lt;a href=&#34;https://blog.khmersite.net/2023/01/how-to-install-awscli-on-rockylinux/&#34;&gt;How to install AWS CLI on RockyLinux&lt;/a&gt;, where I shared how to leverage the RPM package from EPEL repository. So what do I need to create a post here?&lt;/p&gt;
&lt;p&gt;Well, when I tried to use the same method to install the AWS CLI on an AlmaLinux 9.2, there was an issue with dependency. Here is what happened:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;[kenno@wedev1 ~]$ sudo dnf install awscli
[sudo] password for kenno:
Last metadata expiration check: 0:05:08 ago on Sun 20 Aug 2023 18:35:23.
Error:
 Problem: conflicting requests
  - nothing provides python3.9dist(docutils) &amp;gt;= 0.10 needed by awscli-1.23.10-3.el9.noarch
(try to add &amp;#39;--skip-broken&amp;#39; to skip uninstallable packages or &amp;#39;--nobest&amp;#39; to use not only best candidate packages)
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Good thing is, there are a few ways to install AWS CLI on Linux. I&amp;rsquo;ll be using the method described at official AWS document to install the CLI.&lt;/p&gt;</description>
    </item>
    <item>
      <title>How to delete AWS Workspace with AWS CLI</title>
      <link>https://blog.khmersite.net/p/how-to-delete-workspace-with-cli/</link>
      <pubDate>Thu, 10 Aug 2023 17:28:05 +1000</pubDate>
      <guid>https://blog.khmersite.net/p/how-to-delete-workspace-with-cli/</guid>
      <description>&lt;p&gt;When you are finished with a WorkSpace, you can delete it. You can also delete related resources. In this post, I&amp;rsquo;ll be using AWS CLI to delete a WorkSpace that is no longer needed.&lt;/p&gt;
&lt;p&gt;To delete a WorkSpace using AWS CLI, we can use &lt;code&gt;terminate-workspaces&lt;/code&gt; command [2]. But first, I&amp;rsquo;d need to find the workspace id.&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;➜ aws workspaces describe-workspaces --query &amp;#39;Workspaces[].WorkspaceId&amp;#39; --output text
ws-9xm222222
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Now that I got the WorkSpace id as &lt;code&gt;ws-9xm222222&lt;/code&gt;, I can proceed to terminate this WorkSpace.&lt;/p&gt;</description>
    </item>
    <item>
      <title>How to stop AWS Workspace with CLI</title>
      <link>https://blog.khmersite.net/p/how-to-stop-aws-workspace-with-cli/</link>
      <pubDate>Wed, 09 Aug 2023 18:45:01 +1000</pubDate>
      <guid>https://blog.khmersite.net/p/how-to-stop-aws-workspace-with-cli/</guid>
      <description>&lt;p&gt;I need to stop a WorkSpace now and I don&amp;rsquo;t want to login to AWS WorkSpace console.&lt;/p&gt;
&lt;p&gt;The following is the steps I&amp;rsquo;m literally taking to achieve this goal.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Find out the WorkSpace ID, assuming that my AWS CLI has been setup correctly.&lt;/li&gt;
&lt;/ol&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;❯ aws workspaces describe-workspaces
{
    &amp;#34;Workspaces&amp;#34;: [
        {
            &amp;#34;WorkspaceId&amp;#34;: &amp;#34;ws-9xm222222&amp;#34;,
            &amp;#34;DirectoryId&amp;#34;: &amp;#34;d-9767555555&amp;#34;,
            &amp;#34;UserName&amp;#34;: &amp;#34;kenno&amp;#34;,
            &amp;#34;IpAddress&amp;#34;: &amp;#34;172.xx.x.xx&amp;#34;,
            &amp;#34;State&amp;#34;: &amp;#34;AVAILABLE&amp;#34;,
            &amp;#34;BundleId&amp;#34;: &amp;#34;wsb-clj855555&amp;#34;,
            &amp;#34;SubnetId&amp;#34;: &amp;#34;subnet-0a4ae4b324a799999&amp;#34;,
            &amp;#34;ComputerName&amp;#34;: &amp;#34;A-2B99WV33TITAN&amp;#34;,
            &amp;#34;WorkspaceProperties&amp;#34;: {
                &amp;#34;RunningMode&amp;#34;: &amp;#34;AUTO_STOP&amp;#34;,
                &amp;#34;RunningModeAutoStopTimeoutInMinutes&amp;#34;: 60,
                &amp;#34;RootVolumeSizeGib&amp;#34;: 80,
                &amp;#34;UserVolumeSizeGib&amp;#34;: 50,
                &amp;#34;ComputeTypeName&amp;#34;: &amp;#34;STANDARD&amp;#34;,
                &amp;#34;Protocols&amp;#34;: [
                    &amp;#34;PCOIP&amp;#34;
                ]
            },
            &amp;#34;ModificationStates&amp;#34;: []
        }
    ]
}
&lt;/code&gt;&lt;/pre&gt;&lt;ol start=&#34;2&#34;&gt;
&lt;li&gt;We can see that the WorkSpace &amp;lsquo;ws-9xm222222&amp;rsquo; is in AVAILABLE state. To stop this workspace now, run the following command:&lt;/li&gt;
&lt;/ol&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;❯ aws workspaces stop-workspaces --stop-workspace-requests WorkSpaceId=ws-9xm222222

Parameter validation failed:
Unknown parameter in StopWorkspaceRequests[0]: &amp;#34;WorkSpaceId&amp;#34;, must be one of: WorkspaceId

❯ aws workspaces stop-workspaces --stop-workspace-requests WorkspaceId=ws-9xm222222
{
    &amp;#34;FailedRequests&amp;#34;: []
}
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Notice that the CLI option is case sensitive, and I &amp;ldquo;deliberately&amp;rdquo; made a mistake with &lt;code&gt;WorkSpaceId&lt;/code&gt; to demonstrate this. Hahaha.&lt;/p&gt;</description>
    </item>
    <item>
      <title>How to delete one word backward in Vim</title>
      <link>https://blog.khmersite.net/p/how-to-delete-one-word-backward-in-vim/</link>
      <pubDate>Tue, 08 Aug 2023 23:30:09 +1000</pubDate>
      <guid>https://blog.khmersite.net/p/how-to-delete-one-word-backward-in-vim/</guid>
      <description>&lt;p&gt;The following is a sample of text opening in vim/neovim with line numbers:&lt;/p&gt;
&lt;p&gt;1 What would be the command to delete one word backwards?
2 I know we can use &amp;lsquo;db&amp;rsquo; to delete backword, and it would work
3 as what I wanted if the cursor is on the last character.&lt;/p&gt;
&lt;p&gt;Assuming that my cursor is under letter &amp;lsquo;a&amp;rsquo; of the word &amp;lsquo;command&amp;rsquo; in line 1, and I want to delete the whole word &amp;lsquo;command&amp;rsquo;. How could this be done?&lt;/p&gt;</description>
    </item>
    <item>
      <title>Query Latest Debian 12 AMI Id Using AWS SSM Parameter Store</title>
      <link>https://blog.khmersite.net/p/query-latest-debian-ami-id-using-ssm-parameter-store/</link>
      <pubDate>Sat, 05 Aug 2023 00:24:53 +1000</pubDate>
      <guid>https://blog.khmersite.net/p/query-latest-debian-ami-id-using-ssm-parameter-store/</guid>
      <description>&lt;p&gt;Debian publishes their releases of Amazon Machine Image (AMI) for bookworm at &lt;a href=&#34;https://wiki.debian.org/Cloud/AmazonEC2Image/Bookworm&#34;&gt;Debian bookworm on Amazon EC2&lt;/a&gt; [1]. There, you can find the AMIs for various regions and two architecture &lt;code&gt;amd64&lt;/code&gt; and &lt;code&gt;arm64&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;Another way to search for AMI for Debian 12 (bookworm) is to use AWS CLI with &lt;code&gt;describe-images&lt;/code&gt;. Here is an example on how to list the 3 most recent AMIs of Debian 12 (amd64 architecture), sorted by most recent to the oldest:&lt;/p&gt;</description>
    </item>
    <item>
      <title>Installing Jellyfin Media Player on OpenSUSE Tumbleweed</title>
      <link>https://blog.khmersite.net/p/installing-jellyfin-media-player-on-opensuse/</link>
      <pubDate>Sat, 29 Jul 2023 10:28:07 +1000</pubDate>
      <guid>https://blog.khmersite.net/p/installing-jellyfin-media-player-on-opensuse/</guid>
      <description>&lt;p&gt;As of today, Jellyfin Media Player is not available on (official?) repos for OpenSUSE Tumbleweed. To install it, I need to first add a repository, kind of like Fedora Copr, which provides this package.&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;$ sudo zypper addrepo https://download.opensuse.org/repositories/home:playablepliable/openSUSE_Tumbleweed/home:playablepliable.repo

[sudo] password for root:
Adding repository &amp;#39;home:playablepliable (openSUSE_Tumbleweed)&amp;#39; ......................................[done]
Repository &amp;#39;home:playablepliable (openSUSE_Tumbleweed)&amp;#39; successfully added

URI         : https://download.opensuse.org/repositories/home:/playablepliable/openSUSE_Tumbleweed/
Enabled     : Yes
GPG Check   : Yes
Autorefresh : No
Priority    : 99 (default priority)

Repository priorities are without effect. All enabled repositories share the same priority.
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Once the repo was added, the &lt;code&gt;jellyfin-media-player&lt;/code&gt; package should be available and can be installed using the following commands:&lt;/p&gt;</description>
    </item>
    <item>
      <title>Connect to Wifi with nmcli</title>
      <link>https://blog.khmersite.net/p/connect-to-wifi-with-nmcli/</link>
      <pubDate>Sun, 23 Jul 2023 15:51:55 +1000</pubDate>
      <guid>https://blog.khmersite.net/p/connect-to-wifi-with-nmcli/</guid>
      <description>&lt;p&gt;First check if the Wi-Fi device is enabled or not:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;$ nmcli radio wifi
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;If the output shows that the Wi-Fi is &lt;strong&gt;disabled&lt;/strong&gt;, then it can be enabled with:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;$ nmcli radio wifi on
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;If we already know the access point, then skip the following step. Otherwise, to identify the access points, run:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;$ nmcli dev wifi list
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Supposed we want to connect to the access point named &amp;rsquo;totoro&amp;rsquo;, and the password is &amp;rsquo;t0t0r02023&amp;rsquo;, we can connect to it by running the following command:&lt;/p&gt;</description>
    </item>
    <item>
      <title>Changing Permalink in Hugo</title>
      <link>https://blog.khmersite.net/p/changing-permalink-in-hugo/</link>
      <pubDate>Sat, 15 Jul 2023 21:19:54 +1000</pubDate>
      <guid>https://blog.khmersite.net/p/changing-permalink-in-hugo/</guid>
      <description>&lt;p&gt;This post is related to the previous one about &lt;a href=&#34;https://blog.khmersite.net/2023/06/changing-hugo-theme/&#34;&gt;changing a theme in Hugo&lt;/a&gt;. After I changed the theme to &amp;ldquo;PaperMod&amp;rdquo;, I realized that each article or blog post is under &amp;lsquo;post/date&amp;rsquo; URL path. For example, the following is the permanent link/path of a post:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;https://blog.khmersite.net/post/2023/06/changing-hugo-theme/
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Previously, there was no word &lt;strong&gt;post&lt;/strong&gt; in the URL path, and I still want it gone again with this new theme, as below.&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;https://blog.khmersite.net/2023/06/changing-hugo-theme/
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;The problem is, I forgot how it was done!&lt;/p&gt;</description>
    </item>
    <item>
      <title>Changing Hugo Theme</title>
      <link>https://blog.khmersite.net/p/changing-hugo-theme/</link>
      <pubDate>Tue, 20 Jun 2023 22:36:37 +1000</pubDate>
      <guid>https://blog.khmersite.net/p/changing-hugo-theme/</guid>
      <description>&lt;p&gt;Had you visited this blog recently, you may have noticed that the blog&amp;rsquo;s theme has changed.&lt;/p&gt;
&lt;p&gt;Here is a quick note on how I changed the theme of this blog from &lt;strong&gt;cayman-hugo-theme&lt;/strong&gt; to &lt;strong&gt;PaperMod&lt;/strong&gt;. For a little background, Hugo themes are installed
as git submodule. Want a quick recap on how to use Git Submodule? Here is a good content [0].&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;First, the current theme needs to be removed:&lt;/li&gt;
&lt;/ol&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;$ git submodule
4a924cef54081b61530a30bd69d442ae99916561 themes/cayman-hugo-theme (heads/master)

$ git submodule deinit &amp;#34;themes/cayman-hugo-theme&amp;#34;
$ git rm &amp;#34;themes/cayman-hugo-theme&amp;#34;

$ git commit -m &amp;#39;remove theme cayman-hugo-theme&amp;#39;
&lt;/code&gt;&lt;/pre&gt;&lt;ol start=&#34;2&#34;&gt;
&lt;li&gt;Add a new theme, &lt;strong&gt;PaperMod&lt;/strong&gt; [2] as the submodule.&lt;/li&gt;
&lt;/ol&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;$ git submodule add --depth=1 https://github.com/adityatelange/hugo-PaperMod.git themes/PaperMod
$ git add .gitmodules
$ git add config.yml

$ git commit -m &amp;#39;change theme to PaperMod&amp;#39;
$ git push
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Note: As each Hugo theme contains specific parameters, I also had to update the &lt;code&gt;config.yml&lt;/code&gt; required by this new theme. A copy of a sample &lt;code&gt;config.yml&lt;/code&gt;
is available at the theme&amp;rsquo;s &lt;a href=&#34;https://github.com/adityatelange/hugo-PaperMod/tree/exampleSite/&#34;&gt;exampleSite&lt;/a&gt; [1].&lt;/p&gt;</description>
    </item>
    <item>
      <title>How to find EC2 instance ID from a known private IP using AWS CLI</title>
      <link>https://blog.khmersite.net/p/how-to-find-ec2-instance-id-from-private-ip/</link>
      <pubDate>Fri, 26 May 2023 16:50:45 +1000</pubDate>
      <guid>https://blog.khmersite.net/p/how-to-find-ec2-instance-id-from-private-ip/</guid>
      <description>&lt;p&gt;When I first started to use AWS CLI, I felt overwhelmed, and I wondered how long it would take me to be familiar with the tool. Fast forward to many months later, I find the AWS CLI very pleasant to use. For example, there are same patterns and the CLI reference page online is quite useful.&lt;/p&gt;
&lt;p&gt;Anyway, like many thing I&amp;rsquo;ve learned about Linux, I learned and could retain the information better with practice and document. So, I&amp;rsquo;m gonna just dump the commands that I need and learn here to help my future self should I need to find the same commands.&lt;/p&gt;</description>
    </item>
    <item>
      <title>How to Zip a file using command line</title>
      <link>https://blog.khmersite.net/p/how-to-zip-a-file-using-command-line/</link>
      <pubDate>Mon, 22 May 2023 19:10:22 +1000</pubDate>
      <guid>https://blog.khmersite.net/p/how-to-zip-a-file-using-command-line/</guid>
      <description>&lt;p&gt;I normally use &lt;code&gt;gzip&lt;/code&gt; for file compression. However, there is time when you want to share a compressed
file with Windows users and you want to avoid them cursing at you. One good solution is to use
&lt;code&gt;zip&lt;/code&gt; compression (even if I had to learn how to do it on a Linux machine).&lt;/p&gt;
&lt;p&gt;Well, like always we can run &lt;code&gt;man zip&lt;/code&gt; to learn more about it, but since you&amp;rsquo;re reading this,
it is unlikely that you&amp;rsquo;re doing that. So, here is how you can do it.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Proxmox Cannot Stop VM - Help!</title>
      <link>https://blog.khmersite.net/p/proxmox-cannot-stop-vm/</link>
      <pubDate>Tue, 25 Apr 2023 21:36:17 +1000</pubDate>
      <guid>https://blog.khmersite.net/p/proxmox-cannot-stop-vm/</guid>
      <description>&lt;p&gt;I&amp;rsquo;ve been running a few VMs on Proxmox, including a Pfsense VM, for over a year without a single issue. This evening, however, I noticed that I wasn&amp;rsquo;t able to access any local DNS records due to the VM hosting DNS server was not responding.&lt;/p&gt;
&lt;p&gt;On checking the Proxmox console, I could see that that VM  with ID 102 was definitely not responding. So, I tried to reboot, stop and even reset. None of which worked. Knowing that Proxmox is based on or using KVM, I guess there must be many commands that can be run directly on the Proxmox host itself.&lt;/p&gt;</description>
    </item>
    <item>
      <title>How to Run Redis in Podman Container</title>
      <link>https://blog.khmersite.net/p/how-to-run-redis-in-podman-container/</link>
      <pubDate>Wed, 22 Feb 2023 23:30:49 +1100</pubDate>
      <guid>https://blog.khmersite.net/p/how-to-run-redis-in-podman-container/</guid>
      <description>&lt;p&gt;This is just a quick note on how to run Redis as a container using Podman on Ubuntu 22.04 (i.e. there will be no mention about SELinux.)&lt;/p&gt;
&lt;h3 id=&#34;create-a-persistent-volume-for-the-redis-container&#34;&gt;Create a persistent volume for the Redis container&lt;/h3&gt;
&lt;p&gt;I like storing all data/volume for containers under &lt;code&gt;/srv/data&lt;/code&gt;. So I&amp;rsquo;ll create a sub-directory called &lt;code&gt;redis-data&lt;/code&gt; under the same location.&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;# mkdir -p /srv/data/redis-data
&lt;/code&gt;&lt;/pre&gt;&lt;h3 id=&#34;pull-the-redis-image&#34;&gt;Pull the Redis image&lt;/h3&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;# podman pull docker.io/redis
&lt;/code&gt;&lt;/pre&gt;&lt;h3 id=&#34;create-and-run-the-redis-container&#34;&gt;Create and run the Redis container&lt;/h3&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;# podman run -d --name redis_server \
    -v /srv/data/redis-data:/var/redis/data \
    -p 6379:6379 redis
&lt;/code&gt;&lt;/pre&gt;&lt;h3 id=&#34;create-systemd-service-for-the-redis-container&#34;&gt;Create systemd service for the Redis container&lt;/h3&gt;
&lt;p&gt;I like creating a systemd service to enable/start the container.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Installing Htop on Oracle Linux 8</title>
      <link>https://blog.khmersite.net/p/installing-htop-on-oracle-linux-8/</link>
      <pubDate>Mon, 06 Feb 2023 22:51:36 +1100</pubDate>
      <guid>https://blog.khmersite.net/p/installing-htop-on-oracle-linux-8/</guid>
      <description>&lt;p&gt;I want to install &lt;code&gt;htop&lt;/code&gt; on Oracle Linux 8.7. How hard could it be?&lt;/p&gt;
&lt;p&gt;TL;DR; - it&amp;rsquo;s not hard, but it took me a little while to get &lt;code&gt;htop&lt;/code&gt; installed. I&amp;rsquo;m not new to (most) Linux distros, but this is the first time I&amp;rsquo;m using Oracle Linux.&lt;/p&gt;
&lt;p&gt;So, let&amp;rsquo;s start by showing some basic information.&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;[root@catbus ~]# cat /etc/os-release | grep -i pretty
PRETTY_NAME=&amp;#34;Oracle Linux Server 8.7&amp;#34;

[root@catbus ~]# rpm -qi htop
package htop is not installed

[root@catbus ~]# dnf search htop
Last metadata expiration check: 0:23:03 ago on Mon 06 Feb 2023 11:32:58 AM GMT.
No matches found.
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;The above output shows that &lt;code&gt;htop&lt;/code&gt; is not installed, and the package is not available in all enabled repositories.&lt;/p&gt;</description>
    </item>
    <item>
      <title>How to Install AWS CLI on RockyLinux</title>
      <link>https://blog.khmersite.net/p/how-to-install-awscli-on-rockylinux/</link>
      <pubDate>Tue, 31 Jan 2023 12:02:59 +1100</pubDate>
      <guid>https://blog.khmersite.net/p/how-to-install-awscli-on-rockylinux/</guid>
      <description>&lt;p&gt;The &lt;code&gt;awscli&lt;/code&gt; package is available from the EPEL repository, which is not enabled by default on RockyLinux.&lt;/p&gt;
&lt;p&gt;Enable the EPEL repo by installing &lt;code&gt;epel-release&lt;/code&gt; pacakge.&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;$ sudo dnf install epel-release
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Once the EPEL repo is successfully enabled, we can install &lt;code&gt;awscli&lt;/code&gt; package.&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;$ sudo dnf install awscli
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Enable and verify that the &lt;code&gt;awscli&lt;/code&gt; is installed on the system.&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;$ aws --version
aws-cli/1.18.156 Python/3.6.8 Linux/4.18.0-425.10.1.el8_7.x86_64 botocore/1.18.15
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;As a bonus, here is how to configure the AWS credential.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Check disk usage on root (/) partition excluding other partitions</title>
      <link>https://blog.khmersite.net/p/check-disk-usage-on-root-partition/</link>
      <pubDate>Thu, 22 Sep 2022 11:29:53 +1000</pubDate>
      <guid>https://blog.khmersite.net/p/check-disk-usage-on-root-partition/</guid>
      <description>&lt;p&gt;While checking the root partition on my desktop today, I noticed that its usage is at 89% with just 6GiB free. For this reason, I wanted to find out what&amp;rsquo;s consuming most spaces and whether I can clean it up a bit.&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;# df -h /
Filesystem                       Size  Used Avail Use% Mounted on
/dev/mapper/fedora_watamem-root   56G   47G  6.3G  89% /
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;The first two commands that come to my mind are &lt;code&gt;du&lt;/code&gt; and &lt;code&gt;ncdu&lt;/code&gt;. In this post, I&amp;rsquo;ll use &lt;code&gt;ncdu&lt;/code&gt; to investigate the disk usages on the &amp;lsquo;/&amp;rsquo; partitions.&lt;/p&gt;</description>
    </item>
    <item>
      <title>How to add additional remote git repository</title>
      <link>https://blog.khmersite.net/p/how-to-add-additonal-remote-git-repo/</link>
      <pubDate>Sat, 03 Sep 2022 12:24:10 +1000</pubDate>
      <guid>https://blog.khmersite.net/p/how-to-add-additonal-remote-git-repo/</guid>
      <description>&lt;p&gt;Though it&amp;rsquo;s not very common in my daily work, I occasionally need to add additional remote Git repositories mainly for pushing. In fact, I did this about 4 to 5 times already, and thought that it&amp;rsquo;d be the last time.&lt;/p&gt;
&lt;p&gt;Today, I need do this again, and I forgot!&lt;/p&gt;
&lt;p&gt;Currently, I have the following remote repository set for &amp;lsquo;origin&amp;rsquo;:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;❯ git remote -v
origin  git@git.homeserver.local:kenno/ansible.git (fetch)
origin  git@git.homeserver.local:kenno/ansible.git (push)
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;I wanted to add &lt;code&gt;https://kenno@gitea.homeserver.local/kenno/ansible.git&lt;/code&gt; as the additional repo for pushing.&lt;/p&gt;</description>
    </item>
    <item>
      <title>How to reset Rhythmbox library</title>
      <link>https://blog.khmersite.net/p/how-to-reset-rhythmbox-library/</link>
      <pubDate>Fri, 02 Sep 2022 20:53:10 +1000</pubDate>
      <guid>https://blog.khmersite.net/p/how-to-reset-rhythmbox-library/</guid>
      <description>&lt;p&gt;Rhythmbox stores its music database as an XML file located in &lt;code&gt;~/.local/share/rhythmbox/rhythmdb.xml&lt;/code&gt;. The easiest way to reset this database is to close the Rhythmbox program, and completely remove the &lt;code&gt;rhythmdb.xml&lt;/code&gt; file.&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;➜ pkill rhythmbox
➜ rm ~/.local/share/rhythmbox/rhythmdb.xml

➜ rhythmbox &amp;amp;
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Reference:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;https://askubuntu.com/questions/56328/how-does-one-clear-the-rhythmbox-music-library-database&#34;&gt;How does one clear the Rhythmbox music library database?&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;</description>
    </item>
    <item>
      <title>How to check cpu temp on Debian and Ubuntu</title>
      <link>https://blog.khmersite.net/p/how-to-check-cpu-temp-on-debian-ubuntu/</link>
      <pubDate>Mon, 29 Aug 2022 21:08:50 +1000</pubDate>
      <guid>https://blog.khmersite.net/p/how-to-check-cpu-temp-on-debian-ubuntu/</guid>
      <description>&lt;p&gt;This is just a quick note for me to display CPU temperature on one of my fanless device which runs Debian.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Install the required package &lt;code&gt;lm-sensors&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Run the &lt;code&gt;sensors&lt;/code&gt; command.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Here is a sample output:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;root@pve:~# sensors
coretemp-isa-0000
Adapter: ISA adapter
Package id 0:  +45.0°C  (high = +105.0°C, crit = +105.0°C)
Core 0:        +37.0°C  (high = +105.0°C, crit = +105.0°C)
Core 1:        +37.0°C  (high = +105.0°C, crit = +105.0°C)
Core 2:        +37.0°C  (high = +105.0°C, crit = +105.0°C)
Core 3:        +37.0°C  (high = +105.0°C, crit = +105.0°C)

acpitz-acpi-0
Adapter: ACPI interface
temp1:        +27.8°C  (crit = +119.0°C)
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Reference:&lt;/p&gt;</description>
    </item>
    <item>
      <title>How to upgrade FreeBSD from 13.0 to 13.1</title>
      <link>https://blog.khmersite.net/p/how-to-upgrade-freebsd-13.0-to-13.1/</link>
      <pubDate>Tue, 19 Jul 2022 10:51:46 +1000</pubDate>
      <guid>https://blog.khmersite.net/p/how-to-upgrade-freebsd-13.0-to-13.1/</guid>
      <description>&lt;p&gt;I feel upgrading FreeBSD from 13.0 to 13.1 is so &lt;em&gt;minor&lt;/em&gt; that it might not worth a blog post. The thing is, I just did this upgrade on one of my 2 nas servers a month ago, and now I forgot how to do this already.&lt;/p&gt;
&lt;p&gt;This post should be short, and I will include the reference(s) at the end if you&amp;rsquo;d like to learn more about this update process.&lt;/p&gt;</description>
    </item>
    <item>
      <title>How to Deploy Xen Orchestra Appliance on XCP-ng</title>
      <link>https://blog.khmersite.net/p/how-to-deploy-xen-orchestra-appliance-on-xcp-ng/</link>
      <pubDate>Sun, 10 Jul 2022 14:34:13 +1000</pubDate>
      <guid>https://blog.khmersite.net/p/how-to-deploy-xen-orchestra-appliance-on-xcp-ng/</guid>
      <description>&lt;p&gt;This is a quick note on how I got the Xen Orchestra Appliance (XOA) on a new XCP-ng server. I know there are many guides out there, and in fact this is not my original content, but I want to capture what I did to get it working.&lt;/p&gt;
&lt;p&gt;Here are the steps I performed on my server in order to install XOA:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;[14:16 xcpng ~]# bash -c &amp;#34;$(curl -sS http://xoa.io/deploy)&amp;#34;

Welcome to the XOA auto-deploy script!

Network settings:
IP address? [dhcp]

Your XOA will be started using DHCP

xoa SSH account:
Password? (disabled if empty)

xoa account is disabled, to enable it later see https://xen-orchestra.com/docs/troubleshooting.html#set-or-recover-xoa-vm-password

Importing XOA VM...
Booting XOA VM...
Waiting for your XOA to be ready…

Your XOA is ready at
  https://192.168.1.207/

Default UI credentials: admin@admin.net/admin

VM UUID: 19e56589-ed0d-5a24-c845-75b40b344f3b

[14:24 xcpng ~]#
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Next, login to the XOA at https://192.168.1.207 using the default credential to connect the XCP-ng server this:&lt;/p&gt;</description>
    </item>
    <item>
      <title>Restoring Postgresql DB backup with different owner role</title>
      <link>https://blog.khmersite.net/p/postgresql-restore-db-backup-with-different-owner-role/</link>
      <pubDate>Sun, 03 Jul 2022 23:20:48 +1000</pubDate>
      <guid>https://blog.khmersite.net/p/postgresql-restore-db-backup-with-different-owner-role/</guid>
      <description>&lt;p&gt;Like the title says, when restoring a Postgresql database onto a different server which happens to have a dfferent role owner,
extra care is needed, otherwise similar error message below will come up:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;pg_restore: from TOC entry 217; 1259 17163 TABLE users_collections webdev1
pg_restore: error: could not execute query: ERROR:  role &amp;#34;webdev1&amp;#34; does not exist
Command was: ALTER TABLE public.users_collections OWNER TO webdev1;

pg_restore: from TOC entry 218; 1259 17168 TABLE users_organizations webdev1
pg_restore: error: could not execute query: ERROR:  role &amp;#34;webdev1&amp;#34; does not exist
Command was: ALTER TABLE public.users_organizations OWNER TO webdev1;

pg_restore: warning: errors ignored on restore: 19
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;What happened was that there was no role named &lt;code&gt;webdev1&lt;/code&gt; on the Postgreseql server where the database restoring was performed. Instead, on my database server, I had a role named &lt;code&gt;webdev2&lt;/code&gt;.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Mounting NFS share with Systemd Automount</title>
      <link>https://blog.khmersite.net/p/mounting-nfs-with-systemd-automount/</link>
      <pubDate>Mon, 13 Jun 2022 22:41:28 +1000</pubDate>
      <guid>https://blog.khmersite.net/p/mounting-nfs-with-systemd-automount/</guid>
      <description>&lt;p&gt;On my main workstation running Fedora 36, I use both autofs and Systemd automount to mount NFS on demand. Gradually, I&amp;rsquo;m leaning toward just to use Systemd automount.&lt;/p&gt;
&lt;p&gt;Here is just a brain dump with an example of mounting an NFS share with Systemd autmount. Though, I had done this before, I found this blog post, available at [1], provides details on how to do this.&lt;/p&gt;
&lt;h3 id=&#34;assumption&#34;&gt;Assumption&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;The NFS server and share: banan.example.com:/srv/music&lt;/li&gt;
&lt;li&gt;The preferred local mount point: /srv/banan/music&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&#34;create-required-systemd-unit-files&#34;&gt;Create required Systemd unit files&lt;/h3&gt;
&lt;p&gt;We will need 2 unit files: the mount unit and the automount unit.&lt;/p&gt;</description>
    </item>
    <item>
      <title>How to Enable Proxmox Guest Agent</title>
      <link>https://blog.khmersite.net/p/how-to-enable-proxmox-guest-agent/</link>
      <pubDate>Sun, 12 Jun 2022 19:16:47 +1000</pubDate>
      <guid>https://blog.khmersite.net/p/how-to-enable-proxmox-guest-agent/</guid>
      <description>&lt;p&gt;I recently had a need to run Proxmox Virtual Environment (7.2-4) at home for a project. So far everything seemed to be straight forward, partially thanks to KVM technology used in Promox.&lt;/p&gt;
&lt;p&gt;However, I also learned a few things along the way too. The first thing that I had look up on the Internet to get it working is to activate (Promox) qemu-guest-agent.&lt;/p&gt;
&lt;p&gt;If you&amp;rsquo;re reading this, it&amp;rsquo;s likely you didn&amp;rsquo;t get it working on first trial either.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Start and Stop Network Service on FreeBSD</title>
      <link>https://blog.khmersite.net/p/how-to-start-stop-network-service-on-freebsd/</link>
      <pubDate>Sun, 05 Jun 2022 21:09:31 +1000</pubDate>
      <guid>https://blog.khmersite.net/p/how-to-start-stop-network-service-on-freebsd/</guid>
      <description>&lt;p&gt;A quick note for me to remind myself how to stop/start network service on FreeBSD (13.0).&lt;/p&gt;
&lt;p&gt;To stop or start, run one of the following commands:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;# service netif stop
# service netif start
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;To restart, just replace &lt;code&gt;stop&lt;/code&gt; or &lt;code&gt;start&lt;/code&gt; with &lt;code&gt;restart&lt;/code&gt;:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;# service netif restart
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;I also just found out that the above commands will nto restarting the routing service, as they only stop/start/restart network.&lt;/p&gt;
&lt;p&gt;To restart the routing service on FreeBSD, run:&lt;/p&gt;</description>
    </item>
    <item>
      <title>How to delete disk partitions on Windows using PowerShell</title>
      <link>https://blog.khmersite.net/p/how-to-delete-disk-partitions-on-windows/</link>
      <pubDate>Sun, 15 May 2022 18:43:47 +1000</pubDate>
      <guid>https://blog.khmersite.net/p/how-to-delete-disk-partitions-on-windows/</guid>
      <description>&lt;p&gt;Today I just added an old SSD to a Windows machine to use it as a back up drive. With old disks, usually they come with existing data, and I wanted to get rid of it. The problem is I couldn&amp;rsquo;t figure out how to do this using the Disk Management, the native GUI application used to manage disks.&lt;/p&gt;
&lt;p&gt;&lt;img loading=&#34;lazy&#34; src=&#34;https://blog.khmersite.net/post/2022/05/disk-management-windows.png&#34;&gt;&lt;/p&gt;
&lt;p&gt;The problem could be simple to Windows users. Basically, when I right-clicked on the 2 partitions (450 MB and 100 MB) on Disk 0, there is no option to remove them.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Turn on bluetooth on login screen in Tumbleweed</title>
      <link>https://blog.khmersite.net/p/turn-on-bluetooth-on-login-screen-tumbleweed/</link>
      <pubDate>Sun, 10 Apr 2022 21:01:40 +1000</pubDate>
      <guid>https://blog.khmersite.net/p/turn-on-bluetooth-on-login-screen-tumbleweed/</guid>
      <description>&lt;p&gt;After taking a very long break (over a decade) from running openSUSE on my person machine, I finally got Tumbleweed installed on a spare Intel NUC machine. If you&amp;rsquo;re one of my blog readers, expect to see more contents about SUSE/openSUSE later.&lt;/p&gt;
&lt;p&gt;Today, I&amp;rsquo;m going to share how I fix the issue with bluetooth keyboard/mouse not connected to this NUC at the login screen. I can&amp;rsquo;t remember I needed to do that my main machine running Fedora, but oh well, the fix is simple enough (if you know now).&lt;/p&gt;</description>
    </item>
    <item>
      <title>How to Create Exfat Filesystem on Usb</title>
      <link>https://blog.khmersite.net/p/how-to-create-exfat-filesystem-on-usb/</link>
      <pubDate>Thu, 31 Mar 2022 17:33:15 +1100</pubDate>
      <guid>https://blog.khmersite.net/p/how-to-create-exfat-filesystem-on-usb/</guid>
      <description>&lt;p&gt;I have a UBS drive formatted as fat32 because I need to share it with Linux and macOS. When I want to copy a Linux ISO file which is larger than 4GiB, this was not possible due to the limitation of fat32 filesystem.&lt;/p&gt;
&lt;p&gt;A solution is to format that USB drive with exfat filesystem. I will do this on a Fedora 35 machine, but the process should be familiar for other Linux distros too.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Create a Disk Image With dd Command</title>
      <link>https://blog.khmersite.net/p/create-disk-image-with-dd/</link>
      <pubDate>Sat, 19 Mar 2022 21:00:58 +1100</pubDate>
      <guid>https://blog.khmersite.net/p/create-disk-image-with-dd/</guid>
      <description>&lt;h2 id=&#34;situation&#34;&gt;Situation:&lt;/h2&gt;
&lt;p&gt;I want to re-use an external drive which already contains some data. So I will create a disk image on an external drive in case I need to copy that image back to the drive in the future.&lt;/p&gt;
&lt;h2 id=&#34;solution&#34;&gt;Solution:&lt;/h2&gt;
&lt;p&gt;Normally, I just run &lt;code&gt;dd&lt;/code&gt; to create an &lt;code&gt;file.img&lt;/code&gt; when the disk is small, e.g. SD card. However, the drive capacity is 512GB. So a better option is to compress the image. Here is how this can be done:&lt;/p&gt;</description>
    </item>
    <item>
      <title>mkfs.xfs: cannot open /dev/sda1: Device or resource busy</title>
      <link>https://blog.khmersite.net/p/mfks-xfs-cannot-open-dev-sda1-device-or-resource-busy/</link>
      <pubDate>Sun, 13 Mar 2022 20:10:03 +1100</pubDate>
      <guid>https://blog.khmersite.net/p/mfks-xfs-cannot-open-dev-sda1-device-or-resource-busy/</guid>
      <description>&lt;p&gt;I&amp;rsquo;m trying to create an XFS filestem on a used disk, and got into a problem. Here is the error message:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;# mkfs.xfs /dev/sda1
mkfs.xfs: cannot open /dev/sda1: Device or resource busy
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;So, let&amp;rsquo;s see if I can fix it. (Spoiler alert: I think I can, even though it&amp;rsquo;s not yet done at the time of this writing.)&lt;/p&gt;
&lt;p&gt;Let&amp;rsquo;s check the partitions of &lt;code&gt;/dev/sda&lt;/code&gt;:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;# parted /dev/sda print
Model: ATA ST1000LM014-1EJ1 (scsi)
Disk /dev/sda: 1000GB
Sector size (logical/physical): 512B/4096B
Partition Table: gpt
Disk Flags:

Number  Start   End    Size   File system  Name  Flags
 1      1049kB  512GB  512GB  ntfs         1
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;So, there is a partition (&lt;code&gt;/dev/sda1&lt;/code&gt;) with 512GB in size, and its filesystem is &lt;code&gt;ntfs&lt;/code&gt;. I was pretty sure that I had selected &lt;code&gt;xfs&lt;/code&gt; as the filesystem.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Using xclip to copy terminal content to clipboard</title>
      <link>https://blog.khmersite.net/p/using-xclip-to-copy-terminal-content-to-clipboard/</link>
      <pubDate>Fri, 04 Mar 2022 23:25:11 +1100</pubDate>
      <guid>https://blog.khmersite.net/p/using-xclip-to-copy-terminal-content-to-clipboard/</guid>
      <description>&lt;p&gt;It&amp;rsquo;s quite annoying when I know the command I can use to copy the content on a terminal to clipboard. I know, I can run &lt;code&gt;man xclip&lt;/code&gt;, but I think it&amp;rsquo;s still easier for me to visit this page and see how to do it.&lt;/p&gt;
&lt;p&gt;For example, I want to copy the content of my ssh keypair, ed2559.pub, to clipboard, and here how it can be done:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;➜ xclip -sel clip &amp;lt; ~/.ssh/id_ed25519.pub 
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Or:&lt;/p&gt;</description>
    </item>
    <item>
      <title>LVM - How to Activate or Deactivate a Volume Group</title>
      <link>https://blog.khmersite.net/p/lvm-activate-deactivate-volume-group/</link>
      <pubDate>Thu, 03 Feb 2022 22:50:10 +1100</pubDate>
      <guid>https://blog.khmersite.net/p/lvm-activate-deactivate-volume-group/</guid>
      <description>&lt;p&gt;Well, I hardly need to activate or deactivate LVM volume groups. But when I do, I also hardly remember the command required to do that. So hopefully, I can refer to this post should I need to perform one of these tasks in the future.&lt;/p&gt;
&lt;p&gt;Since a volume group is activated by default when it is created, let&amp;rsquo;s start with a command to deactivate it.&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;# vgchange -a n example_volume_group
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Like wise, to activate a volume group, use the following command:&lt;/p&gt;</description>
    </item>
    <item>
      <title>FreeIPA reset failed locked out admin account</title>
      <link>https://blog.khmersite.net/p/freeipa-reset-failed-locked-out-admin-account/</link>
      <pubDate>Thu, 03 Feb 2022 00:06:21 +1100</pubDate>
      <guid>https://blog.khmersite.net/p/freeipa-reset-failed-locked-out-admin-account/</guid>
      <description>&lt;p&gt;This is a short note on how to unlock admin account for FreeIPA.&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;# kinit admin
kinit: Client’s credentials have been revoked while getting initial credentials
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;When too many incorrect password attempts are made, the &lt;code&gt;admin&lt;/code&gt; account is locked out. To unlock it, perform the following on the FreeIPA server:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;# ldapmodify -x -D &amp;#34;cn=directory manager&amp;#34; -W
Enter LDAP Password:
dn: uid=admin,cn=users,cn=accounts,dc=example,dc=com
changetype: modify
delete: krbLoginFailedCount
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;To process the modification enter Control-D. If it’s successful you’ll receive a this message:&lt;/p&gt;</description>
    </item>
    <item>
      <title>Freeipa Unable to Communicate With Cms 403</title>
      <link>https://blog.khmersite.net/p/freeipa-unable-to-communicate-with-cms-403/</link>
      <pubDate>Wed, 02 Feb 2022 23:48:51 +1100</pubDate>
      <guid>https://blog.khmersite.net/p/freeipa-unable-to-communicate-with-cms-403/</guid>
      <description>&lt;p&gt;A new post, a new problem, and a solution.&lt;/p&gt;
&lt;p&gt;Earlier today I worked on a task involving SSSD, &lt;a href=&#34;https://sssd.io&#34;&gt;System Security Services Daemon&lt;/a&gt;, a system service to access remote directories and authentication mechanisms. It got both excited and a little worried at the same times, since it&amp;rsquo;s been a long while since I had do anything with SSSD.&lt;/p&gt;
&lt;p&gt;Fast forward to the evening, I realized I had a FreeIPA server set up a long time ago right after passing the &lt;a href=&#34;https://www.redhat.com/en/services/training/ex362-red-hat-certified-specialist-identity-management-exam&#34;&gt;Red Hat Certified Specialist in Identity Management exam&lt;/a&gt; (EX362). Note this FreeIPA server was actually a second server I had set up after the EX362 exam. The original server was based on CentOS 7. The problem&lt;/p&gt;</description>
    </item>
    <item>
      <title>Foreman: Create a new product &amp; repository for AlmaLinux</title>
      <link>https://blog.khmersite.net/p/foreman-create-produt-repo-almalinux/</link>
      <pubDate>Sun, 30 Jan 2022 13:07:42 +1100</pubDate>
      <guid>https://blog.khmersite.net/p/foreman-create-produt-repo-almalinux/</guid>
      <description>&lt;p&gt;A few days ago I started to re-surrect my Foreman(/katello) server and wanted to use it to pull content from remote repository for AlmaLinux. This involves updating Foreman with a new product and related AlmaLinux repository. I wrote a similar post on &lt;a href=&#34;2021/03/foreman-creating-product-repository-using-hammer/&#34;&gt;creating product &amp;amp; repository using hammer&lt;/a&gt; before for EPEL 8. However, it&amp;rsquo;s been a long while and things could change with the current version of Foreman server.&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;# rpm -qa | egrep -i &amp;#39;^foreman-[0-9]|^katello-[0-9]|^pulp-server-[0-9]&amp;#39;
katello-4.3.0-1.el8.noarch
foreman-3.1.1-1.el8.noarch

# hammer --version
hammer (3.1.0)
 * hammer_cli_foreman (3.1.0)
 * hammer_cli_foreman_remote_execution (unknown version)
 * hammer_cli_foreman_tasks (unknown version)
 * hammer_cli_katello (1.3.1)
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;There would be 3 steps:&lt;/p&gt;</description>
    </item>
    <item>
      <title>Resizing KVM qcow2 Image</title>
      <link>https://blog.khmersite.net/p/resizing-qcow2-image/</link>
      <pubDate>Sat, 25 Dec 2021 08:05:07 +1100</pubDate>
      <guid>https://blog.khmersite.net/p/resizing-qcow2-image/</guid>
      <description>&lt;p&gt;I&amp;rsquo;m quite sure I&amp;rsquo;d resized qcow2 images before. However, when I needed to resize an image today for my VM at home, I totally forgot about it. Well, this means it&amp;rsquo;s a good excuse for me to just write down a few commands to help me in the future.&lt;/p&gt;
&lt;p&gt;If you try to follow a long, two things you wanna keep in in mind: do it at your own risk, and always backup your data before you make change to it. Having said, that&amp;rsquo;s get started.&lt;/p&gt;</description>
    </item>
    <item>
      <title>bash: append_path: command not found</title>
      <link>https://blog.khmersite.net/p/bash-append-path-command-not-found/</link>
      <pubDate>Thu, 09 Dec 2021 21:52:12 +1100</pubDate>
      <guid>https://blog.khmersite.net/p/bash-append-path-command-not-found/</guid>
      <description>&lt;p&gt;I have a few Raspberry Pi at home, they&amp;rsquo;re used for specific purposes such as Kodi media player, Pi-hole server, and a backup DNS/DHCP server. Recently, I need to turn on the backup DNS/DHCP server, which is one of the Raspberry Pi devices running Arch Linux.&lt;/p&gt;
&lt;p&gt;When I logged into to the server, I saw a message complaining that &lt;code&gt;bash: append_path: command not found&lt;/code&gt;. It&amp;rsquo;s been so long since this little server, so I can&amp;rsquo;t remember what happened last time.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Set default window&#39;s dimensions for Alacritty</title>
      <link>https://blog.khmersite.net/p/set-alacritty-default-dimensions/</link>
      <pubDate>Wed, 17 Nov 2021 20:52:25 +1100</pubDate>
      <guid>https://blog.khmersite.net/p/set-alacritty-default-dimensions/</guid>
      <description>&lt;p&gt;I haven&amp;rsquo;t really posted anything new recently as I&amp;rsquo;ve just had a big transision in my career. I may or may not write about this in the future, as I don&amp;rsquo;t think it&amp;rsquo;s that relevant to you.&lt;/p&gt;
&lt;p&gt;Anyway, I&amp;rsquo;ve been having this trouble with window size of Alacritty being too small on launched.First what is &lt;a href=&#34;https://github.com/alacritty/alacritty&#34;&gt;Alacritty&lt;/a&gt;? It&amp;rsquo;s an terminal emulator written in Rust. It also makes use of GPU-acceleration, which should improve some performance in theory. I tried to make change to the config file of Alacritty, and it didn&amp;rsquo;t seem to work so I wasn&amp;rsquo;t sure I made the right change.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Configure Interface Teaming Using Nmcli</title>
      <link>https://blog.khmersite.net/p/configure-interface-teaming-using-nmcli/</link>
      <pubDate>Tue, 31 Aug 2021 23:29:27 +1000</pubDate>
      <guid>https://blog.khmersite.net/p/configure-interface-teaming-using-nmcli/</guid>
      <description>&lt;p&gt;If you want to know what is Network Teaming, please check out this &lt;a href=&#34;https://www.linuxsysadmins.com/setup-network-teaming-in-rhel-and-centos8/&#34;&gt;link&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;In this post, I&amp;rsquo;m going to just list all the commands required to setup a team interface.&lt;/p&gt;
&lt;p&gt;Let&amp;rsquo;s list the available network interfaces I have on my server.&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;$ nmcli dev status
DEVICE      TYPE      STATE                   CONNECTION 
enp1s0      ethernet  connected               enp1s0     
enp7s0      ethernet  connected               student    
virbr0      bridge    connected (externally)  virbr0     
enp8s0      ethernet  disconnected            --         
enp9s0      ethernet  disconnected            --         
lo          loopback  unmanaged               --         
virbr0-nic  tun       unmanaged               --    
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;From the above output, you probably can guess that I&amp;rsquo;m going to use &lt;code&gt;enp8s0&lt;/code&gt; and &lt;code&gt;enp9s0&lt;/code&gt; to create a team network interface.&lt;/p&gt;</description>
    </item>
    <item>
      <title>What does source (command) do?</title>
      <link>https://blog.khmersite.net/p/what-does-source-do/</link>
      <pubDate>Mon, 30 Aug 2021 18:22:39 +1000</pubDate>
      <guid>https://blog.khmersite.net/p/what-does-source-do/</guid>
      <description>&lt;p&gt;If you&amp;rsquo;re a seasoned Linux user, you may have used &lt;code&gt;source&lt;/code&gt; command once or twice before. You might also have used &lt;code&gt;.&lt;/code&gt;, the exactly same command, instead. Both &lt;code&gt;source&lt;/code&gt; and &lt;code&gt;.&lt;/code&gt; are shell builtin commands.&lt;/p&gt;
&lt;p&gt;I have used this many times, but I only used for one purpose which is to read the environment variables from a file to the current shell environment. So, when I was asked during a job interview, &amp;ldquo;What does source do?&amp;rdquo;, the only answer I could tell them was - I personally only use &lt;code&gt;source&lt;/code&gt; command to read the variables into the current shell environment.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Dolphin Error &#34;Could not enter folder tags:/&#34;</title>
      <link>https://blog.khmersite.net/p/dolphin-could-not-enter-folder-tags/</link>
      <pubDate>Sat, 31 Jul 2021 10:41:22 +1000</pubDate>
      <guid>https://blog.khmersite.net/p/dolphin-could-not-enter-folder-tags/</guid>
      <description>&lt;p&gt;I normally use &lt;code&gt;dwm&lt;/code&gt; as the Windows manager on my laptop. However, I occationally need to switch to Plasma to test some applications out. This laptop is currently running Fedora 34 which has been upgraded from previous versions as old as 28, I believe.&lt;/p&gt;
&lt;p&gt;When I run Dolphin, there is an annoying error message &amp;ldquo;Could ont enter folder tags:/&amp;rdquo;. Though it doesn&amp;rsquo;t cause any problems, it&amp;rsquo;s very annoying.&lt;/p&gt;
&lt;p&gt;I found a solution from bug report &lt;a href=&#34;https://bugs.kde.org/show_bug.cgi?id=437176&#34;&gt;#437176&lt;/a&gt; suggesting to purge &lt;a href=&#34;https://community.kde.org/Baloo&#34;&gt;Baloo&lt;/a&gt; database. Here is the command to run:&lt;/p&gt;</description>
    </item>
    <item>
      <title>Unable to Use tar to Decompress tar.bz2 File</title>
      <link>https://blog.khmersite.net/p/unable-to-use-tar-to-decompress-tar-bzip2/</link>
      <pubDate>Sun, 25 Jul 2021 17:18:43 +1000</pubDate>
      <guid>https://blog.khmersite.net/p/unable-to-use-tar-to-decompress-tar-bzip2/</guid>
      <description>&lt;p&gt;I just setup a new server with a minimal installation of AlmaLinux 8. AlmaLinux is a variant of free Red Hat Enterprise Linux 8. It&amp;rsquo;s like a CentOS 8, but will have a full support until the end of RHEL 8 life cycle.&lt;/p&gt;
&lt;p&gt;This server is to serve as a new proxy for all VMs inside my home lab. I want to use &lt;code&gt;tinyproxy&lt;/code&gt; which is need to be compiled from source as the RPM package is not available as of the time writing. After downloading the source code, and try to decompress it, I was presented with the following error message:&lt;/p&gt;</description>
    </item>
    <item>
      <title>List Block Devices on FreeBSD</title>
      <link>https://blog.khmersite.net/p/list-disk-on-freebsd/</link>
      <pubDate>Wed, 14 Jul 2021 15:00:03 +1000</pubDate>
      <guid>https://blog.khmersite.net/p/list-disk-on-freebsd/</guid>
      <description>&lt;p&gt;Recently, I found out that the ZFS pool on a FreeBSD is running out of space. There is no option to clean up this storage, but there are spare disks. So the next logical thing to do is to add 2 extra disks to the existing (mirror) ZFS pool.&lt;/p&gt;
&lt;p&gt;This FreeBSD server is a virtual machine (VM), and after attaching 2 physical disks to this VM, I had difficulty identifying these disks. Well, I could guess it, but this is a production server, and I really don&amp;rsquo;t want to spend my whole weekend to setup this server from the backup. :)&lt;/p&gt;</description>
    </item>
    <item>
      <title>How to remove old kernels on Void linux</title>
      <link>https://blog.khmersite.net/p/how-to-remove-old-kernels-on-void-linux/</link>
      <pubDate>Sat, 10 Jul 2021 21:06:03 +1000</pubDate>
      <guid>https://blog.khmersite.net/p/how-to-remove-old-kernels-on-void-linux/</guid>
      <description>&lt;p&gt;I have a Void linux VM which only gets turned on once in every month. Today, when I booted up and updated the packages on this VM, I noticed that there are many old kernels installed. As a seasonal Void user, I had no clue on how to remove older kernels.&lt;/p&gt;
&lt;p&gt;Fortunately, a quick Google search pointed me to a video: &lt;a href=&#34;https://www.youtube.com/watch?v=8b_voOn3rQM&#34;&gt;VOID Linux: Removing old kernels with vkpurge&lt;/a&gt;. Basically, Void comes with a pre-installed utility program called &lt;code&gt;vkpurge&lt;/code&gt;. (&lt;code&gt;man vkpurge&lt;/code&gt; for more info.)&lt;/p&gt;</description>
    </item>
    <item>
      <title>Check Exit Status Code for Kerberos Ticket Validity</title>
      <link>https://blog.khmersite.net/p/exit-status-for-kerberos-ticket-validity/</link>
      <pubDate>Mon, 05 Jul 2021 15:53:12 +1000</pubDate>
      <guid>https://blog.khmersite.net/p/exit-status-for-kerberos-ticket-validity/</guid>
      <description>&lt;p&gt;If you&amp;rsquo;re familiar with Kerberos, one way to check if a ticket is valid is to run &lt;code&gt;klist&lt;/code&gt; command.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-console&#34; data-lang=&#34;console&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;❯ klist 
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Ticket cache: FILE:/tmp/krb5cc_1001
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Default principal: username@UNIVERSITY.EDU.AU
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#960050;background-color:#1e0010&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Valid starting     Expires            Service principal
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;02/07/21 11:26:50  02/07/21 21:26:50  krbtgt/UNIVERSITY.EDU.AU@UNIVERSITY.EDU.AU
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        renew until 03/07/21 11:26:50
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;02/07/21 12:24:07  02/07/21 21:26:50  cifs/server1.UNIVERSITY.edu.au@UNIVERSITY.EDU.AU
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;02/07/21 12:24:07  02/07/21 21:26:50  cifs/server1.UNIVERSITY.edu.au@UNIVERSITY.EDU.AU
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#960050;background-color:#1e0010&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;❯ date
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Mon 05 Jul 2021 16:01:59 AEST
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;From the above output, the principal ticket expired since 2 Jul. So how do we find out if the Kerberos (principal) ticket expires programmatically? This is something that I was trying to find out a few years ago, but kinda have been forgotten due to low priority.&lt;/p&gt;</description>
    </item>
    <item>
      <title>How to Scan for IPs of Connected Devices</title>
      <link>https://blog.khmersite.net/p/how-to-scan-for-ip-of-connected-device/</link>
      <pubDate>Sat, 03 Jul 2021 02:17:42 +1000</pubDate>
      <guid>https://blog.khmersite.net/p/how-to-scan-for-ip-of-connected-device/</guid>
      <description>&lt;p&gt;Suppose you just connect a Raspberry Pi to your home network using ethernet interface, and the Pi is not connected to a display device. How would you find an IP of that Raspberry Pi?&lt;/p&gt;
&lt;p&gt;Well, you&amp;rsquo;re right&amp;hellip;whatever you say. There are a few ways to do this - looking at DHCP log, router log, &amp;hellip;etc. But here is an even easier way to achieve this - using a command line tool called &lt;code&gt;nmap&lt;/code&gt;.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Service unavailable ERF64-6496 - There are migrations pending in the system.</title>
      <link>https://blog.khmersite.net/p/foreman-erf64-6496-there-are-migrations-pending/</link>
      <pubDate>Tue, 29 Jun 2021 20:53:35 +1000</pubDate>
      <guid>https://blog.khmersite.net/p/foreman-erf64-6496-there-are-migrations-pending/</guid>
      <description>&lt;p&gt;I just updated my Foreman server and reboot, then this happened when I accessed the web console:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;Service unavailable ERF64-6496 [Foreman::MaintenanceException]: There are migrations pending in the system.
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;This was the first time I&amp;rsquo;ve seen this message, and possibly because I haven&amp;rsquo;t done the update frequently enough.
Fortunately, according to &lt;a href=&#34;https://archyslife.blogspot.com/2020/06/foreman-erf64-6496-foremanmaintenanceex.html&#34;&gt;this blog post&lt;/a&gt;, it should be relatively easy to fix.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-console&#34; data-lang=&#34;console&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;[root@foreman ~]# sudo foreman-rake db:migrate
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;API controllers newer than Apipie cache! Run apipie:cache rake task to regenerate cache.
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;== 20210525144427 EnforceUniqueTemplates: migrating ===========================
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;-- add_index(:templates, [:type, :name], {:unique=&amp;gt;true})
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;   -&amp;gt; 0.0232s
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;== 20210525144427 EnforceUniqueTemplates: migrated (0.0341s) ==================
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#960050;background-color:#1e0010&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;== 20210610131920 RestrictSendmailLocation: migrating =========================
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;== 20210610131920 RestrictSendmailLocation: migrated (0.0016s) ================
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#960050;background-color:#1e0010&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;[root@foreman ~]# sudo foreman-rake db:seed
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;API controllers newer than Apipie cache! Run apipie:cache rake task to regenerate cache.
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;User with login admin already exists, not seeding as admin.
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;As suggested, I also ran &lt;code&gt;apipie:cache&lt;/code&gt; rake task to generate cache.&lt;/p&gt;</description>
    </item>
    <item>
      <title>LVM Device Blah Excluded by Filter</title>
      <link>https://blog.khmersite.net/p/lvm-device-blah-excluded-by-filter/</link>
      <pubDate>Fri, 18 Jun 2021 18:11:44 +1000</pubDate>
      <guid>https://blog.khmersite.net/p/lvm-device-blah-excluded-by-filter/</guid>
      <description>&lt;p&gt;If you use LVM frequently enough, especially when re-using existing disks, you might come a cross a problem when you&amp;rsquo;re unable to create a physical volume from that disk. For example, here is what I encountered today when I tried to create a physical volume on a device called &lt;code&gt;/dev/sdb&lt;/code&gt;.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-console&#34; data-lang=&#34;console&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;[root@db3 ~]# pvcreate /dev/sdb
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  Device /dev/sdb excluded by a filter.
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;I&amp;rsquo;m sure I haven&amp;rsquo;t had any filters in &lt;code&gt;/etc/lvm/lvm.conf&lt;/code&gt;.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Where is which in PowerShell</title>
      <link>https://blog.khmersite.net/p/where-is-which-in-powershell/</link>
      <pubDate>Wed, 16 Jun 2021 16:44:20 +1000</pubDate>
      <guid>https://blog.khmersite.net/p/where-is-which-in-powershell/</guid>
      <description>&lt;p&gt;As the title says, an easy way to find out the path of a program/command on Windows using PowerShell can be done with &lt;code&gt;Get-Command&lt;/code&gt; cmdlet.&lt;/p&gt;
&lt;p&gt;For example, I want to find out where I had installed &lt;code&gt;nvim&lt;/code&gt; (Neovim) on a rarely use Windows machine. To do this, I can execute the following command:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-console&#34; data-lang=&#34;console&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;❯ Gt-Command nvim
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#960050;background-color:#1e0010&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;CommandType     Name                                               Version    Source
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;-----------     ----                                               -------    ------
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Application     nvim.exe                                           0.0.0.0    C:\Program Files\Neovim\bin\nvim.exe
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;With PowerShell, we can also just print a specific attribute (?) of an object.&lt;/p&gt;</description>
    </item>
    <item>
      <title>How to Remove ZFS Meta Data on FreeBSD</title>
      <link>https://blog.khmersite.net/p/how-to-remove-zfs-meta-data-on-freebsd/</link>
      <pubDate>Wed, 26 May 2021 23:02:42 +1000</pubDate>
      <guid>https://blog.khmersite.net/p/how-to-remove-zfs-meta-data-on-freebsd/</guid>
      <description>&lt;p&gt;It&amp;rsquo;s been quite a while since I last posted something here. It&amp;rsquo;s not that I haven&amp;rsquo;t come across many issues in tech, it&amp;rsquo;s just that I haven&amp;rsquo;t had enough time to write anything.&lt;/p&gt;
&lt;p&gt;So I&amp;rsquo;m going to share how to easily clear the ZFS metadata on a disk previously used in a ZFS pool. Here is an example - I have an external drive, and it is detected as &lt;code&gt;/dev/da0&lt;/code&gt; when plugged into a FreeBSD server. Though I don&amp;rsquo;t remember having used it as a member of a ZFS pool called &lt;code&gt;tank&lt;/code&gt;, the following output does show that it is the case:&lt;/p&gt;</description>
    </item>
    <item>
      <title>Vim Replace String 256 with &lt;T_CO&gt;</title>
      <link>https://blog.khmersite.net/p/vim-replace-string-256-with-t_co/</link>
      <pubDate>Sun, 09 May 2021 13:24:54 +1000</pubDate>
      <guid>https://blog.khmersite.net/p/vim-replace-string-256-with-t_co/</guid>
      <description>&lt;p&gt;What was your first text editor when you started using Linux/Unix? Mine was &lt;a href=&#34;https://en.wikipedia.org/wiki/Pico_(text_editor)&#34;&gt;pico&lt;/a&gt;. It was very easy to get started with and quite similar to &lt;code&gt;nano&lt;/code&gt;. Then I moved to &lt;code&gt;emacs&lt;/code&gt; and sticked with it for a long while. Eventually, I&amp;rsquo;ve switched to &lt;code&gt;vim&lt;/code&gt; (or &lt;code&gt;neovim&lt;/code&gt;), and that&amp;rsquo;s what I have been using until now.&lt;/p&gt;
&lt;p&gt;Well, the thing about text editor or may be this also applies to many other things, you&amp;rsquo;re only familiar with features that you constantly use. This means I only know a small subsets of what &lt;code&gt;vim&lt;/code&gt; can do.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Enable a Repo the Ansible Way</title>
      <link>https://blog.khmersite.net/p/enable-a-repo-the-ansible-way/</link>
      <pubDate>Sat, 24 Apr 2021 22:50:37 +1000</pubDate>
      <guid>https://blog.khmersite.net/p/enable-a-repo-the-ansible-way/</guid>
      <description>&lt;p&gt;Recently I need to install a package called &lt;code&gt;Lmod&lt;/code&gt; on a Red Hat 8 server. &lt;code&gt;Lmod&lt;/code&gt; is available from RHEL 8 EPEL8 repository, however it has a dependency called &lt;code&gt;lua-filesystem&lt;/code&gt; which is only available from &lt;code&gt;codeready-builder&lt;/code&gt; repository. On my RHEL 8 server, the &lt;code&gt;codeready-builder&lt;/code&gt; repository is not enabled by default.&lt;/p&gt;
&lt;p&gt;Here is how I&amp;rsquo;ve got &lt;code&gt;Lmod&lt;/code&gt; installed manually:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-console&#34; data-lang=&#34;console&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;# subscription-manager repos --enable codeready-builder-for-rhel-8-x86_64-rpms
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;# dnf install Lmod
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Looking at the above commands, I needed to enable the &lt;code&gt;codeready-builder-for-rhel-8-x86_64-rpms&lt;/code&gt; first before installing &lt;code&gt;Lmod&lt;/code&gt;. The thing is, I&amp;rsquo;m going to forget that &lt;code&gt;Lmod&lt;/code&gt; requires &lt;code&gt;lua-filesystem&lt;/code&gt; which is not available from the same repository as &lt;code&gt;Lmod&lt;/code&gt; unless I write it down somewhere. Or better yet, let&amp;rsquo;s automate it with Ansible!&lt;/p&gt;</description>
    </item>
    <item>
      <title>Looping Through Line in a File in Bash</title>
      <link>https://blog.khmersite.net/p/looping-through-line-in-file-in-bash/</link>
      <pubDate>Sat, 17 Apr 2021 18:39:37 +1000</pubDate>
      <guid>https://blog.khmersite.net/p/looping-through-line-in-file-in-bash/</guid>
      <description>&lt;p&gt;I wanted to install &lt;code&gt;vim&lt;/code&gt; package on FreeBSD 13.0, and did so without realizing that there were over 86 additional dependency packages installed. This was done with &lt;code&gt;pkg install -y vim&lt;/code&gt; command.&lt;/p&gt;
&lt;p&gt;Anyway, I wanted to clean up by removing &lt;code&gt;vim&lt;/code&gt; and those dependencies after all this is a headless server. Removing &lt;code&gt;vim&lt;/code&gt; package doesn&amp;rsquo;t remove the installed dependencies.&lt;/p&gt;
&lt;p&gt;Fortunately, I was able to copy and paste the names of dependency packages and save it to a file. My first thought was to just go through each line in that file and run &lt;code&gt;pkg delete -y PACKAGE&lt;/code&gt;. In the past I needed to do similar thing in a bash script or command to loop through the content of a file per line. Guess what? I no longer remember how to do that. Hence I&amp;rsquo;m writing this post to remind my future self in case I need to do this similar thing again.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Labeling an exFAT Partition File System</title>
      <link>https://blog.khmersite.net/p/labeling-exfat-partition/</link>
      <pubDate>Sat, 10 Apr 2021 23:13:18 +1000</pubDate>
      <guid>https://blog.khmersite.net/p/labeling-exfat-partition/</guid>
      <description>&lt;p&gt;I just formatted an external drive with exFAT file system with the intention to share this drive between Windows/Linux/macOS.&lt;/p&gt;
&lt;p&gt;When the drive is mounted on my Fedora desktop, it shows as:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-console&#34; data-lang=&#34;console&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;/dev/sde1 on /run/media/kenno/E17F-B2B1 type exfat ()(rw,nosuid,nodev,relati...)
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;I want to give it a name, so it&amp;rsquo;ll be mounted as: &lt;code&gt;/run/media/kenno/DRIVE_NAME&lt;/code&gt;.  On Linux system, we can use a tool called &lt;code&gt;exfatlabel&lt;/code&gt; to get or set the exFAT file system. I already created a partition and format it (&lt;code&gt;mkfs.exfat /dev/sde1&lt;/code&gt;) on /dev/sde1 partition.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Work Around for Dracut and LUKS Issue on Pre-release Fedora 34</title>
      <link>https://blog.khmersite.net/p/work-around-for-dracut-luks-issue-on-fedora-34/</link>
      <pubDate>Sat, 10 Apr 2021 00:57:12 +1000</pubDate>
      <guid>https://blog.khmersite.net/p/work-around-for-dracut-luks-issue-on-fedora-34/</guid>
      <description>&lt;p&gt;I&amp;rsquo;ve been running Fedora 34 pre-release version even before it became beta. Everything has been working so far until recently when a package &lt;code&gt;dracut&lt;/code&gt; was updated from 0.58 to 0.58-1. What is &lt;code&gt;dracut&lt;/code&gt;? Good question. It&amp;rsquo;s an initramfs infrastructure used on Fedora system. Find out more from &lt;a href=&#34;https://wiki.gentoo.org/wiki/Dracut&#34;&gt;Dracut&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;The issue that introduced in version 0.58-1 on F34 is that it prevents any machines that use LUKS encryption for root partition to boot. The issue has been reported &lt;a href=&#34;https://bugzilla.redhat.com/show_bug.cgi?id=1945596&#34;&gt;here&lt;/a&gt;. As of today, there is not yet a fixed version of &lt;code&gt;dracut&lt;/code&gt; for F34 yet.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Clean Up Systemd Journal Logs</title>
      <link>https://blog.khmersite.net/p/clean-up-systemd-journal/</link>
      <pubDate>Fri, 26 Mar 2021 19:15:29 +1100</pubDate>
      <guid>https://blog.khmersite.net/p/clean-up-systemd-journal/</guid>
      <description>&lt;p&gt;On my Fedora 33 system, the systemd journal is persistently logged. Over time, the size of the log accumulate quite a lot.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-console&#34; data-lang=&#34;console&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;# du -shx journal/
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;4.2G    journal/
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;I already cleaned up the log twice in the past, but I already forgot how to do it. To fix my short-term memory, I&amp;rsquo;m going to document how I do this by following this blog post &lt;a href=&#34;https://ma.ttias.be/clear-systemd-journal/&#34;&gt;Clear systemd journal&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;The command for cleaning up old logs is &lt;code&gt;journalctl&lt;/code&gt; with the option &lt;code&gt;--vaccume-time=OLDER_THAN_TIME&lt;/code&gt;. To read more about this, we can check the &lt;code&gt;journactl&lt;/code&gt; manual page. (&lt;code&gt;man journalctl&lt;/code&gt; and search for &lt;code&gt;vacuume&lt;/code&gt; key word.)&lt;/p&gt;</description>
    </item>
    <item>
      <title>Create libvirt Virtual Network From an XML File</title>
      <link>https://blog.khmersite.net/p/create-libvirt-virtual-network-from-xml/</link>
      <pubDate>Mon, 22 Mar 2021 14:19:36 +1100</pubDate>
      <guid>https://blog.khmersite.net/p/create-libvirt-virtual-network-from-xml/</guid>
      <description>&lt;p&gt;I have a need to setup a virtual network on a VM-host server. Usually, I just use the &lt;strong&gt;virt-manager&lt;/strong&gt; gui application to create this task. However, I&amp;rsquo;d like to do this via command line this time. Why? Well, why not? It&amp;rsquo;s always fun to learn new thing. :)&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;libvirt&lt;/strong&gt; keeps network configuration in XML files under &lt;code&gt;/etc/libvirt/qemu/networks/&lt;/code&gt;. Here is what I have on one of my machines:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-console&#34; data-lang=&#34;console&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;# ls -1 /etc/libvirt/qemu/networks/*xml
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;/etc/libvirt/qemu/networks/classroom.xml
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;/etc/libvirt/qemu/networks/default.xml
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;/etc/libvirt/qemu/networks/kubernetes.xml
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;/etc/libvirt/qemu/networks/minikube-net.xml
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;/etc/libvirt/qemu/networks/other.xml
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;/etc/libvirt/qemu/networks/storage.xml
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;/etc/libvirt/qemu/networks/student.xml
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;We can use also list all the available libvirt-related virtual networks using &lt;code&gt;virsh&lt;/code&gt; command:&lt;/p&gt;</description>
    </item>
    <item>
      <title>Passed EX403 Satellite 6 Administration</title>
      <link>https://blog.khmersite.net/p/passed-ex403-satellite-6-administration/</link>
      <pubDate>Tue, 09 Mar 2021 00:55:54 +1100</pubDate>
      <guid>https://blog.khmersite.net/p/passed-ex403-satellite-6-administration/</guid>
      <description>&lt;p&gt;Last night I published 4 or 5 of blog posts related to the Foreman/Satellite server. Well, it wasn&amp;rsquo;t a coincidence, it was me cramming the last minute for the Red Hat Satellite 6 Administration exam today. It&amp;rsquo;s also known as EX403.&lt;/p&gt;
&lt;p&gt;Needless to say, I didn&amp;rsquo;t know what was in the exam, and I can&amp;rsquo;t share what was in exam I had taken today. What I can share with you is that I passed EX403!&lt;/p&gt;</description>
    </item>
    <item>
      <title>Foreman: Publishing and Promoting Content Views Using Hammer</title>
      <link>https://blog.khmersite.net/p/foreman-publishing-and-promoting-content-views-using-hammer/</link>
      <pubDate>Sun, 07 Mar 2021 23:46:50 +1100</pubDate>
      <guid>https://blog.khmersite.net/p/foreman-publishing-and-promoting-content-views-using-hammer/</guid>
      <description>&lt;p&gt;In this blog post, I&amp;rsquo;m going to practice publishing and promoting content views using the &lt;code&gt;hammer&lt;/code&gt; CLI. I already know how to do this using the Satellite/Foreman web UI.&lt;/p&gt;
&lt;p&gt;First, I&amp;rsquo;m going to create the &lt;strong&gt;Base&lt;/strong&gt; content view for &lt;strong&gt;Operations&lt;/strong&gt; organization and &lt;strong&gt;Boston&lt;/strong&gt; location.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-console&#34; data-lang=&#34;console&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;[root@foreman ~]# hammer content-view create &lt;span style=&#34;color:#ae81ff&#34;&gt;\
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&amp;gt; --name Base --organization Operations &lt;span style=&#34;color:#ae81ff&#34;&gt;\
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&amp;gt; --description &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#39;Base Packages&amp;#39;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Content view created.
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#960050;background-color:#1e0010&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;[root@foreman ~]# hammer content-view list --organization Operations
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;----------------|---------------------------|--------------------------|-----------|---------------------|---------------
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;CONTENT VIEW ID | NAME                      | LABEL                    | COMPOSITE | LAST PUBLISHED      | REPOSITORY IDS
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;----------------|---------------------------|--------------------------|-----------|---------------------|---------------
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;6               | Base                      | Base                     | false     |                     |
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;----------------|---------------------------|--------------------------|-----------|---------------------|---------------
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;The next step is adding the repos to the content view. I want to add the CentOS 8 BaseOS repo.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Foreman: Creating Software Life-Cycles Using Hammer</title>
      <link>https://blog.khmersite.net/p/foreman-creating-software-life-cycles-using-hammer/</link>
      <pubDate>Sun, 07 Mar 2021 22:33:50 +1100</pubDate>
      <guid>https://blog.khmersite.net/p/foreman-creating-software-life-cycles-using-hammer/</guid>
      <description>&lt;p&gt;In this post, I will create a new life-cycle environment paths for the &lt;strong&gt;Operations&lt;/strong&gt; organization that includes life-cycle environments named Deveopment, QA, and Production.&lt;/p&gt;
&lt;p&gt;Let&amp;rsquo;s list the current life-cycle environment for &lt;strong&gt;Operations&lt;/strong&gt; organization.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-console&#34; data-lang=&#34;console&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;[root@foreman ~]# hammer lifecycle-environment list --organization Operations
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;---|---------|------
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;ID | NAME    | PRIOR
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;---|---------|------
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;6  | Library |
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;---|---------|------
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;When we create our first environment, we&amp;rsquo;ll need to use the ID of the Library, which is 6 in this case. Alternatively, we can just &amp;ldquo;Library&amp;rdquo; as the argument to &lt;code&gt;--prior&lt;/code&gt; option.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Foreman: Creating Product &amp; Repository Using Hammer</title>
      <link>https://blog.khmersite.net/p/foreman-creating-product-repository-using-hammer/</link>
      <pubDate>Sun, 07 Mar 2021 15:21:42 +1100</pubDate>
      <guid>https://blog.khmersite.net/p/foreman-creating-product-repository-using-hammer/</guid>
      <description>&lt;p&gt;In this blog post, I&amp;rsquo;m going to show how to add a new product caled EPEL8 and populate it with a repository from EPEL 8.&lt;/p&gt;
&lt;p&gt;There should be 3 main steps:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Create a &lt;strong&gt;Content-Credentials&lt;/strong&gt; which stores the package signing key of the product or repository&lt;/li&gt;
&lt;li&gt;Create a new &lt;strong&gt;Product&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;Create a new &lt;strong&gt;Repository&lt;/strong&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Firt thing first, let&amp;rsquo;s create a new &lt;strong&gt;content-credentials&lt;/strong&gt; named &lt;code&gt;RPM-GPG-KEY-EPEL-8&lt;/code&gt; with the contents from the EPEL 8&amp;rsquo;s GPG signing key.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Foreman: Creating Organization &amp; Location With Hammer</title>
      <link>https://blog.khmersite.net/p/foreman-creating-organization-location-with-hammer/</link>
      <pubDate>Sun, 07 Mar 2021 14:42:02 +1100</pubDate>
      <guid>https://blog.khmersite.net/p/foreman-creating-organization-location-with-hammer/</guid>
      <description>&lt;p&gt;Let&amp;rsquo;s learn how to create an organization and location on Foreman/Satellite server using the &lt;code&gt;hammer&lt;/code&gt; command-line-interface.&lt;/p&gt;
&lt;p&gt;In this example, I&amp;rsquo;m going to create an organization called: &lt;strong&gt;Operation&lt;/strong&gt; and assign its location to &lt;strong&gt;Boston&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;On the Foreman server, excute the following commands:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-console&#34; data-lang=&#34;console&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;[root@foreman ~]# hammer organization create --name Operations
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Organization created.
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;[root@foreman ~]# hammer location create --name Boston
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Location created.
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;[root@foreman ~]# hammer organization add-location --name Operations &lt;span style=&#34;color:#ae81ff&#34;&gt;\
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&amp;gt; --location Boston
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;The location has been associated.
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Let&amp;rsquo;s verify it:&lt;/p&gt;</description>
    </item>
    <item>
      <title>Enable Foreman Ansible Plugin</title>
      <link>https://blog.khmersite.net/p/enable-foreman-ansible-plugin/</link>
      <pubDate>Sat, 06 Mar 2021 19:55:45 +1100</pubDate>
      <guid>https://blog.khmersite.net/p/enable-foreman-ansible-plugin/</guid>
      <description>&lt;p&gt;When I setup &lt;strong&gt;Foreman&lt;/strong&gt; (Satellite) server, I didn&amp;rsquo;t have Ansible support enabled. Here is how it can be done later on.&lt;/p&gt;
&lt;p&gt;If we only need Ansible support, it&amp;rsquo;s sufficient to just run this command:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-console&#34; data-lang=&#34;console&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;# foreman-installer &lt;span style=&#34;color:#ae81ff&#34;&gt;\
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;--enable-foreman-plugin-ansible \
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;--enable-foreman-proxy-plugin-ansible
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Just a note for myself, I also need Remote Execution enabled if I want to run Ansible playbooks as Job Templates.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-console&#34; data-lang=&#34;console&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;# foreman-installer &lt;span style=&#34;color:#ae81ff&#34;&gt;\
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;--enable-foreman-plugin-remote-execution \
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;--enable-foreman-proxy-plugin-remote-execution-ssh
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Note that the remote execution feature is enabled by default on Foreman/Satellite server. The Smart Proxy or Capsule server, on the other hand, must be specifically enabled with the above installed command.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Learn to Create an RPM Package</title>
      <link>https://blog.khmersite.net/p/learn-to-create-rpm-package/</link>
      <pubDate>Fri, 05 Mar 2021 20:35:14 +1100</pubDate>
      <guid>https://blog.khmersite.net/p/learn-to-create-rpm-package/</guid>
      <description>&lt;p&gt;The steps to build an RPM package:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Download the source code&lt;/li&gt;
&lt;li&gt;Create the spec file (use the &lt;code&gt;rpmdev-newspec&lt;/code&gt; command)&lt;/li&gt;
&lt;li&gt;Build the package (use the &lt;code&gt;rpmbuild&lt;/code&gt; command)&lt;/li&gt;
&lt;li&gt;GPG sign the package (use the &lt;code&gt;rpmsign&lt;/code&gt; command)&lt;/li&gt;
&lt;li&gt;Test the package (use &lt;code&gt;rpm -qip&lt;/code&gt; command)&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;In this post, I&amp;rsquo;m going to learn to create an RPM package of &lt;a href=&#34;https://releases.pagure.org/fpaste/fpaste-0.4.1.1.tar.gz&#34;&gt;fpaste-4.0.1.1.tar.gz&lt;/a&gt; on Red Hat Enterprise Linux 7 (variant).&lt;/p&gt;
&lt;p&gt;First we need to ensure the necessary packages are installed:&lt;/p&gt;</description>
    </item>
    <item>
      <title>Installing Xcode Command Line Tools</title>
      <link>https://blog.khmersite.net/p/installing-xcode-command-line-tools/</link>
      <pubDate>Thu, 25 Feb 2021 23:03:17 +1100</pubDate>
      <guid>https://blog.khmersite.net/p/installing-xcode-command-line-tools/</guid>
      <description>&lt;p&gt;I need to use &lt;code&gt;git&lt;/code&gt; on command line on macOS 11 (Big Sur), and &lt;code&gt;git&lt;/code&gt; comes with command line developer tools. Here is how it can be done on macOS:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-console&#34; data-lang=&#34;console&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;❯ xcode-select --install
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;xcode-select: note: install requested for command line developer tools
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;On a side note, I notice that every time there is an update to Big Sur, I also have to re-install this Xcode Command Line Tools.&lt;/p&gt;
&lt;p&gt;Ref:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;https://gist.github.com/kamermanpr/23bc20180dc277bc8043558f0c22f8a9&#34;&gt;kamermanpr/install-xcodeCLT-homebrew-git.md&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;</description>
    </item>
    <item>
      <title>Setup Proxy for Yum Repository</title>
      <link>https://blog.khmersite.net/p/setup-proxy-for-yum-repo/</link>
      <pubDate>Wed, 17 Feb 2021 15:42:20 +1100</pubDate>
      <guid>https://blog.khmersite.net/p/setup-proxy-for-yum-repo/</guid>
      <description>&lt;p&gt;One of my Red Hat servers is behind proxy with no access to the outside world. This box is registered to a Satellite server to receive software updates.&lt;/p&gt;
&lt;p&gt;I want to install Zabbix server on this server using the packages from Zabbix upstream directly. To do this, I need to set the proxy for the Zabbix&amp;rsquo;s repository. There are a few ways to do this. For my purpose, the best place is to set &lt;code&gt;proxy=proxy_server&lt;/code&gt; directly in the &lt;code&gt;.repo&lt;/code&gt; file.&lt;/p&gt;</description>
    </item>
    <item>
      <title>BIOS Firmware for ThinkPad P1 Gen1 1.33</title>
      <link>https://blog.khmersite.net/p/bios-firmware-for-thinkpad-p1-gen1-1-33/</link>
      <pubDate>Sat, 09 Jan 2021 00:26:45 +1100</pubDate>
      <guid>https://blog.khmersite.net/p/bios-firmware-for-thinkpad-p1-gen1-1-33/</guid>
      <description>&lt;p&gt;Lenovo released the firmeware v1.33 for ThinkPad P1 Gen1 recently which addressed many CVEs.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-console&#34; data-lang=&#34;console&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;CHANGES IN THIS RELEASE
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  Version 1.33
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#960050;background-color:#1e0010&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;[Important updates]
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;- Update includes a security fix.
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;- Addresses CVE-2020-0587, CVE-2020-0588, CVE-2020-0590,
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  CVE-2020-0591, CVE-2020-0592, and CVE-2020-0593.
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  (https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2020-0587)
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  (https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2020-0588)
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  (https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2020-0590)
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  (https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2020-0591)
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  (https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2020-0592)
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  (https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2020-0593)
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#960050;background-color:#1e0010&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;[New functions or enhancements]
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;- Updated the Diagnostics module to version 04.15.000.
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#960050;background-color:#1e0010&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;[Problem fixes]
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;- Nothing
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;It&amp;rsquo;s worth noting that this 1.33 version is not yet available via &lt;code&gt;fwupdmgr&lt;/code&gt;. So to update it, just download the firmeware zip file from Lenovo website. Then, manually install it. There are 2 files in the zip, and I only need to install 1 of them.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Create a Client Certificate Key for CockroachDB</title>
      <link>https://blog.khmersite.net/p/create-a-client-certificate-key-for-cockroachdb/</link>
      <pubDate>Mon, 28 Dec 2020 23:39:57 +1100</pubDate>
      <guid>https://blog.khmersite.net/p/create-a-client-certificate-key-for-cockroachdb/</guid>
      <description>&lt;p&gt;CockroachDB has been on my to-check-out list for a very long time. So during this break, I want to spend sometimes to get familiar with it. Who know, maybe it be also be used at work.&lt;/p&gt;
&lt;p&gt;I&amp;rsquo;m checking it out their &lt;a href=&#34;https://www.cockroachlabs.com/docs/v20.2/build-a-rust-app-with-cockroachdb.html&#34;&gt;Rust sample program&lt;/a&gt;. In that program, the user&amp;rsquo;s credential used to connect to the database is done with certificate. So, I need to know how to do generate a user (or also known as client) certificate and key.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Build Hugo Extended for Linux ARM</title>
      <link>https://blog.khmersite.net/p/build-hugo-extended-for-linux-arm/</link>
      <pubDate>Sun, 27 Dec 2020 15:54:32 +1100</pubDate>
      <guid>https://blog.khmersite.net/p/build-hugo-extended-for-linux-arm/</guid>
      <description>&lt;p&gt;As of today, there is no official build for Hugo extended for Linux ARM. Therefore, we need to build it ourselves.&lt;/p&gt;
&lt;p&gt;Prerequisite:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;build-essential&lt;/code&gt; package&lt;/li&gt;
&lt;li&gt;&lt;code&gt;go1.15.3.linux-arm64&lt;/code&gt; compiler&lt;/li&gt;
&lt;/ul&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-console&#34; data-lang=&#34;console&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;export VERSION=0.79.1
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;curl -O -L https://github.com/gohugoio/hugo/archive/v$VERSION.tar.gz
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;tar -xzf v$VERSION.tar.gz
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;cd hugo-$VERSION
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;go build --tags extended
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;sudo cp hugo /usr/local/bin
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Hugo Static Site Generator v0.79.1/extended linux/arm64 BuildDate: unknown
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;I built Hugo on Odroid C2, and it took over 10 minutes. I think a better way is to cross build Hugo on an x64 machine; but I haven&amp;rsquo;t tried it yet.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Upgrading oVirt Manager</title>
      <link>https://blog.khmersite.net/p/upgrading-ovirt-manager/</link>
      <pubDate>Sat, 26 Dec 2020 20:48:29 +1100</pubDate>
      <guid>https://blog.khmersite.net/p/upgrading-ovirt-manager/</guid>
      <description>&lt;p&gt;This upgrade applies to the self-hosted engine of oVirt Manager.&lt;/p&gt;
&lt;p&gt;We need to first put the oVirt environment to the global maintenance mode.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-console&#34; data-lang=&#34;console&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;[root@trex ~]# hosted-engine --set-maintenance --mode&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;global
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;To check the availability of oVirt Manager, run &lt;strong&gt;engine-upgrade-check&lt;/strong&gt; command on the oVirt Manager machine.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-console&#34; data-lang=&#34;console&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;[root@ovirtm ~]# engine-upgrade-check
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;...omitted...
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;VERB: Queue package ovirt-engine-setup for update
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;VERB: Building transaction
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;VERB: Transaction built
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;VERB: Transaction Summary:
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;VERB:     install   : ovirt-engine-setup-plugin-cinderlib-4.4.4.5-1.el8.noarch
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;VERB:     install   : ovirt-engine-setup-base-4.4.4.5-1.el8.noarch
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;VERB:     install   : ovirt-engine-setup-4.4.4.5-1.el8.noarch
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;VERB:     install   : ovirt-engine-setup-plugin-websocket-proxy-4.4.4.5-1.el8.noarch
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;VERB:     install   : ovirt-engine-setup-plugin-vmconsole-proxy-helper-4.4.4.5-1.el8.noarch
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;VERB:     install   : ovirt-engine-setup-plugin-ovirt-engine-common-4.4.4.5-1.el8.noarch
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;VERB:     install   : ovirt-engine-setup-plugin-ovirt-engine-4.4.4.5-1.el8.noarch
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;VERB:     install   : python3-ovirt-engine-lib-4.4.4.5-1.el8.noarch
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;VERB:     install   : ovirt-engine-setup-plugin-imageio-4.4.4.5-1.el8.noarch
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;VERB:     remove    : python3-ovirt-engine-lib-4.4.3.12-1.el8.noarch
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;VERB:     remove    : ovirt-engine-setup-4.4.3.12-1.el8.noarch
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;VERB:     remove    : ovirt-engine-setup-base-4.4.3.12-1.el8.noarch
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;VERB:     remove    : ovirt-engine-setup-plugin-cinderlib-4.4.3.12-1.el8.noarch
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;VERB:     remove    : ovirt-engine-setup-plugin-imageio-4.4.3.12-1.el8.noarch
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;VERB:     remove    : ovirt-engine-setup-plugin-ovirt-engine-4.4.3.12-1.el8.noarch
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;VERB:     remove    : ovirt-engine-setup-plugin-ovirt-engine-common-4.4.3.12-1.el8.noarch
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;VERB:     remove    : ovirt-engine-setup-plugin-vmconsole-proxy-helper-4.4.3.12-1.el8.noarch
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;VERB:     remove    : ovirt-engine-setup-plugin-websocket-proxy-4.4.3.12-1.el8.noarch
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;VERB: Closing transaction with commit
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Upgrade available.
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;To update the setup packages, issue the &lt;strong&gt;dnf update ovirt*setup*&lt;/strong&gt; command.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Configure oVirt Manager to Authenticate Against FreeIPA</title>
      <link>https://blog.khmersite.net/p/configure-ovirt-manager-to-authenticate-against-ipa/</link>
      <pubDate>Sat, 26 Dec 2020 00:08:02 +1100</pubDate>
      <guid>https://blog.khmersite.net/p/configure-ovirt-manager-to-authenticate-against-ipa/</guid>
      <description>&lt;p&gt;This is quick note on how to configure an oVirt Manager or RHV Manager to use the FreeIPA to provide user external authentication.&lt;/p&gt;
&lt;p&gt;Here&amp;rsquo;s my servers&amp;rsquo; information:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;IPA server: ipa.angkorian.io (CentOS 8.3.2011)&lt;/li&gt;
&lt;li&gt;oVirt Hosted-Engine: ovirtm.angkorian.io (CentOS 8.3.2011)&lt;/li&gt;
&lt;li&gt;IPA user: ovirtadmin&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;First, open SSH connection to &lt;strong&gt;ovirtm&lt;/strong&gt; as root and ensure that &lt;strong&gt;ovirt-engine-extension-aaa-ldap-setup&lt;/strong&gt; package is installed. Here is a tip to figure out the name of this package - I&amp;rsquo;d search for &lt;strong&gt;ovirt*ldap&lt;/strong&gt;.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Backing Up a Self Hosted Engine Ovirt</title>
      <link>https://blog.khmersite.net/p/backing-up-a-self-hosted-engine-ovirt/</link>
      <pubDate>Wed, 23 Dec 2020 23:30:14 +1100</pubDate>
      <guid>https://blog.khmersite.net/p/backing-up-a-self-hosted-engine-ovirt/</guid>
      <description>&lt;p&gt;We can create a fullback of oVirt engine without stopping the oVirt infrastructure using the &lt;strong&gt;ovirt-backup&lt;/strong&gt; command.&lt;/p&gt;
&lt;p&gt;To do this, ssh to the oVirt hosted-engine and specify this backup scope, the name of backup file and the name of the log file.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-console&#34; data-lang=&#34;console&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;[root@ovirtm ~]# engine-backup --scope&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;all --mode&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;backup --file&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;ovirtm-backup_20201223.tgz --log&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;backup_20201223.log
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Start of engine-backup with mode &amp;#39;backup&amp;#39;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;scope: all
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;archive file: ovirtm-backup_20201223.tgz
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;log file: backup_20201223.log
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Backing up:
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Notifying engine
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;- Files
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;- Engine database &amp;#39;engine&amp;#39;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;- DWH database &amp;#39;ovirt_engine_history&amp;#39;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Packing into file &amp;#39;ovirtm-backup_20201223.tgz&amp;#39;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Notifying engine
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Done.
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;There is more in-depth explanation on how to do the backup of hosted-engine available at &lt;a href=&#34;https://access.redhat.com/documentation/en-us/red_hat_virtualization/4.2/html/self-hosted_engine_guide/backing_up_and_restoring_a_self-hosted_engine&#34;&gt;Red Hat Customer Portal&lt;/a&gt;.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Line Continuation in PowerShell</title>
      <link>https://blog.khmersite.net/p/line-continuation-in-powershell/</link>
      <pubDate>Wed, 23 Dec 2020 01:41:26 +1100</pubDate>
      <guid>https://blog.khmersite.net/p/line-continuation-in-powershell/</guid>
      <description>&lt;p&gt;Usually on bash command-line, the line break character is &lt;code&gt;\&lt;/code&gt;. So when I first started to use PowerShell, the &lt;code&gt;\&lt;/code&gt; didn&amp;rsquo;t work for me. It turned out that the line-break or line continuation in PowerShell is the back tick: `.&lt;/p&gt;
&lt;p&gt;Here is an exmaple of PowerShell command to create a DNS delegation in one line:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-console&#34; data-lang=&#34;console&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;PS C:\ Add-DnsServerZoneDelegation -Name &amp;#34;example.net&amp;#34; -ChildZoneName &amp;#34;lab.example.net.&amp;#34; -NameServer &amp;#34;idm.lab.example.net.&amp;#34; -IPAddress 172.25.250.8 -PassThru -Verbose
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;And we can break it to mutiple line as:&lt;/p&gt;</description>
    </item>
    <item>
      <title>Auto Connect to Hidden Wifi With Networkmanger</title>
      <link>https://blog.khmersite.net/p/auto-connect-to-hidden-wifi-with-networkmanger/</link>
      <pubDate>Mon, 21 Dec 2020 22:00:21 +1100</pubDate>
      <guid>https://blog.khmersite.net/p/auto-connect-to-hidden-wifi-with-networkmanger/</guid>
      <description>&lt;p&gt;If you&amp;rsquo;re here to find out how to setup network connection to hidden wifi access point, you might want to check this post: &lt;a href=&#34;2019/01/how-to-connect-to-hidden-wifi-using-nmcli/&#34;&gt;How to Connect to Hidden Wifi Using nmcli&lt;/a&gt; instead.&lt;/p&gt;
&lt;p&gt;This post documents how I fix an issue of wifi connection on a laptop running Gentoo to a hidden access point. The problem is that the wifi connection doesn&amp;rsquo;t automatically connect despite I&amp;rsquo;ve set the &lt;code&gt;autoconnect.connection yes&lt;/code&gt;.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-console&#34; data-lang=&#34;console&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;❯ nmcli con show CamBlue | grep -i autoconnect
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;connection.autoconnect:                 yes
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;connection.autoconnect-priority:        0
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;connection.autoconnect-retries:         -1 (default)
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;connection.autoconnect-slaves:          -1 (default)
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;I don&amp;rsquo;t remember having done anything special on the Fedora laptops connecting to the same the network; and this problem didn&amp;rsquo;t exit on any of those Fedora machines at all.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Systemd List Failed Units and Services</title>
      <link>https://blog.khmersite.net/p/systemd-list-failed-units-and-services/</link>
      <pubDate>Tue, 15 Dec 2020 16:49:08 +1100</pubDate>
      <guid>https://blog.khmersite.net/p/systemd-list-failed-units-and-services/</guid>
      <description>&lt;p&gt;This is a quick note to list failed services on systemd system.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-console&#34; data-lang=&#34;console&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;[root@zilla ~]# systemctl status
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;● zilla
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    State: degraded
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;     Jobs: 0 queued
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;   Failed: 1 units
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    Since: Fri 2020-09-04 02:20:47 AEST; 3 months 11 days ago
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;   CGroup: /
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;           ├─1 /usr/lib/systemd/systemd --system --deserialize 22
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;           └─system.slice
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;             ├─httpd.service
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;             │ ├─21860 /usr/sbin/httpd -DFOREGROUND
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;             │ ├─21861 /usr/sbin/httpd -DFOREGROUND
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;             │ ├─21862 /usr/sbin/httpd -DFOREGROUND
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;             │ ├─21863 /usr/sbin/httpd -DFOREGROUND
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;             │ ├─21864 /usr/sbin/httpd -DFOREGROUND
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;             │ └─21865 /usr/sbin/httpd -DFOREGROUND
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;...
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-console&#34; data-lang=&#34;console&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;[root@zilla ~]# systemctl list-units --failed
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  UNIT         LOAD   ACTIVE SUB    DESCRIPTION
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;● ipmi.service loaded failed failed IPMI Driver
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#960050;background-color:#1e0010&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;LOAD   = Reflects whether the unit definition was properly loaded.
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;ACTIVE = The high-level unit activation state, i.e. generalization of SUB.
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;SUB    = The low-level unit activation state, values depend on unit type.
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#960050;background-color:#1e0010&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;1 loaded units listed. Pass --all to see loaded but inactive units, too.
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;To show all installed unit files use &amp;#39;systemctl list-unit-files&amp;#39;.
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Or&lt;/p&gt;</description>
    </item>
    <item>
      <title>oVirt - Removing a Storage Domain</title>
      <link>https://blog.khmersite.net/p/ovirt-removing-a-storage-domain/</link>
      <pubDate>Mon, 14 Dec 2020 00:18:57 +1100</pubDate>
      <guid>https://blog.khmersite.net/p/ovirt-removing-a-storage-domain/</guid>
      <description>&lt;p&gt;&lt;img loading=&#34;lazy&#34; src=&#34;https://blog.khmersite.net/wp-content/uploads/2020/12/ovirt_strage_domain_removal.png&#34;&gt;&lt;/p&gt;
&lt;p&gt;This note is, again, for me to remind myself in case I couldn&amp;rsquo;t recall how to do this in the future.&lt;/p&gt;
&lt;p&gt;To remove a storage domain from the cluster, use the following steps:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Click &lt;strong&gt;Storage&lt;/strong&gt; -&amp;gt; &lt;strong&gt;Domains&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;Click on the name of the storage domain to open the details view&lt;/li&gt;
&lt;li&gt;Click on the &lt;strong&gt;Data Center&lt;/strong&gt; tab&lt;/li&gt;
&lt;li&gt;Click on &lt;strong&gt;Maintenance&lt;/strong&gt; button, then click on &lt;strong&gt;OK&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;The &lt;strong&gt;Detach&lt;/strong&gt; button becomes active, click on it.&lt;/li&gt;
&lt;li&gt;Click on &lt;strong&gt;Remove&lt;/strong&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Reference:&lt;/p&gt;</description>
    </item>
    <item>
      <title>Crontab Tip</title>
      <link>https://blog.khmersite.net/p/crontab-tip/</link>
      <pubDate>Sun, 13 Dec 2020 23:01:32 +1100</pubDate>
      <guid>https://blog.khmersite.net/p/crontab-tip/</guid>
      <description>&lt;p&gt;On Fedora based system, whenever I need help writing a cron task and confused which field is minute, hour, day,..etc, I usually check the &lt;strong&gt;/etc/crontab&lt;/strong&gt; file.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-console&#34; data-lang=&#34;console&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;❯ cat /etc/crontab 
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;SHELL=/bin/bash
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;PATH=/sbin:/bin:/usr/sbin:/usr/bin
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;MAILTO=root
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#960050;background-color:#1e0010&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;# For details see man &lt;span style=&#34;color:#ae81ff&#34;&gt;4&lt;/span&gt; crontabs
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#960050;background-color:#1e0010&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;# Example of job definition:
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;# .---------------- minute &lt;span style=&#34;color:#f92672&#34;&gt;(&lt;/span&gt;&lt;span style=&#34;color:#ae81ff&#34;&gt;0&lt;/span&gt; - 59&lt;span style=&#34;color:#f92672&#34;&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;# |  .------------- hour &lt;span style=&#34;color:#f92672&#34;&gt;(&lt;/span&gt;&lt;span style=&#34;color:#ae81ff&#34;&gt;0&lt;/span&gt; - 23&lt;span style=&#34;color:#f92672&#34;&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;# |  |  .---------- day of month &lt;span style=&#34;color:#f92672&#34;&gt;(&lt;/span&gt;&lt;span style=&#34;color:#ae81ff&#34;&gt;1&lt;/span&gt; - 31&lt;span style=&#34;color:#f92672&#34;&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;# |  |  |  .------- month &lt;span style=&#34;color:#f92672&#34;&gt;(&lt;/span&gt;&lt;span style=&#34;color:#ae81ff&#34;&gt;1&lt;/span&gt; - 12&lt;span style=&#34;color:#f92672&#34;&gt;)&lt;/span&gt; OR jan,feb,mar,apr ...
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;# |  |  |  |  .---- day of week &lt;span style=&#34;color:#f92672&#34;&gt;(&lt;/span&gt;&lt;span style=&#34;color:#ae81ff&#34;&gt;0&lt;/span&gt; - 6&lt;span style=&#34;color:#f92672&#34;&gt;)&lt;/span&gt; &lt;span style=&#34;color:#f92672&#34;&gt;(&lt;/span&gt;Sunday&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;&lt;span style=&#34;color:#ae81ff&#34;&gt;0&lt;/span&gt; or 7&lt;span style=&#34;color:#f92672&#34;&gt;)&lt;/span&gt; OR sun,mon,tue,wed,thu,fri,sat
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;# |  |  |  |  |
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;# *  *  *  *  * user-name  command to be executed
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Recently, I found an online cron scheduler editor - &lt;a href=&#34;https://crontab.guru/&#34;&gt;crontab.guru&lt;/a&gt;. It can be used to create a new task expression, or we can use it to verify the existing cron schedule expressions that we have.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Passed Red Hat Virtualization Exam EX318</title>
      <link>https://blog.khmersite.net/p/passed-red-hat-virtualization-exam-ex318/</link>
      <pubDate>Wed, 09 Dec 2020 14:32:35 +1100</pubDate>
      <guid>https://blog.khmersite.net/p/passed-red-hat-virtualization-exam-ex318/</guid>
      <description>&lt;p&gt;Another month, another Red Hat exam has been ticked off the list. This time, it&amp;rsquo;s about the Red Hat Virtualization, a technology based on oVirt.&lt;/p&gt;
&lt;p&gt;The code name of the exam is EX318, and as rumours has it, it&amp;rsquo;s one of the easiest Red Hat exams; I can&amp;rsquo;t agree more. The exam&amp;rsquo;s duration is 3 hours; it&amp;rsquo;s a hand-on closed book exams. The exam is based on Red Hat Virtualization version 4.3.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Update Firmware on Netcom NF18ACV to NC2-R6B021</title>
      <link>https://blog.khmersite.net/p/update-firmware-on-netcom-nf18acv/</link>
      <pubDate>Sat, 05 Dec 2020 11:28:12 +1100</pubDate>
      <guid>https://blog.khmersite.net/p/update-firmware-on-netcom-nf18acv/</guid>
      <description>&lt;p&gt;I like to keep the firmware running on all my devices up to date. New firmware is released to do to main things: fixing bugs and feature enhancing.&lt;/p&gt;
&lt;p&gt;Today, I just found out that the modem/router provided by my ISP is running and out of date firmware. The installed firmware is &lt;strong&gt;NF18ACV.NC.AU-R6B016.EN&lt;/strong&gt; released on 2018/05/14. There have been a few new versions of firmware released between then and now, with the latest version being: &lt;strong&gt;NC2-R6B021&lt;/strong&gt; released on 2020/11/26.&lt;/p&gt;</description>
    </item>
    <item>
      <title>FreeIPA - Adding New User</title>
      <link>https://blog.khmersite.net/p/freeipa-adding-new-user/</link>
      <pubDate>Fri, 04 Dec 2020 23:08:43 +1100</pubDate>
      <guid>https://blog.khmersite.net/p/freeipa-adding-new-user/</guid>
      <description>&lt;p&gt;I have a FreeIPA server with the following information:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;FreeIPA server: &lt;code&gt;utility.lab.example.com&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;FreeIPA realm: &lt;code&gt;LAB.EXAMPLE.COM&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;FreeIPA domain: &lt;code&gt;lab.example.com&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;I want to add 2 normal users:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;User Login: rhvadmin, First Name: RHV, Last Name: Admin, Password: CentOS123^&lt;/li&gt;
&lt;li&gt;User Login: normaluser, First Name: Normal, Last Name: User, Password: CentOS123^&lt;/li&gt;
&lt;/ol&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-console&#34; data-lang=&#34;console&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#960050;background-color:#1e0010&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;[root@utility ~]# ipa user-add rhvadmin --first RHV --last Admin --password
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Password: CentOS123^
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Enter Password again to verify: CentOS123^
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;---------------------
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Added user &amp;#34;rhvadmin&amp;#34;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;---------------------
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  User login: rhvadmin
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  First name: RHV
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  Last name: Admin
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  Full name: RHV Admin
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  Display name: RHV Admin
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  Initials: RA
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  Home directory: /home/rhvadmin
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  GECOS: RHV Admin
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  Login shell: /bin/sh
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  Principal name: rhvadmin@LAB.EXAMPLE.COM
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  Principal alias: rhvadmin@LAB.EXAMPLE.COM
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  User password expiration: 20201204121711Z
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  Email address: rhvadmin@lab.example.com
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  UID: 1829600001
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  GID: 1829600001
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  Password: True
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  Member of groups: ipausers
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  Kerberos keys available: True
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#960050;background-color:#1e0010&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;[root@utility ~]# ipa user-add normaluser &lt;span style=&#34;color:#ae81ff&#34;&gt;\
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&amp;gt; --first Normal --last User --password
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Password: CentOS123^
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Enter Password again to verify: CentOS123^
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;...
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;The &lt;strong&gt;rhvadmin&lt;/strong&gt; will be asked to change the password on its first login. To prevent this from happening, we can change the user&amp;rsquo;s password with &lt;strong&gt;kpasswd&lt;/strong&gt; util.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Attaching a Disk to KVM Guest on Command Line</title>
      <link>https://blog.khmersite.net/p/attaching-disk-to-kvm-guest-on-command-line/</link>
      <pubDate>Wed, 02 Dec 2020 13:44:08 +1100</pubDate>
      <guid>https://blog.khmersite.net/p/attaching-disk-to-kvm-guest-on-command-line/</guid>
      <description>&lt;p&gt;Again, just a quick note to remind myself how to attach a disk to a VM guest from the command line.&lt;/p&gt;
&lt;p&gt;The following steps is based on these assumptions:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;A spare disk: an LVM volume name &lt;strong&gt;db2_data&lt;/strong&gt; on &lt;strong&gt;data&lt;/strong&gt; volume group&lt;/li&gt;
&lt;li&gt;The name/domain of the VM is &lt;strong&gt;db2&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;List the name of the VM guest and available logical volume.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-console&#34; data-lang=&#34;console&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;[root@mathvm5 ~]# virsh list | grep db2
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; 20    db2                            running
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;[root@mathvm5 ~]# lvs | grep db2
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  db2                     vm  -wi-ao----  80.00g
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  db2_data                vm  -wi-a----- 128.00g
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Run &lt;strong&gt;virsh attach-disk&lt;/strong&gt; command to attach a disk to a VM. Notice that &lt;strong&gt;&amp;ndash;persistent&lt;/strong&gt; option is passed to the command so that this new disk will be permanently attached to the VM.&lt;/p&gt;</description>
    </item>
    <item>
      <title>FreeIPA - Adding New DNS Record</title>
      <link>https://blog.khmersite.net/p/freeipa-adding-new-dns-record/</link>
      <pubDate>Tue, 01 Dec 2020 20:15:00 +1100</pubDate>
      <guid>https://blog.khmersite.net/p/freeipa-adding-new-dns-record/</guid>
      <description>&lt;p&gt;I have a FreeIPA server with the following information.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;FreeIPA server: utility.lab.example.com&lt;/li&gt;
&lt;li&gt;FreeIPA realm: LAB.EXAMPLE.COM&lt;/li&gt;
&lt;li&gt;FreeIPA domain: lab.example.com.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;I want to insert a few DNS records:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;hosta.lab.example.com - 172.25.250.10&lt;/li&gt;
&lt;li&gt;hostb.lab.example.com - 172.25.250.11&lt;/li&gt;
&lt;li&gt;hostc.lab.example.com - 172.25.250.12&lt;/li&gt;
&lt;li&gt;hostd.lab.example.com - 172.25.250.13&lt;/li&gt;
&lt;li&gt;bastion.lab.example.com - 172.25.250.254&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;And I&amp;rsquo;d like to use the command line to do this.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Acquire the admin&amp;rsquo;s Kerberos ticket.&lt;/li&gt;
&lt;/ol&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-console&#34; data-lang=&#34;console&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;[root@utility ~]# kinit admin
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Password for admin@LAB.EXAMPLE.COM:
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;ol&gt;
&lt;li&gt;List the DNS zones.&lt;/li&gt;
&lt;/ol&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-console&#34; data-lang=&#34;console&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;[root@utility ~]# ipa dnszone-find
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  Zone name: 250.25.172.in-addr.arpa.
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  Active zone: TRUE
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  Authoritative nameserver: utility.lab.example.com.
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  Administrator e-mail address: hostmaster.lab.example.com.
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  SOA serial: 1606798502
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  SOA refresh: 3600
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  SOA retry: 900
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  SOA expire: 1209600
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  SOA minimum: 3600
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  Allow query: any;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  Allow transfer: none;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#960050;background-color:#1e0010&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  Zone name: lab.example.com.
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  Active zone: TRUE
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  Authoritative nameserver: utility.lab.example.com.
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  Administrator e-mail address: hostmaster.lab.example.com.
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  SOA serial: 1606798523
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  SOA refresh: 3600
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  SOA retry: 900
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  SOA expire: 1209600
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  SOA minimum: 3600
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  Allow query: any;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  Allow transfer: none;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;----------------------------
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Number of entries returned 2
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;----------------------------
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;ol&gt;
&lt;li&gt;Find DNS record whose name contains &amp;ldquo;hosta&amp;rdquo; (e.g. hosta.lab.example.com)&lt;/li&gt;
&lt;/ol&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-console&#34; data-lang=&#34;console&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;[root@utility ~]# ipa dnsrecord-find lab.example.com. --name hosta
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;----------------------------
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Number of entries returned 0
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;----------------------------
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;ol&gt;
&lt;li&gt;Add a record name &lt;strong&gt;hosta.lab.example.com&lt;/strong&gt; with IP 172.25.250.10.&lt;/li&gt;
&lt;/ol&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-console&#34; data-lang=&#34;console&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;[root@utility ~]# ipa dnsrecord-add lab.example.com. &lt;span style=&#34;color:#ae81ff&#34;&gt;\
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&amp;gt; hosta &lt;span style=&#34;color:#ae81ff&#34;&gt;\
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&amp;gt; --a-rec 172.25.250.10
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  Record name: hosta
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  A record: 172.25.250.10
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#960050;background-color:#1e0010&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;[root@utility ~]# ipa dnsrecord-find lab.example.com. --name hosta
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  Record name: hosta
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  A record: 172.25.250.10
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;----------------------------
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Number of entries returned 1
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;----------------------------
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;ol&gt;
&lt;li&gt;Repeat the above steps for &lt;strong&gt;hostb&lt;/strong&gt;, &lt;strong&gt;hostc&lt;/strong&gt;, and &lt;strong&gt;hostd&lt;/strong&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-console&#34; data-lang=&#34;console&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;[root@utility ~]# ipa dnsrecord-add lab.example.com. hostb --a-rec 172.25.250.11
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  Record name: hostb
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  A record: 172.25.250.11
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;[root@utility ~]# ipa dnsrecord-add lab.example.com. hostc --a-rec 172.25.250.12
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  Record name: hostc
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  A record: 172.25.250.12
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;[root@utility ~]# ipa dnsrecord-add lab.example.com. hostd --a-rec 172.25.250.13
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  Record name: hostd
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  A record: 172.25.250.13
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;ol&gt;
&lt;li&gt;Add a record name &lt;strong&gt;bastion.lab.example.com&lt;/strong&gt; with IP 172.25.250.254&lt;/li&gt;
&lt;/ol&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-console&#34; data-lang=&#34;console&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;[root@utility ~]# ipa dnsrecord-add lab.example.com. bastion --a-rec 172.25.250.254
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  Record name: bastion
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  A record: 172.25.250.254
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;I just realized that all my DNS records do not have reverse records created for them. There are 2 ways to achieve this. First is to create a PTR records for each record above. The second option is to delete the existing record, and create a new one with PTR record created automatically.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Dell Latitude 7400 System BIOS 1.11.1</title>
      <link>https://blog.khmersite.net/p/dell-latitude-7400-system-bios-1-11-1/</link>
      <pubDate>Sat, 28 Nov 2020 20:59:08 +1100</pubDate>
      <guid>https://blog.khmersite.net/p/dell-latitude-7400-system-bios-1-11-1/</guid>
      <description>&lt;p&gt;Dell just released a new BIOS firmware of the Latitude 7400 series. This firmware was released on 23 Nov 2020.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Fixes:&lt;/em&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Modified the default settings of the Intel Rapid Storage Technology driver.&lt;/li&gt;
&lt;li&gt;Firmware updates to address the Intel Technical Advisory INTEL-TA-00391 (CVE-2020-8753, CVE-2020-8745, CVE-2020-8705, CVE-2020-8757, CVE-2020-8756, CVE-2020-8760, CVE-2020-8751, CVE-2020-8754, CVE-2020-8747, CVE-2020-8746, CVE-2020-8749 CVE-2020-8752, CVE-2020-12303, CVE-2020-12355, and CVE-2020-12356).&lt;/li&gt;
&lt;li&gt;Firmware updates to address the Intel Security Advisory INTEL-SA-00358 (CVE-2020-0587, CVE-2020-0591, CVE-2020-0592, and CVE-2020-0593).&lt;/li&gt;
&lt;li&gt;Firmware updates to address the Intel Security Advisory INTEL-SA-00381 (CVE-2020-8696 and CVE-2020-8698).&lt;/li&gt;
&lt;li&gt;Firmware updates to address the Intel Security Advisory INTEL-SA-00389 (CVE-2020-8694 and CVE-2020-8695).&lt;/li&gt;
&lt;li&gt;Firmware update to address CVE-2020-26189.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;em&gt;Enhancements:&lt;/em&gt;&lt;/p&gt;</description>
    </item>
    <item>
      <title>Configure iSCSI Target on CentOS 8</title>
      <link>https://blog.khmersite.net/p/configure-iscsi-target-on-centos8/</link>
      <pubDate>Wed, 25 Nov 2020 19:04:38 +1100</pubDate>
      <guid>https://blog.khmersite.net/p/configure-iscsi-target-on-centos8/</guid>
      <description>&lt;p&gt;I need to have an iSCSI storage to be used by my oVirt lab. The last time I had to create an iSCSI target was during the preparation of the RHCE 7 exam. Therefore, I think this is an opportunity to practice doing this again.&lt;/p&gt;
&lt;p&gt;First, install the required package. Then enable the &lt;strong&gt;target&lt;/strong&gt; service, otherwise the target won&amp;rsquo;t work on the next reboot.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-console&#34; data-lang=&#34;console&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;[root@utility ~]# dnf install targetcli -y
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#960050;background-color:#1e0010&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;[root@utility ~]# systemctl enable target
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Run the &lt;strong&gt;targetcli&lt;/strong&gt; command to create an iSCSI target/storage using the storage block (&lt;strong&gt;/dev/mapper/data_iscsi&lt;/strong&gt; LVM volume).&lt;/p&gt;</description>
    </item>
    <item>
      <title>Installing FreeIPA on CentOS 8</title>
      <link>https://blog.khmersite.net/p/installing-freeipa-on-centos-8/</link>
      <pubDate>Tue, 24 Nov 2020 00:21:10 +1100</pubDate>
      <guid>https://blog.khmersite.net/p/installing-freeipa-on-centos-8/</guid>
      <description>&lt;p&gt;This is my note about installing FreeIPA on a CentOS 8 machine. It&amp;rsquo;s a bit different from the FreeIPA&amp;rsquo;s installation on CentOS 7, and most importantly there was a problem I came across during the installation and how to fix it.&lt;/p&gt;
&lt;h2 id=&#34;configure-static-ip&#34;&gt;Configure Static IP&lt;/h2&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-console&#34; data-lang=&#34;console&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;[root@utility ~]# nmcli con mod enp1s0 ipv4.addresses 172.25.250.8/24 &lt;span style=&#34;color:#ae81ff&#34;&gt;\
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&amp;gt; ipv4.method manual &lt;span style=&#34;color:#ae81ff&#34;&gt;\
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&amp;gt; ipv4.gateway 172.25.250.254 &lt;span style=&#34;color:#ae81ff&#34;&gt;\
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&amp;gt; ipv4.dns 172.25.252.1 &lt;span style=&#34;color:#ae81ff&#34;&gt;\
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&amp;gt; connection.autoconnect yes
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;[root@utility ~]# nmcli con up enp1s0
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Ensure the hostname of this server exists in &lt;strong&gt;/etc/hosts&lt;/strong&gt;.&lt;/p&gt;</description>
    </item>
    <item>
      <title>How to Expand QCOW2</title>
      <link>https://blog.khmersite.net/p/how-to-expand-qcow2/</link>
      <pubDate>Sun, 22 Nov 2020 17:07:50 +1100</pubDate>
      <guid>https://blog.khmersite.net/p/how-to-expand-qcow2/</guid>
      <description>&lt;p&gt;Today, one of my VMs needs to have its disk increased. I&amp;rsquo;m using qcow2 as the VM&amp;rsquo;s storage. Here is one way to expand the storage that it&amp;rsquo;s been proven to work very well for me.&lt;/p&gt;
&lt;p&gt;I already increased this VM&amp;rsquo;s disk to 30GiB once already, but it wasn&amp;rsquo;t enough. So here, let&amp;rsquo;s explode it to 50GiB. The name of the qcow2 file is &lt;code&gt;hosta.qcow2&lt;/code&gt;. A friendly reminder that you should alway shave a backup before you perform any critical change such as this one. (I use ZFS, so all I had to do was snapshoting this whole dataset.)&lt;/p&gt;</description>
    </item>
    <item>
      <title>DNS Delegation on Windows Server</title>
      <link>https://blog.khmersite.net/p/dns-delegation-on-windows-server/</link>
      <pubDate>Thu, 19 Nov 2020 23:29:44 +1100</pubDate>
      <guid>https://blog.khmersite.net/p/dns-delegation-on-windows-server/</guid>
      <description>&lt;p&gt;One of the requirements to join an Identity Management Server (IdM) to an Active Directory (AD), a DNS delegation needs to be created on AD. With the Red Hat training for RH362, we were taught to use a command-line interface program called &lt;strong&gt;dnscmd&lt;/strong&gt; on AD server. I personally found this command very cumbersome, and I think a better way is to do this DNS delegation using PowerShell cmdlet.&lt;/p&gt;
&lt;p&gt;I&amp;rsquo;ll demonstrate how to do DNS delegation both using &lt;strong&gt;dnscmd&lt;/strong&gt; and PowerShell cmdlet. You can decide yourself which one you find easier to use.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Passed EX362 Identity Management</title>
      <link>https://blog.khmersite.net/p/passed-ex362-identity-management/</link>
      <pubDate>Thu, 19 Nov 2020 01:47:45 +1100</pubDate>
      <guid>https://blog.khmersite.net/p/passed-ex362-identity-management/</guid>
      <description>&lt;p&gt;Today I passed the Red Hat Identity Management exa, EX362, with the score of 233/300.&lt;/p&gt;
&lt;p&gt;The material used to prepare for the exam is the RH362 online course, provided Red Hat. At first I wasn&amp;rsquo;t sure if I should use of the 5 exam credits (as part of one-year training subscription), but it turned out that IdM/FreeIPA is useful and fun to learn.&lt;/p&gt;
&lt;p&gt;Here are some tips for this exam:&lt;/p&gt;</description>
    </item>
    <item>
      <title>Using ZFS on an External Drive</title>
      <link>https://blog.khmersite.net/p/using-zfs-on-external-drive/</link>
      <pubDate>Thu, 12 Nov 2020 22:52:58 +1100</pubDate>
      <guid>https://blog.khmersite.net/p/using-zfs-on-external-drive/</guid>
      <description>&lt;p&gt;I&amp;rsquo;m a fan of ZFS filesystem. It&amp;rsquo;s so good that I also use ZFS on most my Linux machines, though it&amp;rsquo;s painful at time when the ZFS kernel modules fail to compile. Why I like it so much comparing to other file system such as XFS, EXT4, BTRFS? ZFS allows me to quickly do snapshots and efficiently send snapshots over the network, and my nas runs FreeBSD which support ZFS natively.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Display Last Login in Reverse</title>
      <link>https://blog.khmersite.net/p/display-last-login-in-reverse/</link>
      <pubDate>Sun, 08 Nov 2020 11:36:57 +1100</pubDate>
      <guid>https://blog.khmersite.net/p/display-last-login-in-reverse/</guid>
      <description>&lt;p&gt;You&amp;rsquo;ve been using Linux for a while, so you must have seen or used this command before: &lt;strong&gt;cat&lt;/strong&gt;. It&amp;rsquo;s used to concatenate files and print on the standard output. But do you know there is another command spelled it reversed &lt;strong&gt;tac&lt;/strong&gt;? &lt;strong&gt;tac&lt;/strong&gt; is like &lt;strong&gt;cat&lt;/strong&gt;, but print files in reverse.&lt;/p&gt;
&lt;p&gt;Here is an example which &lt;strong&gt;cat&lt;/strong&gt; could be handy. I need to print out the last login user in reverse. (By the default, it prints the last login first.)&lt;/p&gt;</description>
    </item>
    <item>
      <title>BIOS Firmware for ThinkPad X1 Carbon Gen 6 1.50</title>
      <link>https://blog.khmersite.net/p/bios-firmware-for-thinkpad-x1c6-1-50/</link>
      <pubDate>Sun, 08 Nov 2020 10:57:52 +1100</pubDate>
      <guid>https://blog.khmersite.net/p/bios-firmware-for-thinkpad-x1c6-1-50/</guid>
      <description>&lt;p&gt;Are you still rocking your X1 Carbon Gen 6 in 2020? Well, Lenovo just released a new BIOS firmware 1.50.&lt;/p&gt;
&lt;p&gt;Here are changes in this release:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-console&#34; data-lang=&#34;console&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;[Important updates]
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; - Update includes a security fix.
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; - Addresses CVE-2020-8696 and CVE-2020-8698.
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;   (https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2020-8696)
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;   (https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2020-8698)
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; - Addresses CVE-2020-0587, CVE-2020-0588, CVE-2020-0590, CVE-2020-0591,
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;   CVE-2020-0592, and CVE-2020-0593.
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;   (https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2020-0587)
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;   (https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2020-0588)
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;   (https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2020-0590)
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;   (https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2020-0591)
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;   (https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2020-0592)
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;   (https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2020-0593)
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#960050;background-color:#1e0010&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;[New functions or enhancements]
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; - Updated the CPU microcode.
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; - Updated the Diagnostics module to version 04.15.000.
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#960050;background-color:#1e0010&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;[Problem fixes]
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; Nothing.
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;It&amp;rsquo;s worth to note that this new firmware is available on Fedora (33) via &lt;strong&gt;fwupdmgr&lt;/strong&gt;.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Freebsd adduser ERROR - User Disappeared During Update</title>
      <link>https://blog.khmersite.net/p/freebsd-error-adding-new-user-disappeared/</link>
      <pubDate>Sat, 07 Nov 2020 23:53:57 +1100</pubDate>
      <guid>https://blog.khmersite.net/p/freebsd-error-adding-new-user-disappeared/</guid>
      <description>&lt;p&gt;While creating a new user account on one my servers running FreeBSD 12, I encountered the following error:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-console&#34; data-lang=&#34;console&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;root@nas2:~ # adduser
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Username: devops
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Full name: Ansible Operator  
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Uid (Leave empty for default): 
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Login group [devops]:      
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Login group is devops. Invite devops into other groups? []: 
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Login class [default]: 
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Shell (sh csh tcsh nologin) [sh]: 
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Home directory [/home/devops]:               
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Home directory permissions (Leave empty for default): 
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Use password-based authentication? [yes]: no
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Lock out the account after creation? [no]: no
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Username   : devops
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Password   : &amp;lt;disabled&amp;gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Full Name  : Ansible Operator
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Uid        : 1002
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Class      : 
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Groups     : devops 
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Home       : /home/devops
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Home Mode  : 
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Shell      : /bin/sh
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Locked     : no
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;OK? (yes/no): yes
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;pw: user &amp;#39;devops&amp;#39; disappeared during update
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;adduser: ERROR: There was an error adding user (devops).
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Add another user? (yes/no): no
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Goodbye!
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;According to a discussion on a FreeBSD forum, the problem could have caused by the databases being out of sync.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Fix Duplicating Certificates in FreeIPA</title>
      <link>https://blog.khmersite.net/p/fix-duplicating-certificates-in-freeipa/</link>
      <pubDate>Fri, 30 Oct 2020 01:16:00 +1100</pubDate>
      <guid>https://blog.khmersite.net/p/fix-duplicating-certificates-in-freeipa/</guid>
      <description>&lt;p&gt;While practicing with certificates reqeust using FreeIPA, I came across this duplicated certificates for the first time. This happened because I also practiced the same thing a few weeks ago. Here is how to re-produce this message:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-console&#34; data-lang=&#34;console&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;[root@client ~]# ipa-getcert request &lt;span style=&#34;color:#ae81ff&#34;&gt;\
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;-f /etc/vsftpd/certs/cert.pem \
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;-k /etc/vsftpd/certs/cert.key \
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;-K ftp/client.lab.example.net \
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;-D client.lab.example.net
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Certificate at same location is already used by request with nickname &amp;#34;20201008131445&amp;#34;.
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Because I&amp;rsquo;m still not familiar yet with FreeIPA on this certificate topic, I turned to Google search and found very useful information on this blog post: &lt;a href=&#34;https://adam.younglogic.com/2016/02/dealing-with-duplicate-ssl-certs-from-freeipa/&#34;&gt;Dealing with Duplicate SSL certs from FreeIPA&lt;/a&gt;.&lt;/p&gt;</description>
    </item>
    <item>
      <title>BIOS Firmware for ThinkPad P1 Gen1 1.32</title>
      <link>https://blog.khmersite.net/p/bios-firmware-for-thinkpad-p1-gen1-1-32/</link>
      <pubDate>Sun, 25 Oct 2020 14:08:20 +1100</pubDate>
      <guid>https://blog.khmersite.net/p/bios-firmware-for-thinkpad-p1-gen1-1-32/</guid>
      <description>&lt;p&gt;Lenovo just released a new BIOS firmware for its ThinkPad P1 Gen 1, v1.32. This version fixes a few issues, as well as update the CPU microcode.&lt;/p&gt;
&lt;p&gt;Here is the changes from Lenovo&amp;rsquo;s website.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-console&#34; data-lang=&#34;console&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;CHANGES IN THIS RELEASE
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  Version 1.32
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#960050;background-color:#1e0010&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;[Important updates]
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;- Addresses CVE-2020-8696, CVE-2020-8698
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;- Addresses CVE-2020-8694, CVE-2020-8695
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#960050;background-color:#1e0010&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;[New functions or enhancements]
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;- Updated the CPU microcode.
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#960050;background-color:#1e0010&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;[Problem fixes]
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;- Fixed an issue where system might hang up at POST when some KVM device
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  was connected.
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;- Fixed an issue where the screen might not be displayed on Thinkpad LCD when 
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  opened lid just before startup Windows.
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;- Fixed an issue where system might not boot from network which is connected to
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  ethernet of Thunderbolt3 WS Dock when boot mode is Legacy mode.
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;- Fixed an issue where system might hang at POST when Thunderbolt3 WS Dock
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  is attached.
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;- Fixed an issue where BIOS might generate 0288 beep error.
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;I haven&amp;rsquo;t had time to update this 1.32 on my machine yet, though I think the update would be just as smooth as previous release on Fedora 32 system.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Firewalld, nftables, and libvirt on Gentoo</title>
      <link>https://blog.khmersite.net/p/firewalld-nftables-libvirt-on-gentoo/</link>
      <pubDate>Sat, 17 Oct 2020 11:35:30 +1100</pubDate>
      <guid>https://blog.khmersite.net/p/firewalld-nftables-libvirt-on-gentoo/</guid>
      <description>&lt;p&gt;After many and many weeks, I finally got &lt;strong&gt;libvirt&lt;/strong&gt; working on this Gentoo machine. Before revealing how I&amp;rsquo;ve fixed this problem, let&amp;rsquo;s go through what the issues were.&lt;/p&gt;
&lt;p&gt;On this Gentoo I run Firewalld with &lt;strong&gt;nftables&lt;/strong&gt; as backend. An alternative to &lt;strong&gt;nftables&lt;/strong&gt; is &lt;strong&gt;iptables&lt;/strong&gt;, but since &lt;strong&gt;nftables&lt;/strong&gt; is newer and is becoming the default backend for more and more distribution including Fedora, I think it&amp;rsquo;s a good thing to adobt it early.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Tmux - Open Terminal Failed Can&#39;t Find Terminfo Database</title>
      <link>https://blog.khmersite.net/p/tmux-open-terminal-failed-cant-find-terminfo-database/</link>
      <pubDate>Thu, 15 Oct 2020 00:16:36 +1100</pubDate>
      <guid>https://blog.khmersite.net/p/tmux-open-terminal-failed-cant-find-terminfo-database/</guid>
      <description>&lt;p&gt;Apart from being an aparent Linux user, I&amp;rsquo;m also a fan of FreeBSD. A few years ago I challenged myself to perform all work related tasks on a FreeBSD machine for 6 months. It turned out that FreeBSD&amp;rsquo;s been working out quite well as a general usage work desktop.&lt;/p&gt;
&lt;p&gt;Today, I&amp;rsquo;d like to share a quick solution to a small annoying issue that may or may not affect you when you&amp;rsquo;re using FreeBSD. Basically, when I ssh from my Linux machine, which uses Alacritty terminal, to the remote FreeBSD machine at work I am not able to resume my tmux session.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Cleaning Up Systemd Journal Logs</title>
      <link>https://blog.khmersite.net/p/cleaning-up-systemd-journal-logs/</link>
      <pubDate>Sat, 10 Oct 2020 00:16:23 +1100</pubDate>
      <guid>https://blog.khmersite.net/p/cleaning-up-systemd-journal-logs/</guid>
      <description>&lt;p&gt;&amp;ldquo;Bad boys, whatcha want. Watcha want, whatcha gonna do when the root is full?&amp;rdquo;&lt;/p&gt;
&lt;p&gt;Actually, what are you gonna do when the journald taking up lots of space? For example, during the operating system upgrade on my desktop, the free space on &lt;code&gt;/&lt;/code&gt; is not sufficient.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-console&#34; data-lang=&#34;console&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Error Summary
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;-------------
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Disk Requirements:
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;   At least 5643MB more space needed on the / filesystem.
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;So, I check how much space the systemd-journald log was consuming:&lt;/p&gt;</description>
    </item>
    <item>
      <title>Dell Latitude 7400 System BIOS 1.10.1</title>
      <link>https://blog.khmersite.net/p/dell-latitude-7400-system-bios-1-10-1/</link>
      <pubDate>Thu, 01 Oct 2020 17:40:11 +1000</pubDate>
      <guid>https://blog.khmersite.net/p/dell-latitude-7400-system-bios-1-10-1/</guid>
      <description>&lt;p&gt;Just found out that Dell just released the a new firmware, 1.10.1, for the Latitude 7400 series. This firmeware was released since 10 Sep 2020.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Fixes:&lt;/em&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Firmware updates to address the Intel Technical Advisory INTEL-TA-00404 (CVE-2020-8758).&lt;/li&gt;
&lt;li&gt;Fixed the issue where an error message stating Key Mapping for Console Redirection BIOS is displayed before the Dell logo screen,&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;em&gt;Enhancements:&lt;/em&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Updated the Embedded Controller Engine firmware.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;I&amp;rsquo;m running Fedora 32 on this laptop. To update the firmeware, just execute &lt;strong&gt;fwupdmgr update&lt;/strong&gt;.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Automating Home Directory With IPA</title>
      <link>https://blog.khmersite.net/p/automating-home-directory-with-ipa/</link>
      <pubDate>Thu, 24 Sep 2020 11:02:05 +1000</pubDate>
      <guid>https://blog.khmersite.net/p/automating-home-directory-with-ipa/</guid>
      <description>&lt;p&gt;Nothing excites me than being able to solve a problem on Linux just before bed time. Well, there could be other things, but I couldn&amp;rsquo;t think of any right now.&lt;/p&gt;
&lt;p&gt;Right now, I&amp;rsquo;m preparing for my next exam - Red Hat Certified Specialist in Identity Management (&lt;a href=&#34;https://www.redhat.com/en/services/training/ex362-red-hat-certified-specialist-identity-management-exam&#34;&gt;EX362&lt;/a&gt;), and one of the topics is about setting up automated home directory using IdM (or IPA). I tried to follow the course material, but I had troubles getting it working.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Replacing a Disk in a Zpool</title>
      <link>https://blog.khmersite.net/p/replacing-a-disk-in-a-pool/</link>
      <pubDate>Sun, 20 Sep 2020 11:51:35 +1000</pubDate>
      <guid>https://blog.khmersite.net/p/replacing-a-disk-in-a-pool/</guid>
      <description>&lt;p&gt;ZFS is one of my favorite file systems. I use it at home on my nas server (running FreeBSD) as well as my Fedora 32 desktop. Today, I&amp;rsquo;m going to show you (and my future self) how to replace a (faulty) disk in a Zpool.&lt;/p&gt;
&lt;p&gt;The server I&amp;rsquo;ll be working on is &lt;strong&gt;nas2&lt;/strong&gt; and the pool is &lt;strong&gt;tank&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;List the status of the current pool.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-console&#34; data-lang=&#34;console&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Password:
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;root@nas2:~ # zpool status tank
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  pool: tank
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; state: DEGRADED
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;status: One or more devices could not be opened.  Sufficient replicas exist for
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        the pool to continue functioning in a degraded state.
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;action: Attach the missing device and online it using &amp;#39;zpool online&amp;#39;.
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;   see: http://illumos.org/msg/ZFS-8000-2Q
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  scan: resilvered 472K in 0 days 00:00:02 with 0 errors on Sun Aug 23 16:17:21 2020
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;config:
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#960050;background-color:#1e0010&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        NAME                      STATE     READ WRITE CKSUM
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        tank                      DEGRADED     0     0     0
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;          mirror-0                DEGRADED     0     0     0
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;            diskid/DISK-Z4Z46MXG  ONLINE       0     0     0
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;            620907994788427922    UNAVAIL      0     0     0  was /dev/diskid/DISK-Z1E4ZCM2
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;          mirror-1                ONLINE       0     0     0
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;            diskid/DISK-Z1E5PFCH  ONLINE       0     0     0
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;            diskid/DISK-Z4Z46XQP  ONLINE       0     0     0
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#960050;background-color:#1e0010&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;errors: No known data errors
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;From the above output, we can see that one of the disk in &lt;strong&gt;mirro-0&lt;/strong&gt; vdev was missing. (In fact, it has been removed prior to the system rebooted. I also inserted a new disk to the system.)&lt;/p&gt;</description>
    </item>
    <item>
      <title>Pairing Bluetooth Mouse on Gentoo</title>
      <link>https://blog.khmersite.net/p/pairing-bluetooth-mouse-on-gentoo/</link>
      <pubDate>Sun, 13 Sep 2020 13:27:58 +1000</pubDate>
      <guid>https://blog.khmersite.net/p/pairing-bluetooth-mouse-on-gentoo/</guid>
      <description>&lt;p&gt;Just a few a days ago, I wrote a blog post about &lt;a href=&#34;https://blog.khmersite.net/2020/09/pairing-bluetooth-mouse-on-command-line&#34;&gt;Pairing Bluetooth Mouse on Command Line&lt;/a&gt; on a Fedora laptop. So why do I need to write another post about doing the same thing on Gentoo? Well, as it turned out, I need a bit more than just turning on the &lt;strong&gt;bluetooth&lt;/strong&gt; service and pairing the mouse. My Gentoo&amp;rsquo;s installation is very minimal, and I think this gives me an excuse to document on how I&amp;rsquo;d solve or get this working on Gentoo.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Resizing a GPT Partition</title>
      <link>https://blog.khmersite.net/p/resizing-a-gpt-partition/</link>
      <pubDate>Thu, 10 Sep 2020 16:18:57 +1000</pubDate>
      <guid>https://blog.khmersite.net/p/resizing-a-gpt-partition/</guid>
      <description>&lt;p&gt;One of my virtual machines runs out of disk space in the root (&lt;code&gt;/&lt;/code&gt;) partition, and I want to remove the &lt;code&gt;/home&lt;/code&gt; partition and using this free space to resize the root partition.&lt;/p&gt;
&lt;p&gt;Nowadays, for any serious systems, I&amp;rsquo;d use LVM with XFS on top. However, for this test VM, I have a virtual disk with 4 partitions without LVM. Managing partition on LVM is much easier than working the disk partition directly. I can&amp;rsquo;t remember the last time I had to do this, so here is something to remind my future-self if I need this information again. Hey, if you&amp;rsquo;re reading this now, this might be useful to you too.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Passed EX415 Linux Security</title>
      <link>https://blog.khmersite.net/p/passed-ex415-linux-security/</link>
      <pubDate>Thu, 10 Sep 2020 01:34:54 +1000</pubDate>
      <guid>https://blog.khmersite.net/p/passed-ex415-linux-security/</guid>
      <description>&lt;p&gt;The exam was 4 hour long. I managed to finish all questions in 3 hours. Fortunately, I found a mistake in the last hour.&lt;/p&gt;
&lt;p&gt;I think the EX415 exam wasn&amp;rsquo;t too difficult and pretty confident that I did well.&lt;/p&gt;
&lt;p&gt;The most difficult part: not knowing what I did wrong. Or how the marker scripts would like to see our answers.&lt;/p&gt;
&lt;p&gt;I suspected there was a mistake in a question, but who to ask since there is a NDA? If you&amp;rsquo;re reading this, I can&amp;rsquo;t even ask or share this suspicion with you. (Again, because of the NDA.)&lt;/p&gt;</description>
    </item>
    <item>
      <title>Pairing Bluetooth Mouse on Command Line</title>
      <link>https://blog.khmersite.net/p/pairing-bluetooth-mouse-on-command-line/</link>
      <pubDate>Wed, 09 Sep 2020 23:28:54 +1000</pubDate>
      <guid>https://blog.khmersite.net/p/pairing-bluetooth-mouse-on-command-line/</guid>
      <description>&lt;p&gt;Ever since I&amp;rsquo;ve switched from Gnome to DWM on my main laptop, I have to perform most things on command line now. I know, right? :P&lt;/p&gt;
&lt;p&gt;Anyway, I need to pair a bluetooth mouse, Logi MX Anywhere 2S, with this Fedora laptop. I had a similar post a while back about &lt;a href=&#34;https://blog.khmersite.net/2019/03/connect-qc35-to-fedora-i3&#34;&gt;connecting Bose QC35 to Fedora 29&lt;/a&gt;. So this is quite similar to that post.&lt;/p&gt;
&lt;p&gt;First, ensure that &lt;strong&gt;bluetooth.service&lt;/strong&gt; is running:&lt;/p&gt;</description>
    </item>
    <item>
      <title>Pfl Provides whatprovides on Gentoo</title>
      <link>https://blog.khmersite.net/p/pfl-whatprovides-on-gentoo/</link>
      <pubDate>Fri, 04 Sep 2020 19:05:37 +1000</pubDate>
      <guid>https://blog.khmersite.net/p/pfl-whatprovides-on-gentoo/</guid>
      <description>&lt;p&gt;On Fedora or CentOS, on way to find out what package providing a file we can use &lt;code&gt;yum whatprovides [FILENAME]&lt;/code&gt; or &lt;code&gt;dnf whatprovides [FILENAME]&lt;/code&gt; on a DNF-aware system.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-console&#34; data-lang=&#34;console&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;# dnf whatprovides tmux
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Last metadata expiration check: 2:33:06 ago on Wed 09 Sep 2020 09:45:07 PM AEST.
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;tmux-3.0a-2.fc32.x86_64 : A terminal multiplexer
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Repo        : @System
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Matched from:
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Provide    : tmux = 3.0a-2.fc32
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#960050;background-color:#1e0010&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;tmux-3.0a-2.fc32.x86_64 : A terminal multiplexer
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Repo        : fedora
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Matched from:
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Provide    : tmux = 3.0a-2.fc32
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;I really need this similar tool on Gentoo, and it looks like the &lt;code&gt;emerge&lt;/code&gt; command doesn&amp;rsquo;t have this function built it. Fortunately, there is a utility called &lt;code&gt;e-file&lt;/code&gt; (provided by &lt;code&gt;pfl&lt;/code&gt; package) which kinda provides this &lt;code&gt;whatprovides&lt;/code&gt; option as in &lt;code&gt;yum&lt;/code&gt; and &lt;code&gt;dnf&lt;/code&gt;.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Locking Package Version with DNF Versionlock</title>
      <link>https://blog.khmersite.net/p/locking-package-version-with-dnf-versionlock/</link>
      <pubDate>Sun, 30 Aug 2020 23:51:07 +1000</pubDate>
      <guid>https://blog.khmersite.net/p/locking-package-version-with-dnf-versionlock/</guid>
      <description>&lt;p&gt;While newer version of a package on Linux system is generally a good thing, and we should upgrade it, there is times when we should hold on to the older version.&lt;/p&gt;
&lt;p&gt;For instance, Fedora 32 just released a newer version of the &lt;code&gt;kernel&lt;/code&gt; package &lt;code&gt;5.8.4&lt;/code&gt; recently, and with this version, the &lt;code&gt;zfs&lt;/code&gt; module, version 0.8.4, can&amp;rsquo;t be built. Therefore, if your Fedora system uses ZFS, like some of my machines, you&amp;rsquo;ll end up not seeing any ZFS dataset or pools.&lt;/p&gt;</description>
    </item>
    <item>
      <title>How to Enable Persistent Logging for Systemd Journal</title>
      <link>https://blog.khmersite.net/p/how-to-enable-persistent-logging-for-systemd-journal/</link>
      <pubDate>Sat, 29 Aug 2020 11:01:31 +1000</pubDate>
      <guid>https://blog.khmersite.net/p/how-to-enable-persistent-logging-for-systemd-journal/</guid>
      <description>&lt;p&gt;On RHEL 7/8, CentOS 7/8 and even Ubuntu (??), by default the journal log data is stored only in memory (&lt;code&gt;/run/log/journal/&lt;/code&gt; directory).&lt;/p&gt;
&lt;p&gt;There are 2 ways to retain the journal log messages. The first one is to set the variable &lt;code&gt;Storage&lt;/code&gt; to &lt;code&gt;persistent&lt;/code&gt; in the &lt;code&gt;/etc/systemd/journald.conf&lt;/code&gt;.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-console&#34; data-lang=&#34;console&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;[Journal]
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Storage=persistent
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Then restart the &lt;code&gt;systemd-journald&lt;/code&gt; service.&lt;/p&gt;
&lt;p&gt;Another solution is simpler and it looks like it&amp;rsquo;s the recommended way of achieving this. All we have to do is to create a directory, &lt;code&gt;/var/log/journal&lt;/code&gt; (with correct ownership and permission), and &lt;code&gt;journald&lt;/code&gt; will automatically store the log messages there.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Thunderbolt Firmware for ThinkPad X1 Carbon 6 1.20</title>
      <link>https://blog.khmersite.net/p/thunderbolt-firmware-for-thinkpad-x1-c6-1-20/</link>
      <pubDate>Thu, 13 Aug 2020 18:23:20 +1000</pubDate>
      <guid>https://blog.khmersite.net/p/thunderbolt-firmware-for-thinkpad-x1-c6-1-20/</guid>
      <description>&lt;p&gt;A quick note to remind ThinkPad X1 Carbon 6 users that Lenovo just released a new firmware for the Thunderbolt on this laptop. And, it&amp;rsquo;s available via &lt;code&gt;fwupd&lt;/code&gt; if you run Fedora (possibly also available on Ubuntu).&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-console&#34; data-lang=&#34;console&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;[root@benji ~]# fwupdmgr update
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;• Thunderbolt Controller has the latest available firmware version
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Upgrade available for Embedded Controller from 0.1.20 to 0.1.21
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;20KHCTO1WW must remain plugged into a power source for the duration of the update to avoid damage. Continue with update? [Y|n]: 
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Downloading…             [***************************************]
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Decompressing…           [***************************************]
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Authenticating…          [***************************************]
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Updating Embedded Controller…************************************]
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Scheduling…              [***************************************]
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Successfully installed firmware
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;• Intel Management Engine has the latest available firmware version
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;• SAMSUNG MZVLW256HEHP-000L7 has no available firmware updates
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;• System Firmware has the latest available firmware version
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#960050;background-color:#1e0010&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;An update requires a reboot to complete. Restart now? [y|N]:
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;All you need to do is rebooting the machine.&lt;/p&gt;</description>
    </item>
    <item>
      <title>SELinux Error ValueError: Port already Defined</title>
      <link>https://blog.khmersite.net/p/selinux-error-valueerror-port-already-defined/</link>
      <pubDate>Mon, 27 Jul 2020 14:44:53 +1000</pubDate>
      <guid>https://blog.khmersite.net/p/selinux-error-valueerror-port-already-defined/</guid>
      <description>&lt;p&gt;Today, I want to run the &lt;code&gt;httpd&lt;/code&gt; server on a custom port, 8002 on a CentOS 7 server. Of course, all my system has SELinux in enforcing mode.&lt;/p&gt;
&lt;p&gt;In order for the &lt;code&gt;httpd&lt;/code&gt; to bind on port &lt;code&gt;8002&lt;/code&gt;, we need to add this port to the &lt;code&gt;httpd_port_t&lt;/code&gt; port type list.&lt;/p&gt;
&lt;p&gt;First let&amp;rsquo;s confirm that port 8002 is not yet in the &lt;code&gt;http_port_t&lt;/code&gt; list:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-console&#34; data-lang=&#34;console&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;[root@servera ~]# semanage port -l | grep ^http
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;http_cache_port_t              tcp      8080, 8118, 8123, 10001-10010
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;http_cache_port_t              udp      3130
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;http_port_t                    tcp      80, 81, 443, 488, 8008, 8009, 8443, 9000
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;We know from the manual &lt;code&gt;semanage-port(8)&lt;/code&gt;, to add a port to an SELinux port type list, we run the following command:&lt;/p&gt;</description>
    </item>
    <item>
      <title>BIOS Firmware for ThinkPad P1 Gen1 1.31</title>
      <link>https://blog.khmersite.net/p/bios-firmware-for-thinkpad-p1-gen1-1-31/</link>
      <pubDate>Mon, 27 Jul 2020 00:21:18 +1000</pubDate>
      <guid>https://blog.khmersite.net/p/bios-firmware-for-thinkpad-p1-gen1-1-31/</guid>
      <description>&lt;p&gt;It seems like Lenovo releases a new BIOS firmeware every month for its ThinkPad, at least for the ThinkPad P1 Gen1. On July 21, the BIOS firmware version 1.31 was released.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-console&#34; data-lang=&#34;console&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;CHANGES IN THIS RELEASE
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  Version 1.31
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#960050;background-color:#1e0010&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;[Important updates]
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;- Address CVE-2020-0548, 
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; (https://cve.mitre.org//cgi-bin//cvename.cgi?name=CVE-2020-0548)
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;- Address CVE-2020-0549, 
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; (https://cve.mitre.org//cgi-bin//cvename.cgi?name=CVE-2020-0549)
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;- Address CVE-2020-0543, 
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; (https://cve.mitre.org//cgi-bin//cvename.cgi?name=CVE-2020-0543)
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#960050;background-color:#1e0010&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;[New functions or enhancements]
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;- Updated the CPU microcode.
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#960050;background-color:#1e0010&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;[Problem fixes]
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;- Fixed an issue where Force PXE boot by Intel AMT did not work.
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;This firmware supports both ThinkPad P1 Gen1 and ThinkPad X1 Extreme 1:&lt;/p&gt;</description>
    </item>
    <item>
      <title>How to Change Private Key Passphrase</title>
      <link>https://blog.khmersite.net/p/how-to-change-private-key-passphrase/</link>
      <pubDate>Mon, 20 Jul 2020 09:37:41 +1000</pubDate>
      <guid>https://blog.khmersite.net/p/how-to-change-private-key-passphrase/</guid>
      <description>&lt;p&gt;To change the passphrase on your default RSA key:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-console&#34; data-lang=&#34;console&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;➜ ssh-keygen -p
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Enter file in which the key is (/home/kenno/.ssh/id_rsa):
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Enter new passphrase (empty for no passphrase):
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Enter same passphrase again:
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Your identification has been saved with the new passphrase.
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Note that if you have more a different key, you can either supply it at the &amp;ldquo;Enter file in which key is&amp;rdquo; prompt or provide this file to the &lt;code&gt;ssh-keygen&lt;/code&gt; argument with the &lt;code&gt;-f&lt;/code&gt; option. E.g.:&lt;/p&gt;</description>
    </item>
    <item>
      <title>Changing LUKS Passphrase</title>
      <link>https://blog.khmersite.net/p/changing-luks-passphrase/</link>
      <pubDate>Sun, 12 Jul 2020 23:07:26 +1000</pubDate>
      <guid>https://blog.khmersite.net/p/changing-luks-passphrase/</guid>
      <description>&lt;p&gt;In my previous blog post, &lt;a href=&#34;https://blog.khmersite.net/2020/06/managing-file-system-encryption-with-luks/&#34;&gt;Managing File System Encryption with LUKS&lt;/a&gt;, I showed how to create an encrypted partition (of disk) using LUKS.&lt;/p&gt;
&lt;p&gt;Today, I&amp;rsquo;d like to show you how we can change the passphrase on this LUKS encrypted partition and keeping this passphrase (key) in the same slot.&lt;/p&gt;
&lt;p&gt;While I&amp;rsquo;m writing this blog post, I cannot remember how to do this, and I&amp;rsquo;m going to try to figure this out without doing the Google search. :)&lt;/p&gt;</description>
    </item>
    <item>
      <title>Dell Latitude 7400 System BIOS 1.9.1</title>
      <link>https://blog.khmersite.net/p/dell-latitude-7400-system-bios-1-9-1/</link>
      <pubDate>Thu, 02 Jul 2020 20:19:32 +1000</pubDate>
      <guid>https://blog.khmersite.net/p/dell-latitude-7400-system-bios-1-9-1/</guid>
      <description>&lt;p&gt;Update BIOS firmware version 1.9.1 is available for Dell Latitude 7400. This firmware was released on 30 June 2020. It is marked &lt;em&gt;Urgent&lt;/em&gt; and contains the following fixes and enhancements:&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Fixes:&lt;/em&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Fixed the issue where the system cannot detect the Intel Software Guard Extensions (SGX) device when SGX is enabled.&lt;/li&gt;
&lt;li&gt;Firmware updates to address security advisory INTEL-SA-00295 (CVE-2020-0531, CVE-2020-0532, CVE-2020-0533, CVE-2020-0535, CVE-2020-0536, CVE-2020-0537, CVE-2020-0538, CVE-2020-0539, CVE-2020-0540, CVE-2020-0545, CVE-2020-0594, CVE-2020-0595, CVE-2020-0596, and CVE-2020-8674).&lt;/li&gt;
&lt;li&gt;Firmware updates to address the Intel Security Advisory INTEL-SA-00320 (CVE-2020-0543).&lt;/li&gt;
&lt;li&gt;Firmware updates to address the Intel Security Advisory INTEL-SA-00329 (CVE-2020-0548 and CVE-2020-0549).&lt;/li&gt;
&lt;li&gt;Firmware updates to address the Intel Security Advisory INTEL-SA-00322 (CVE-2020-0528 and CVE-2020-0529).&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;em&gt;Enhancements:&lt;/em&gt;&lt;/p&gt;</description>
    </item>
    <item>
      <title>Managing Security Risk on RHEL 8</title>
      <link>https://blog.khmersite.net/p/managing-security-risk-on-rhel8/</link>
      <pubDate>Tue, 30 Jun 2020 11:16:11 +1000</pubDate>
      <guid>https://blog.khmersite.net/p/managing-security-risk-on-rhel8/</guid>
      <description>&lt;p&gt;This blog post is mainly about my practicing of managing security risk on a RHEL system, especially learning how to use the occasionally option passed to YUM command. It is probably not a good resource teaching how to properly manage security risks in general.&lt;/p&gt;
&lt;p&gt;Identify all critical, important, and moderate security notices on this server.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-console&#34; data-lang=&#34;console&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;[root@puppet2 ~]# yum updateinfo --security
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Updating Subscription Management repositories.
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Red Hat Enterprise Linux 8 for x86_64 - Supplementary (RPMs)                                  21 kB/s | 2.1 kB     00:00
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Red Hat Enterprise Linux 8 for x86_64 - AppStream (RPMs)                                      27 kB/s | 2.8 kB     00:00
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Red Hat Enterprise Linux 8 for x86_64 - BaseOS (RPMs)                                        475  B/s | 2.4 kB     00:05
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;EPEL8 x86_64                                                                                  28 kB/s | 2.8 kB     00:00
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Updates Information Summary: available
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    2 Security notice(s)
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        2 Important Security notice(s)
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Determine how many security-related packages are available for this machine.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Installing USBGuard on Gentoo</title>
      <link>https://blog.khmersite.net/p/installing-usbguard-on-gentoo/</link>
      <pubDate>Mon, 29 Jun 2020 00:56:47 +1000</pubDate>
      <guid>https://blog.khmersite.net/p/installing-usbguard-on-gentoo/</guid>
      <description>&lt;p&gt;Let&amp;rsquo;s find out the name of the package using the awesome &lt;code&gt;eix&lt;/code&gt; command, and install that package.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-console&#34; data-lang=&#34;console&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; ~ # eix usbguard
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;* sys-apps/usbguard
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;     Available versions:  ~0.7.6-r1 ~0.7.8 {bash-completion dbus ldap policykit static-libs systemd}
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;     Homepage:            https://github.com/USBGuard/usbguard
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;     Description:         Daemon protecting your computer against BadUSB
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#960050;background-color:#1e0010&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; ~ # emerge --ask sys-apps/usbguard
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#960050;background-color:#1e0010&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;These are the packages that would be merged, in order:
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#960050;background-color:#1e0010&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Calculating dependencies... done!
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#960050;background-color:#1e0010&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;!!! All ebuilds that could satisfy &amp;#34;sys-apps/usbguard&amp;#34; have been masked.
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;!!! One of the following masked packages is required to complete your request:
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;- sys-apps/usbguard-0.7.8::gentoo (masked by: ~amd64 keyword)
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;- sys-apps/usbguard-0.7.6-r1::gentoo (masked by: ~amd64 keyword)
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#960050;background-color:#1e0010&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;For more information, see the MASKED PACKAGES section in the emerge
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;man page or refer to the Gentoo Handbook.
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;It looks like we need to unmask &lt;code&gt;usbguard&lt;/code&gt;.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Managing File System Encryption with LUKS</title>
      <link>https://blog.khmersite.net/p/managing-file-system-encryption-with-luks/</link>
      <pubDate>Sun, 28 Jun 2020 21:31:48 +1000</pubDate>
      <guid>https://blog.khmersite.net/p/managing-file-system-encryption-with-luks/</guid>
      <description>&lt;p&gt;Last year, I already wrote a blog post about the same topic: &lt;a href=&#34;https://blog.khmersite.net/2019/08/configure-encrypted-storage-with-luks&#34;&gt;Configure Encrypted Storage With LUKS&lt;/a&gt;, and I had used &lt;code&gt;fdisk&lt;/code&gt; to create a disk partition. In this post, I&amp;rsquo;ll use &lt;code&gt;parted&lt;/code&gt; to achieve the same thing.&lt;/p&gt;
&lt;p&gt;I&amp;rsquo;m going to perform this operation on a server called &lt;code&gt;servera&lt;/code&gt; on a disk device &lt;code&gt;/dev/vdb&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;First, let&amp;rsquo;s verify that &lt;code&gt;vdb&lt;/code&gt; is available and has no partition:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-console&#34; data-lang=&#34;console&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;[root@servera ~]# parted -l
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;...
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#960050;background-color:#1e0010&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Error: /dev/vdb: unrecognised disk label
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Model: Virtio Block Device (virtblk)
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Disk /dev/vdb: 1074MB
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Sector size (logical/physical): 512B/512B
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Partition Table: unknown
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Disk Flags: 
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Use &lt;code&gt;parted&lt;/code&gt; to create a partition on &lt;code&gt;vdb&lt;/code&gt; using the whole disk.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Install Ansible on Gentoo</title>
      <link>https://blog.khmersite.net/p/install-ansible-on-gentoo/</link>
      <pubDate>Sun, 28 Jun 2020 02:19:29 +1000</pubDate>
      <guid>https://blog.khmersite.net/p/install-ansible-on-gentoo/</guid>
      <description>&lt;p&gt;Gentoo provides a package called &lt;code&gt;app-admin/ansible&lt;/code&gt; for Ansible. To install it, just run:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-console&#34; data-lang=&#34;console&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;❯ sudo emerge --ask app-admin/ansible
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Note that unlike Ansible package on CentOS/Fedora, there is no default &lt;code&gt;ansible.cfg&lt;/code&gt; provided with the Gentoo Ansible package.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-console&#34; data-lang=&#34;console&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;❯ ansible --version
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;ansible 2.9.9
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  config file = None
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  configured module search path = [&amp;#39;/home/kenno/.ansible/plugins/modules&amp;#39;, &amp;#39;/usr/share/ansible/plugins/modules&amp;#39;]
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  ansible python module location = /usr/lib/python3.7/site-packages/ansible
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  executable location = /usr/lib/python-exec/python3.7/ansible
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  python version = 3.7.7 (default, May  9 2020, 19:52:18) [GCC 9.2.0]
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Reference:&lt;/p&gt;</description>
    </item>
    <item>
      <title>How to Label Ext4 Filesystem</title>
      <link>https://blog.khmersite.net/p/how-to-label-ext4-filesystem/</link>
      <pubDate>Sat, 20 Jun 2020 19:40:24 +1000</pubDate>
      <guid>https://blog.khmersite.net/p/how-to-label-ext4-filesystem/</guid>
      <description>&lt;p&gt;I have a 2TB drive, when connecting to my Fedora workstation, it&amp;rsquo;s mounted using the UUID of the partition as the following:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-console&#34; data-lang=&#34;console&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;# mount | grep sde1
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;/dev/sde1 on /run/media/kenno/f59ffb93-5a92-4af9-a9b5-19ca3bb8aa37 type ext4 (rw,nosuid,nodev,relatime,seclabel,uhelper=udisks2)
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;I think it&amp;rsquo;ll look nicer if it&amp;rsquo;s mounted with a shorter name, e.g. &amp;lsquo;Podcast&amp;rsquo;.&lt;/p&gt;
&lt;p&gt;The filesystem for this drive is ext4. To create a label on the ext4 filesystem, we can use a program called &lt;code&gt;e2label&lt;/code&gt;. The exact command is &lt;code&gt;e2label device [ volume-label ]&lt;/code&gt; according to the &lt;code&gt;man&lt;/code&gt; page.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Move or toggle current window to second monitor in DWM</title>
      <link>https://blog.khmersite.net/p/move-toggle-window-to-second-monitor-dwm/</link>
      <pubDate>Thu, 18 Jun 2020 16:31:16 +1000</pubDate>
      <guid>https://blog.khmersite.net/p/move-toggle-window-to-second-monitor-dwm/</guid>
      <description>&lt;p&gt;I&amp;rsquo;ve switched to use &lt;a href=&#34;https://dwm.suckless.org/&#34;&gt;DWM&lt;/a&gt;, Dynamic Windows Manager, from GNOME on my laptop since the beginning of this month. So far I really enjoyed it.&lt;/p&gt;
&lt;p&gt;Here are some commands I needed to know since I have an external screen connected ot this machine.&lt;/p&gt;
&lt;p&gt;To change the focus to previous/next screen:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-console&#34; data-lang=&#34;console&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Mod1 + ,
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Mod1 + .
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;To move applications from a screen to another, just add &lt;code&gt;Shift&lt;/code&gt; key:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-console&#34; data-lang=&#34;console&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Mod1 + Shift + ,
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Mod1 + Shift + .
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;References:&lt;/p&gt;</description>
    </item>
    <item>
      <title>Upgrading STM32 Nucleo F401RE Firmware on Linux</title>
      <link>https://blog.khmersite.net/p/upgrading-stm32-nucleo-f401re-firmware-on-linux/</link>
      <pubDate>Mon, 15 Jun 2020 22:44:47 +1000</pubDate>
      <guid>https://blog.khmersite.net/p/upgrading-stm32-nucleo-f401re-firmware-on-linux/</guid>
      <description>&lt;p&gt;I&amp;rsquo;ve been meaning to pick up a micro-controller and work on it again. About 5 years ago when I first encountered Arduino, I spent sleepless night learning about it, and creating things from DIY weather station, world clock, light sensor, etc. Fast forward to the current days, I almost forgot everything I learned. But we can always re-learn, or can&amp;rsquo;t we?&lt;/p&gt;
&lt;p&gt;Tonight, I found an Stm32 Nucleo F401RE micro-controller, and I want to start by updating the firmware on it (admittedly, this is the easiest thing to do). ST provides a tool called &lt;code&gt;STW-LINK007&lt;/code&gt;, which can be freely downloaded from its website, to flash the firmware on a range of its micro-controllers. I have also written a blog &lt;a href=&#34;https://blog.khmersite.net/2016/01/upgrading-stm32f4-discovery-firmware-on-linux/&#34;&gt;post&lt;/a&gt; to update a similar micro-controller, STM32F4-Discovery, in the past.&lt;/p&gt;</description>
    </item>
    <item>
      <title>SELinux Non-Default Home Directory Location</title>
      <link>https://blog.khmersite.net/p/selinux-non-default-home-directory-location/</link>
      <pubDate>Mon, 15 Jun 2020 14:16:37 +1000</pubDate>
      <guid>https://blog.khmersite.net/p/selinux-non-default-home-directory-location/</guid>
      <description>&lt;p&gt;On most my systems I created a user called &lt;code&gt;devops&lt;/code&gt; with its home directory created at &lt;code&gt;/srv/devops&lt;/code&gt;. And on Fedora or CentOS systems, those home directories have their SELinux context set correctly when created. Recently, I found out that on all 3 machines so far, the SELinux context has been reverted.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-console&#34; data-lang=&#34;console&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;~# ls -lZ /srv
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;total 0
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;drwx------. 5 devops devops system_u:object_r:var_t:s0    127 Oct 30  2019 devops
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;It should have had the same context as the normal user &lt;code&gt;kenno&lt;/code&gt; in &lt;code&gt;/home&lt;/code&gt; directory:&lt;/p&gt;</description>
    </item>
    <item>
      <title>How to Create Multiple Directories with Incrementing Numbers in Names</title>
      <link>https://blog.khmersite.net/p/create-directories-with-incrementing-numbers-in-names/</link>
      <pubDate>Tue, 09 Jun 2020 17:39:46 +1000</pubDate>
      <guid>https://blog.khmersite.net/p/create-directories-with-incrementing-numbers-in-names/</guid>
      <description>&lt;p&gt;I need to create 20 empty directores with the following name: &lt;code&gt;dvd01&lt;/code&gt;, &lt;code&gt;dvd02&lt;/code&gt;, &lt;code&gt;dvd03&lt;/code&gt;,&amp;hellip;, &lt;code&gt;dvd20&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;My first thought was to use &lt;code&gt;for&lt;/code&gt; loop, but then I decided to do a quick Google search, and found something more elegant:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-console&#34; data-lang=&#34;console&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;$ mkdir dvd&lt;span style=&#34;color:#f92672&#34;&gt;{&lt;/span&gt;01..20&lt;span style=&#34;color:#f92672&#34;&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;That&amp;rsquo;s cool, isn&amp;rsquo;t it?&lt;/p&gt;
&lt;p&gt;Reference:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;https://unix.stackexchange.com/questions/415069/how-to-create-multiple-directories-with-incrementing-numbers-in-a-single-command&#34;&gt;How to create multiple directories with incrementing numbers in a single command?&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;</description>
    </item>
    <item>
      <title>Dell Latitude 7400 System BIOS 1.7.4</title>
      <link>https://blog.khmersite.net/p/dell-latitude-7400-system-bios-1-7-4/</link>
      <pubDate>Mon, 08 Jun 2020 15:19:11 +1000</pubDate>
      <guid>https://blog.khmersite.net/p/dell-latitude-7400-system-bios-1-7-4/</guid>
      <description>&lt;p&gt;Dell released a new BIOS firmware version 1.7.4 for the Latitude 7300 and 7400 on May 22, 2020. This release is again marked &lt;em&gt;Urgent&lt;/em&gt; and contains the following fixes and enhancements:&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Fixes:&lt;/em&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Firmware updated to address CVE-2020-5363&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;em&gt;Enhancements:&lt;/em&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Updated the Embedded Controller Engine Firmware&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;This version 1.7.4 is already available on Fedora 32 via &lt;code&gt;fwupdmgr&lt;/code&gt; tool.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-console&#34; data-lang=&#34;console&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;[root@matht436 ~]# fwupdmgr refresh
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Fetching signature https://cdn.fwupd.org/downloads/firmware.xml.gz.jcat
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Downloading…             [***************************************]
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Fetching metadata https://cdn.fwupd.org/downloads/firmware-00558-stable.xml.gz
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Downloading…             [***************************************]
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Successfully downloaded new metadata: 1 local device supported
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;[root@matht436 ~]# fwupdmgr update
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;• Thunderbolt Controller has no available firmware updates
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;• SSDPEKKF512G8 NVMe INTEL 512GB has no available firmware updates
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Upgrade available for System Firmware from 1.7.3 to 1.7.4
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Latitude 7400 must remain plugged into a power source for the duration of the update to avoid damage. Continue with update? [Y|n]:
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Downloading 1.7.4 for System Firmware...
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Fetching firmware https://fwupd.org/downloads/a397a5b5fb47d0411ce59e5a4550940681c741ebf8b601f9c90934e4a7ce4e29-Latitude_7X00_1.7.4.cab
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Downloading…             [***************************************] Less than one minute remaining…
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Decompressing…           [***************************************]
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Authenticating…          [***************************************]
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Updating System Firmware…[             /                         ]
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Scheduling…              [***************************************]
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Successfully installed firmware
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;• Touchpad has no available firmware updates
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;• Unifying Receiver has no available firmware updates
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#960050;background-color:#1e0010&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;An update requires a reboot to complete. Restart now? [y|N]:
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;There was no problem after rebooting.&lt;/p&gt;</description>
    </item>
    <item>
      <title>BIOS Firmware for ThinkPad P1 Gen1 1.30</title>
      <link>https://blog.khmersite.net/p/bios-firmware-for-thinkpad-p1-gen1-1-30/</link>
      <pubDate>Mon, 08 Jun 2020 12:08:44 +1000</pubDate>
      <guid>https://blog.khmersite.net/p/bios-firmware-for-thinkpad-p1-gen1-1-30/</guid>
      <description>&lt;p&gt;Lenovo just released an updated BIOS firmware version 1.30 for ThinkPad P1 Gen1 on June 3rd.&lt;/p&gt;
&lt;p&gt;The changes in this v1.30 release are:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-console&#34; data-lang=&#34;console&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;CHANGES IN THIS RELEASE
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  Version 1.30
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#960050;background-color:#1e0010&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;[Important updates]
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;- Update includes a security fix.
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;- Address CVE-2020-0529, 
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  (https://cve.mitre.org//cgi-bin//cvename.cgi?name=CVE-2020-0529)
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;- Address CVE-2020-0528, 
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  (https://cve.mitre.org//cgi-bin//cvename.cgi?name=CVE-2020-0528)
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#960050;background-color:#1e0010&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;[New functions or enhancements]
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;- Updated the Diagnostics module to version 04.12.001.
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#960050;background-color:#1e0010&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;[Problem fixes]
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;- Fixed an issue where USB keyboard connected via Thunderbolt WS Dock might not be used at BIOS POST.
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;This firmware supports both ThinkPad P1 Gen1 and ThinkPad X1 Extreme 1:&lt;/p&gt;</description>
    </item>
    <item>
      <title>Create Disk Partition With GNU Parted</title>
      <link>https://blog.khmersite.net/p/create-disk-partition-with-gnu-parted/</link>
      <pubDate>Wed, 20 May 2020 22:11:47 +1000</pubDate>
      <guid>https://blog.khmersite.net/p/create-disk-partition-with-gnu-parted/</guid>
      <description>&lt;p&gt;My favourite tool to create disk partitions on Linux is &lt;code&gt;c[fg]disk&lt;/code&gt;. &lt;code&gt;cfdisk&lt;/code&gt; used to create MBR based partition, and &lt;code&gt;cgdisk&lt;/code&gt; is for GPT one.&lt;/p&gt;
&lt;p&gt;Today, I want to learn to use another tool called GNU Parted.&lt;/p&gt;
&lt;p&gt;After plugging an external disk, we can use &lt;strong&gt;udiskctl&lt;/strong&gt; command to identify the disk device.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-console&#34; data-lang=&#34;console&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;# udisksctl status
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;MODEL                     REVISION  SERIAL               DEVICE
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;--------------------------------------------------------------------------
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Samsung SSD 850 EVO 250GB EMT01B6Q  S21MNXAG919308T      sda
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;ST2000DM001-1ER164        HP51      Z4Z46TMA             sdb
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;ST2000DM001-1ER164        HP51      Z4Z46W3E             sdc
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Samsung SSD 850 EVO 250GB EMT01B6Q  S21MNXAG919312Y      sdd
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Samsung SSD 840 EVO 250G  0309      533144424E4541443837343335324120 sde
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;The last Samsung SSD 840 (/dev/sde) is the one that I&amp;rsquo;m going to work with.&lt;/p&gt;</description>
    </item>
    <item>
      <title>BIOS Firmware for ThinkPad X1 Carbon Gen 6 1.48</title>
      <link>https://blog.khmersite.net/p/bios-firmware-for-thinkpad-x1c6-1-48/</link>
      <pubDate>Sat, 16 May 2020 19:10:33 +1000</pubDate>
      <guid>https://blog.khmersite.net/p/bios-firmware-for-thinkpad-x1c6-1-48/</guid>
      <description>&lt;p&gt;On May 15, Lenovo released a new BIOS firmware for ThinkPad X1 Carbon Gen 6. The latest of the version of the firmware is 1.48. (There previous version 1.47 was withdrawn for some unknown reason.)&lt;/p&gt;
&lt;p&gt;Changes in this releases:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-console&#34; data-lang=&#34;console&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;CHANGES IN THIS RELEASE
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  Version 1.48
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#960050;background-color:#1e0010&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;[Important updates]
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;- Update includes a security fix.
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#960050;background-color:#1e0010&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;[New functions or enhancements]
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;- Updated the Diagnostics module to version 04.12.001.
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#960050;background-color:#1e0010&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;[Problem fixes]
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;- Fixed an issue where Force PXE boot by Intel AMT does not work.
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;As of today, this new firmware is not yet available via LVFS on Fedora 32. So for those who are impatient like me, we can install this firmware ourselves. Warning: In no way will I be liable if your brick your own machine when you follow this guide!&lt;/p&gt;</description>
    </item>
    <item>
      <title>BIOS Firmware for Thinkpad P1 Gen1 1.29</title>
      <link>https://blog.khmersite.net/p/bios-firmware-for-thinkpad-p1-gen1-1-29/</link>
      <pubDate>Sat, 16 May 2020 14:52:11 +1000</pubDate>
      <guid>https://blog.khmersite.net/p/bios-firmware-for-thinkpad-p1-gen1-1-29/</guid>
      <description>&lt;p&gt;It&amp;rsquo;s almost exactly one month from the last time Lenovo released (&lt;a href=&#34;https://blog.khmersite.net/2020/04/new-bios-firmware-for-thinkpad-p1-g1-1-28/&#34;&gt;v1.28&lt;/a&gt; of ) the BIOS firmware for ThinkPad P1 Gen 1. Apparently, v1.28 firmware has been marked &amp;ldquo;Withdrawn&amp;rdquo; according to this &lt;a href=&#34;https://download.lenovo.com/pccbbs/mobiles/n2eul21w.txt&#34;&gt;n2eul21w.txt&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;The changes in this release v1.29 is:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-console&#34; data-lang=&#34;console&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;CHANGES IN THIS RELEASE
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  Version 1.29
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#960050;background-color:#1e0010&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;[Important updates]
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;- Addresses CVE-2019-0154
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  (https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2019-0154)
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  Refer to Lenovo&amp;#39;s Security Advisory page for additional information about
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  LEN-27714 &amp;#34;Multi-vendor BIOS Security Vulnerabilities&amp;#34;.
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  (https://support.lenovo.com/us/en/product_security/LEN-27714)
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#960050;background-color:#1e0010&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;[New functions or enhancements]
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;- Updated the CPU microcode.
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#960050;background-color:#1e0010&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;[Problem fixes]
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;- Nothing
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;This firmware supports both ThinkPad P1 Gen1 and ThinkPad X1 Extreme 1 listed below:&lt;/p&gt;</description>
    </item>
    <item>
      <title>Create Folder Recursively With Powershell</title>
      <link>https://blog.khmersite.net/p/create-folder-recursively-with-powershell/</link>
      <pubDate>Thu, 14 May 2020 20:20:18 +1000</pubDate>
      <guid>https://blog.khmersite.net/p/create-folder-recursively-with-powershell/</guid>
      <description>&lt;p&gt;Let&amp;rsquo;s say I want to create the following directories: &lt;code&gt;C:/Program Files/MiKTeX 2.9/tex/latex/math&lt;/code&gt; using PowerShell because, as you may guess it, it&amp;rsquo;s a Windows directory structure.&lt;/p&gt;
&lt;p&gt;Here&amp;rsquo;s the command to do that:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-console&#34; data-lang=&#34;console&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;PS C:\&amp;gt; New-Item -Type Directory -Path &amp;#34;C:/Program Files/MiKTeX 2.9/tex/latex/math&amp;#34;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;The command seems simple enough. So why did I create this post? Well, guess what? I have to Google this out for the 3rd time this month. From now, if I need to look it up again, I can just go to &lt;a href=&#34;https://blog.khmersite.net/tags/powershell/&#34;&gt;https://blog.khmersite.net/tags/powershell/&lt;/a&gt;.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Remove Kernels on Fedora</title>
      <link>https://blog.khmersite.net/p/remove-kernels-on-fedora/</link>
      <pubDate>Sun, 26 Apr 2020 00:11:01 +1000</pubDate>
      <guid>https://blog.khmersite.net/p/remove-kernels-on-fedora/</guid>
      <description>&lt;p&gt;I&amp;rsquo;m still running Fedora 31 on my main desktop though Fedora 32 beta has been out for a while. The only reason that stops me from jumping to F32 now is because ZFS 0.8.3 is not compatible with the kernel 5.6.* on F32. Rumor has it, ZFS 0.8.4 will support kernel 5.6.&lt;/p&gt;
&lt;p&gt;Tonight, while doing the system update with &lt;code&gt;sudo dnf update -y&lt;/code&gt; on F31 desktop, I noticed that the kernel for F31 is now &lt;code&gt;kernel-5.6.6-200.fc31.x86_64&lt;/code&gt;. Wait, what? I didn&amp;rsquo;t interrupt the update process, and let it run till finish.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Delete a Local User Account With PowerShell</title>
      <link>https://blog.khmersite.net/p/delete-a-local-user-account-with-powershell/</link>
      <pubDate>Wed, 22 Apr 2020 16:43:56 +1000</pubDate>
      <guid>https://blog.khmersite.net/p/delete-a-local-user-account-with-powershell/</guid>
      <description>&lt;p&gt;I need to delete a user from the PowerShell terminal and I don&amp;rsquo;t know how to do it.&lt;/p&gt;
&lt;p&gt;Well, fear no more, let&amp;rsquo;s have a quick read on &lt;a href=&#34;https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.localaccounts/remove-localuser?view=powershell-5.1&#34;&gt;Remove-LocalUser&lt;/a&gt; on how to do this.&lt;/p&gt;
&lt;p&gt;The command to delete the user is &lt;code&gt;Remove-LocaUser&lt;/code&gt;.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-console&#34; data-lang=&#34;console&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Remove-LocalUser
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;      [-InputObject] &amp;lt;LocalUser[]&amp;gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;      [-WhatIf]
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;      [-Confirm]
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;      [&amp;lt;CommonParameters&amp;gt;]
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#960050;background-color:#1e0010&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Remove-LocalUser
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;      [-Name] &amp;lt;String[]&amp;gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;      [-WhatIf]
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;      [-Confirm]
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;      [&amp;lt;CommonParameters&amp;gt;]
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#960050;background-color:#1e0010&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#960050;background-color:#1e0010&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Remove-LocalUser
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;      [-SID] &amp;lt;SecurityIdentifier[]&amp;gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;      [-WhatIf]
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;      [-Confirm]
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;      [&amp;lt;CommonParameters&amp;gt;]
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Here is an example of deleting a local user called &lt;code&gt;simba&lt;/code&gt;.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Getting rid of old initrd files on Ubuntu</title>
      <link>https://blog.khmersite.net/p/getting-rid-of-old-initrd-files-on-ubuntu/</link>
      <pubDate>Tue, 21 Apr 2020 10:30:55 +1000</pubDate>
      <guid>https://blog.khmersite.net/p/getting-rid-of-old-initrd-files-on-ubuntu/</guid>
      <description>&lt;p&gt;Occasionally I see some of our Ubuntu machines having /boot partition filled up by the initrd files generated from old kernels which no longer were no longer installed on the machines.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-console&#34; data-lang=&#34;console&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;root@matht232:/boot# uname -a
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Linux matht232 5.3.0-40-generic #32~18.04.1-Ubuntu SMP Mon Feb 3 14:05:59 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#960050;background-color:#1e0010&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;root@matht232:/boot# dpkg -l linux-image-\* | grep ^ii
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;ii  linux-image-5.3.0-40-generic           5.3.0-40.32~18.04.1  amd64        Signed kernel image generic
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;ii  linux-image-generic-hwe-18.04-edge     5.3.0.46.102         amd64        Generic Linux kernel image
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#960050;background-color:#1e0010&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;root@matht232:/boot# ls -1 /boot
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;config-5.3.0-40-generic
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;config-5.3.0-46-generic
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;grub
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;initrd.img-3.13.0-46-generic
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;initrd.img-4.15.0-88-generic
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;initrd.img-4.4.0-101-generic
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;initrd.img-4.4.0-122-generic
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;initrd.img-4.4.0-87-generic
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;initrd.img-5.3.0-40-generic
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;lost+found
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;System.map-5.3.0-40-generic
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;System.map-5.3.0-46-generic
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;vmlinuz-5.3.0-40-generic
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;vmlinuz-5.3.0-46-generic
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;I tried to remove these &lt;code&gt;initrd&lt;/code&gt; files manually, and they were generated again when a new kernel is installed. I haven&amp;rsquo;t figured how did this happened, until today!&lt;/p&gt;</description>
    </item>
    <item>
      <title>New System BIOS for Dell Latitude 7400 1.7.3</title>
      <link>https://blog.khmersite.net/p/new-system-bios-for-dell-latitude-7400-1-7-3/</link>
      <pubDate>Sun, 12 Apr 2020 00:14:37 +1000</pubDate>
      <guid>https://blog.khmersite.net/p/new-system-bios-for-dell-latitude-7400-1-7-3/</guid>
      <description>&lt;p&gt;Dell just released a new system BIOS version 1.7.3 on April 8 for Dell Latitude 7400. This release is marked as &lt;em&gt;Urgent&lt;/em&gt;, and comes with the following fixes and enhancements:&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Fixes:&lt;/em&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Fixed the issue where the Type-C port works from BIOS Boot Menu with external USB port disabled.&lt;/li&gt;
&lt;li&gt;Fixed the issue that there is no user interface for wireless connection in BIOS Connect cloud SOS interface.&lt;/li&gt;
&lt;li&gt;Fixed the issue where the system stops responding on Dell logo when SMM Security mitigation and Secure Boot is enabled.&lt;/li&gt;
&lt;li&gt;Fixed the issue where the system is not able to update the BIOS from BIOS Boot Menu with SMM Security Mitigation enabled.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;em&gt;Enhancements:&lt;/em&gt;&lt;/p&gt;</description>
    </item>
    <item>
      <title>New BIOS Firmware for ThinkPad P1 G1 1.28</title>
      <link>https://blog.khmersite.net/p/new-bios-firmware-for-thinkpad-p1-g1-1-28/</link>
      <pubDate>Sat, 11 Apr 2020 15:40:30 +1000</pubDate>
      <guid>https://blog.khmersite.net/p/new-bios-firmware-for-thinkpad-p1-g1-1-28/</guid>
      <description>&lt;p&gt;So another new post, another new firmware update? You bet it is!&lt;/p&gt;
&lt;p&gt;Early this month, Lenovo just released another BIOS firmware for ThinkPad P1 Gen 1. It looks like Lenovo has fixed a few bugs comparing to the the &lt;a href=&#34;https://blog.khmersite.net/2020/03/new-bios-firmware-for-thinkpad-p1-1-27/&#34;&gt;previous firmware release in March&lt;/a&gt;.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-console&#34; data-lang=&#34;console&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;CHANGES IN THIS RELEASE
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  Version 1.28
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#960050;background-color:#1e0010&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;[Important updates]
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;- Addresses CVE-2019-0154 (https://cve.mitre.org//cgi-bin//cvename.cgi?name=CVE-2019-0154)
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  Refer to Lenovo&amp;#39;s Security Advisory page for additional information about 
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  LEN-27714 &amp;#34;Multi-vendor BIOS Security Vulnerabilities&amp;#34;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  (https://support.lenovo.com/us/en/product_security/LEN-27714)
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;- Addresses CVE-2020-0548 (https://cve.mitre.org//cgi-bin//cvename.cgi?name=CVE-2020-0548)
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;- Addresses CVE-2020-0549 (https://cve.mitre.org//cgi-bin//cvename.cgi?name=CVE-2020-0549)
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;- Addresses CVE-2020-0543 (https://cve.mitre.org//cgi-bin//cvename.cgi?name=CVE-2020-0543)
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#960050;background-color:#1e0010&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;[New functions or enhancements]
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;- Updated the CPU microcode.
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#960050;background-color:#1e0010&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;[Problem fixes]
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;- Fixed an issue where system might hang after Intel AMT Control is set
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  to Disabled by ThinkPad Setup.
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Let&amp;rsquo;s update the firmware, shall we?&lt;/p&gt;</description>
    </item>
    <item>
      <title>Gentoo Luks Fails Kernel 5.6</title>
      <link>https://blog.khmersite.net/p/gentoo-luks-fails-kernel-5-6/</link>
      <pubDate>Sat, 11 Apr 2020 01:05:06 +1000</pubDate>
      <guid>https://blog.khmersite.net/p/gentoo-luks-fails-kernel-5-6/</guid>
      <description>&lt;p&gt;My Gentoo based Linux laptop which is still running the older kernel 5.3.15. A short while back, I had a failed attempt to upgrade the kernel to 5.4.2 as the disk which encrypted with &lt;a href=&#34;https://wiki.gentoo.org/wiki/Dm-crypt&#34;&gt;dm-crypt&lt;/a&gt; couldn&amp;rsquo;t be decrypted on boot. Since the older kernel 5.3.15 was working fine and free time was I what I lacked of, it seemed logical to just not doing anything about it.&lt;/p&gt;
&lt;p&gt;Today while updating all the packages on my Gentoo laptop, I notice there was a newer kernel available: 5.6.3. So let&amp;rsquo;s try to install this newest kernel again and see if the issue with Luks/dm-crypt still persists.&lt;/p&gt;</description>
    </item>
    <item>
      <title>List Open Ports on FreeBSD</title>
      <link>https://blog.khmersite.net/p/list-open-ports-on-freebsd/</link>
      <pubDate>Wed, 08 Apr 2020 12:13:07 +1000</pubDate>
      <guid>https://blog.khmersite.net/p/list-open-ports-on-freebsd/</guid>
      <description>&lt;p&gt;On Linux to list running services and open ports, I either use &lt;code&gt;netstat&lt;/code&gt; or &lt;code&gt;ss&lt;/code&gt; (socket stat?) most recently.&lt;/p&gt;
&lt;p&gt;Though &lt;code&gt;netstat&lt;/code&gt; is available on FreeBSD, the syntax is completely different.&lt;/p&gt;
&lt;p&gt;Today, I have the need to list the running services with the port display. On FreeBSD, we can do this using &lt;code&gt;sockstat&lt;/code&gt; command.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-console&#34; data-lang=&#34;console&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;root@bsd1:~ # sockstat -4 -l
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;USER     COMMAND    PID   FD PROTO  LOCAL ADDRESS         FOREIGN ADDRESS      
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;minio    minio      49274 10 tcp46  *:9000                *:*
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;root     sendmail   675   4  tcp4   127.0.0.1:25          *:*
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;root     sshd       672   4  tcp4   *:22                  *:*
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;ntpd     ntpd       616   21 udp4   *:123                 *:*
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;ntpd     ntpd       616   22 udp4   149.171.180.154:123   *:*
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;ntpd     ntpd       616   25 udp4   127.0.0.1:123         *:*
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;root     syslogd    523   7  udp4   *:514                 *:*
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Here are some other options which can be passed to the &lt;code&gt;sockstat&lt;/code&gt; command:&lt;/p&gt;</description>
    </item>
    <item>
      <title>New BIOS Firmware for ThinkPad X1 Carbon G6 1.46</title>
      <link>https://blog.khmersite.net/p/new-bios-firmware-for-thinkpad-x1-carbon-g6-1-46/</link>
      <pubDate>Tue, 31 Mar 2020 21:52:12 +1100</pubDate>
      <guid>https://blog.khmersite.net/p/new-bios-firmware-for-thinkpad-x1-carbon-g6-1-46/</guid>
      <description>&lt;p&gt;Lenovo has &amp;ldquo;quietely&amp;rdquo; released another firmware (1.46) for ThinkPad X1 Carbon Gen 6.&lt;/p&gt;
&lt;p&gt;&lt;a href=&#34;https://download.lenovo.com/pccbbs/mobiles/n23ul23w.txt&#34;&gt;Changes in this release&lt;/a&gt;:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;CHANGES IN THIS RELEASE
  Version 1.46

[Important updates]
- Update includes a security fix.

[New functions or enhancements]
  Nothing.

[Problem fixes]
  Nothing.
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;I am not able to find out what the &amp;ldquo;important security fix&amp;rdquo; is. However, I&amp;rsquo;m happy to report that the firmware update went well on X1 Carbon Gen 6 running Fedora 31.&lt;/p&gt;</description>
    </item>
    <item>
      <title>New BIOS Firmware for ThinkPad P1 G1 1.27</title>
      <link>https://blog.khmersite.net/p/new-bios-firmware-for-thinkpad-p1-1-27/</link>
      <pubDate>Fri, 27 Mar 2020 21:31:55 +1100</pubDate>
      <guid>https://blog.khmersite.net/p/new-bios-firmware-for-thinkpad-p1-1-27/</guid>
      <description>&lt;p&gt;If you&amp;rsquo;re still running ThinkPad P1 Gen 1 (Type 20MD, 20ME) like me, there is an exciting news, at least to me. Lenovo just released a new BIOS/UEFI firmware updated at version 1.27 on Mar 20, 2020.&lt;/p&gt;
&lt;p&gt;&lt;a href=&#34;https://download.lenovo.com/pccbbs/mobiles/n2eul19w.txt&#34;&gt;Changes in this releases&lt;/a&gt;:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;CHANGES IN THIS RELEASE
  Version 1.27

[Important updates]
- Addresses CVE-2019-0185 (https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2019-0185)
   Refer to Lenovo&amp;#39;s Security Advisory page for additionalinformation about
   LEN-27714 &amp;#34;Multi-vendor BIOS Security Vulnerabilities&amp;#34;.
   (https://support.lenovo.com/us/en/product_security/LEN-27714)
- Security fix addresses LEN-29406 &amp;#34;ST Microelectronics TPM Firmware ECDSA
   Signature Generation Vulnerability&amp;#34;. 
   Refer to Lenovo&amp;#39;s Security Advisory page for additionalinformation.
   (https://support.lenovo.com/us/en/solutions/LEN-29406)
- Addresses CVE-2019-14607 (https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2019-14607)

[New functions or enhancements]
- Updated the CPU microcode.
- Supported BIOS password authentication before entering into MEBx.

[Problem fixes]
- Nothing.
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;On a Fedora (31/32) laptop, to update the firmware is very easy nowaday. Here are the 2 commands to run:&lt;/p&gt;</description>
    </item>
    <item>
      <title>New BIOS UEFI Firmware for ThinkPad X1 Carbon G6 1.45</title>
      <link>https://blog.khmersite.net/p/new-bios-uefi-firmware-for-thinkpad-x1-carbon-g6-1-45/</link>
      <pubDate>Sun, 16 Feb 2020 23:40:55 +1100</pubDate>
      <guid>https://blog.khmersite.net/p/new-bios-uefi-firmware-for-thinkpad-x1-carbon-g6-1-45/</guid>
      <description>&lt;p&gt;Though a new firmware was release for ThinkPad X1 Carbon G6 since last month, 2020/01/23, I only found about this today.
Unlike the firmware for Dell&amp;rsquo;s laptop, once can easily update it with &lt;code&gt;fwupmgr&lt;/code&gt; if your Linux system supports it.&lt;/p&gt;
&lt;p&gt;Here&amp;rsquo;s what&amp;rsquo;s changed in this release.&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;CHANGES IN THIS RELEASE
  Version 1.45
&amp;lt;1.45&amp;gt;
 UEFI: 1.45 / ECP: 1.20
- (Fix) Fixed an issue where a system hardware controller device might disappear
        at 2nd boot.
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;To update it on Fedora 31, run:&lt;/p&gt;</description>
    </item>
    <item>
      <title>New System BIOS for Dell XPS 13 7390 1.1.13</title>
      <link>https://blog.khmersite.net/p/new-system-bios-for-dell-xps-13-7390-1-1-13/</link>
      <pubDate>Sun, 09 Feb 2020 22:42:21 +1100</pubDate>
      <guid>https://blog.khmersite.net/p/new-system-bios-for-dell-xps-13-7390-1-1-13/</guid>
      <description>&lt;p&gt;Dell released a new System BIOS firmware for Dell XPS 13 2-in-1 version 1.1.3 at the end of last year. This release marked as &lt;strong&gt;Urgent&lt;/strong&gt;, and it fixed the following issues (as taken from &lt;a href=&#34;https://www.dell.com/support/home/au/en/aubsd1/drivers/driversdetails?driverid=705fg&amp;amp;oscode=biosa&amp;amp;productcode=xps-13-7390-2-in-1-laptop&#34;&gt;Dell&amp;rsquo;s site&lt;/a&gt;):&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Fixed the incorrect panel size information in the BIOS setup menu.&lt;/li&gt;
&lt;li&gt;Fixed the issue where the MAC Address Override fails during the Preboot eXecution Environment (PXE) boot process.&lt;/li&gt;
&lt;li&gt;Change default setting of &amp;ldquo;Enable Thunderbolt (and PCIe behind TBT) pre-boot modules&amp;rdquo; to disabled by default&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;If your laptop runs Windows 10 and has Dell Update utilities installed, this System BIOS firmware update process is very simple. You just need to run this utility and click on Update button.&lt;/p&gt;</description>
    </item>
    <item>
      <title>NVIDIA Driver on Fedora 31 with Kernel 5.4</title>
      <link>https://blog.khmersite.net/p/nvidia-driver-on-fedora-31/</link>
      <pubDate>Sun, 02 Feb 2020 22:08:50 +1100</pubDate>
      <guid>https://blog.khmersite.net/p/nvidia-driver-on-fedora-31/</guid>
      <description>&lt;p&gt;There&amp;rsquo;s been problem with NVIDIA driver on my computer running Fedora 31 ever since the kernel has hit version 5.4.*. The issue is that the NVIDIA driver version 435.21, which is installed from &lt;code&gt;rpmfusion-nonfree&lt;/code&gt;, can&amp;rsquo;t be built with kernel 5.4.&lt;/p&gt;
&lt;p&gt;Here is the version of the &lt;code&gt;akmod-nvidia&lt;/code&gt; package:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-console&#34; data-lang=&#34;console&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;[root@watamem ~]# dnf info akmod-nvidia
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Last metadata expiration check: 1:48:11 ago on Sun 02 Feb 2020 08:13:26 PM AEDT.
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Installed Packages
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Name         : akmod-nvidia
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Epoch        : 3
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Version      : 435.21
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Release      : 1.fc31
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Architecture : x86_64
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Size         : 22 k
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Source       : nvidia-kmod-435.21-1.fc31.src.rpm
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Repository   : @System
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;From repo    : rpmfusion-nonfree
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Summary      : Akmod package for nvidia kernel module(s)
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;URL          : http://www.nvidia.com/
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;License      : Redistributable, no modification permitted
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Description  : This package provides the akmod package for the nvidia kernel modules.
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;And here is what happened when I tried to build the NVIDIA driver:&lt;/p&gt;</description>
    </item>
    <item>
      <title>Mounting exFat Filesystem on Fedora</title>
      <link>https://blog.khmersite.net/p/mounting-exfat-filesystem-on-fedora/</link>
      <pubDate>Sat, 21 Dec 2019 02:01:43 +1100</pubDate>
      <guid>https://blog.khmersite.net/p/mounting-exfat-filesystem-on-fedora/</guid>
      <description>&lt;p&gt;Just a note to remind myself to install packages required to have Fedora based system to recognize SD cards or other drives formatted using &lt;a href=&#34;https://en.wikipedia.org/wiki/ExFAT&#34;&gt;exFAT&lt;/a&gt;.&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code class=&#34;language-conole&#34; data-lang=&#34;conole&#34;&gt;# dnf install fuse-exfat exfat-utils -y
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;After the above 2 packages installed, just reinsert the SD cards, no reboot is required.&lt;/p&gt;</description>
    </item>
    <item>
      <title>New BIOS Firmware for ThinkPad P1 1.25</title>
      <link>https://blog.khmersite.net/p/new-bios-firmware-for-thinkpad-p1-1-25/</link>
      <pubDate>Sun, 08 Dec 2019 01:02:27 +1100</pubDate>
      <guid>https://blog.khmersite.net/p/new-bios-firmware-for-thinkpad-p1-1-25/</guid>
      <description>&lt;p&gt;It looks like Lenovo just released a new firmware for ThinkPad P1 Gen1 again.&lt;/p&gt;
&lt;p&gt;Here is the &lt;a href=&#34;https://download.lenovo.com/pccbbs/mobiles/n2eul17w.txt&#34;&gt;changes in this 1.25 release&lt;/a&gt;:&lt;/p&gt;
&lt;p&gt;CHANGES IN THIS RELEASE
Version 1.25&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;[Important updates]
- Update includes security fixes.
- Addresses CVE-2019-0151 (https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2019-0151)
- Addresses CVE-2019-0152 (https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2019-0152)
- Addresses CVE-2019-0123 (https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2019-0123)
- Addresses CVE-2019-0124 (https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2019-0124)
- Addresses CVE-2019-0117 (https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2019-0117)
- Addresses CVE-2019-0184 (https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2019-0184)

[New functions or enhancements]
- Updated the CPU microcode.
- Updated Regulatory Information.

[Problem fixes]
- Nothing.
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Unlike previous &lt;a href=&#34;https://blog.khmersite.net/2019/10/new-bios-firmware-for-thinkpad-p1-1-24/&#34;&gt;BIOS version 1.24 update&lt;/a&gt;, I wanted to try to just use the &lt;code&gt;fwupdmgr&lt;/code&gt; command utility to do it. It turned it out it was quite simple and straight forward.&lt;/p&gt;</description>
    </item>
    <item>
      <title>How to Update Packages on Arch Linux</title>
      <link>https://blog.khmersite.net/p/how-to-update-packages-on-arch-linux/</link>
      <pubDate>Sat, 07 Dec 2019 23:35:13 +1100</pubDate>
      <guid>https://blog.khmersite.net/p/how-to-update-packages-on-arch-linux/</guid>
      <description>&lt;p&gt;Finally, I got Arch installed on my ThinkPad X220. This also means that I will need to learn how to install and update software from scratch again. But that&amp;rsquo;s the fun part, isn&amp;rsquo;t it? :)&lt;/p&gt;
&lt;p&gt;Like many other distros, before we can update the installed packages, we need to update the software database (i.e. updated list from the repositories):&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-console&#34; data-lang=&#34;console&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;[root@tora ~]# pacman -Syy
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Note the above command is similar to &lt;code&gt;apt-get update&lt;/code&gt; in Debian/Ubuntu.&lt;/p&gt;</description>
    </item>
    <item>
      <title>How to Install Ansible on Centos 8</title>
      <link>https://blog.khmersite.net/p/how-to-install-ansible-on-centos8/</link>
      <pubDate>Sat, 09 Nov 2019 10:06:03 +1100</pubDate>
      <guid>https://blog.khmersite.net/p/how-to-install-ansible-on-centos8/</guid>
      <description>&lt;p&gt;On most Linux distribution, Ansible can be installed either using &lt;code&gt;python3-pip&lt;/code&gt; or &lt;code&gt;ansible&lt;/code&gt; package.&lt;/p&gt;
&lt;p&gt;I&amp;rsquo;m going to show how to get Ansible installed using the second method on CentOS 8.&lt;/p&gt;
&lt;p&gt;First add the EPEL repository to the CentOS 8 server.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-console&#34; data-lang=&#34;console&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;# yum localinstall https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Next, install &lt;code&gt;ansible&lt;/code&gt; package:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-console&#34; data-lang=&#34;console&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;# yum install ansible
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Last metadata expiration check: 0:00:49 ago on Sun 10 Nov 2019 09:33:22 PM AEDT.
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Dependencies resolved.
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;=======================================================================================================================
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; Package                           Arch                  Version                        Repository                Size
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;=======================================================================================================================
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Installing:
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; ansible                           noarch                2.8.5-2.el8                    epel                      15 M
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Installing dependencies:
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; python3-babel                     noarch                2.5.1-3.el8                    AppStream                4.8 M
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; python3-jinja2                    noarch                2.10.1-2.el8_0                 AppStream                538 k
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; python3-jmespath                  noarch                0.9.0-11.el8                   AppStream                 45 k
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; python3-markupsafe                x86_64                0.23-19.el8                    AppStream                 39 k
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; python3-pyasn1                    noarch                0.3.7-6.el8                    AppStream                126 k
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; libsodium                         x86_64                1.0.18-2.el8                   epel                     162 k
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; python3-bcrypt                    x86_64                3.1.6-2.el8.1                  epel                      44 k
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; python3-pynacl                    x86_64                1.3.0-5.el8                    epel                     100 k
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; sshpass                           x86_64                1.06-9.el8                     epel                      27 k
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Installing weak dependencies:
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; python3-paramiko                  noarch                2.4.3-1.el8                    epel                     289 k
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#960050;background-color:#1e0010&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Transaction Summary
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;=======================================================================================================================
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Install  11 Packages
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#960050;background-color:#1e0010&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Total download size: 21 M
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Installed size: 104 M
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Is this ok [y/N]: 
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Let&amp;rsquo;s confirm that the installation went ok by checking the version of &lt;code&gt;ansible&lt;/code&gt;:&lt;/p&gt;</description>
    </item>
    <item>
      <title>How to Label an XFS Filesystem</title>
      <link>https://blog.khmersite.net/p/how-to-label-xfs-filesystem/</link>
      <pubDate>Sun, 27 Oct 2019 23:49:40 +1100</pubDate>
      <guid>https://blog.khmersite.net/p/how-to-label-xfs-filesystem/</guid>
      <description>&lt;p&gt;When I plugged in an external drive to my laptop, the drive was displayed as a string consits random letters and numbers. Here is an example:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-console&#34; data-lang=&#34;console&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;❯❯❯ df -Th | grep sdb
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;/dev/sdb1               xfs       481M   26M  456M   6% /run/media/kenno/5428b182-c92e-466b-89d2-b5b31b80ba48
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Though the drive worked perfectly fine, I think it&amp;rsquo;s ugly, and I wanted to properly give it a good name. Let&amp;rsquo;s call it &lt;strong&gt;externo&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;But how to do this? You may not believe it, I forgot how to do this. In fact, I couldn&amp;rsquo;t rememer when the last time I had to (re)label a file system. Fear not,Google can come to the rescue!&lt;/p&gt;</description>
    </item>
    <item>
      <title>Create a User Account with PowerShell</title>
      <link>https://blog.khmersite.net/p/create-user-account-with-powershell/</link>
      <pubDate>Thu, 24 Oct 2019 04:23:19 +1100</pubDate>
      <guid>https://blog.khmersite.net/p/create-user-account-with-powershell/</guid>
      <description>&lt;p&gt;Today I learned how to create a user account on Windows 10 using PowerShell. Let&amp;rsquo;s create a small exercise to demonstrate how can this be easily done.&lt;/p&gt;
&lt;p&gt;Task: &amp;ldquo;Create a local user account named &amp;rsquo;localaccount&amp;rsquo; with the password &lt;em&gt;BlueHat&lt;/em&gt;. This new user should have admin privilege.&amp;rdquo;&lt;/p&gt;
&lt;p&gt;First, launch the PowerShell (terminal?), by running as Administrator.&lt;/p&gt;
&lt;p&gt;The password will be stored in a variable called &lt;code&gt;$Password&lt;/code&gt;:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-console&#34; data-lang=&#34;console&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;$Password &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; Read-Host -AsSecureString
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;*******
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Now we&amp;rsquo;re ready to create a new &lt;em&gt;local&lt;/em&gt; account:&lt;/p&gt;</description>
    </item>
    <item>
      <title>CTDB Not Starting Up on CentOS 7</title>
      <link>https://blog.khmersite.net/p/ctdb-not-starting-up-on-centos-7/</link>
      <pubDate>Sun, 13 Oct 2019 23:25:57 +1100</pubDate>
      <guid>https://blog.khmersite.net/p/ctdb-not-starting-up-on-centos-7/</guid>
      <description>&lt;p&gt;While preparing for my Red Hat Gluster Storage Administration exam (EX236), I got stuck at a section of configuring IP failover with CTDB Clustered Trivial Database) for Samba. The problem is that I coudldn&amp;rsquo;t get the &lt;code&gt;ctdb&lt;/code&gt; service running on my home lab running CentOS 7 and a newer version of ctdb.&lt;/p&gt;
&lt;p&gt;This problem occurs on the following platform and package version:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;CentOS Linux release 7.7.1908 (Core)&lt;/li&gt;
&lt;li&gt;ctdb 4.9.1-6.el7&lt;/li&gt;
&lt;/ul&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-console&#34; data-lang=&#34;console&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;# systemctl status ctdb
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;● ctdb.service - CTDB
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;   Loaded: loaded (/usr/lib/systemd/system/ctdb.service; enabled; vendor preset: disabled)
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;   Active: failed (Result: exit-code) since Sun 2019-10-13 23:17:46 AEDT; 3min 7s ago
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;     Docs: man:ctdbd(1)
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;           man:ctdb(7)
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  Process: 1335 ExecStart=/usr/sbin/ctdbd_wrapper start (code=exited, status=1/FAILURE)
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#960050;background-color:#1e0010&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Oct 13 23:17:35 serverb.rh236.local systemd[1]: Starting CTDB...
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Oct 13 23:17:35 serverb.rh236.local ctdbd[1348]: CTDB logging to location file:/var/log/log.ctdb
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Oct 13 23:17:46 serverb.rh236.local ctdbd_wrapper[1335]: Timed out waiting for initialisation - check logs
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Oct 13 23:17:46 serverb.rh236.local systemd[1]: ctdb.service: control process exited, code=exited status=1
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Oct 13 23:17:46 serverb.rh236.local systemd[1]: Failed to start CTDB.
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Oct 13 23:17:46 serverb.rh236.local systemd[1]: Unit ctdb.service entered failed state.
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Oct 13 23:17:46 serverb.rh236.local systemd[1]: ctdb.service failed.
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Here is the congent from &lt;code&gt;/var/log/log.ctdb&lt;/code&gt; log:&lt;/p&gt;</description>
    </item>
    <item>
      <title>New BIOS Firmware for ThinkPad P1 1.24</title>
      <link>https://blog.khmersite.net/p/new-bios-firmware-for-thinkpad-p1-1-24/</link>
      <pubDate>Mon, 07 Oct 2019 01:17:14 +1100</pubDate>
      <guid>https://blog.khmersite.net/p/new-bios-firmware-for-thinkpad-p1-1-24/</guid>
      <description>&lt;p&gt;I&amp;rsquo;ve been relying on Gnome Software Center to let me know when new ThinkPad P1 firmware is available. Up until today, there is no new firmware available since the &lt;a href=&#34;https://blog.khmersite.net/2019/08/new-device-firmware-available-for-thinkpad-p1/&#34;&gt;last update back in August 2019&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;However, I stumbled on a post on &lt;a href=&#34;https://www.reddit.com/r/thinkpad/comments/ddvsn2/x1_extreme_p1_gen_2_bios_126_released_promising/&#34;&gt;reddit r/thinkpad&lt;/a&gt;, someone mentioned the BIOS 1.26 had been released for X1 Extreme/P1 Gen 2. This made me wonder if there was also new version of BIOS for the P1 Gen 1 that I have. Of course, there is a new BIOS firmware available: 1.24.&lt;/p&gt;</description>
    </item>
    <item>
      <title>grub2-editenv: error environment block too small</title>
      <link>https://blog.khmersite.net/p/grub2-editenv-error-environment-block-too-small/</link>
      <pubDate>Tue, 10 Sep 2019 01:14:12 +1000</pubDate>
      <guid>https://blog.khmersite.net/p/grub2-editenv-error-environment-block-too-small/</guid>
      <description>&lt;p&gt;As the title says when I tried to generate grub on a machine running Fedora 31 using UEFI, I was presented with this error:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-console&#34; data-lang=&#34;console&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;# grub2-mkconfig -o /boot/efi/EFI/fedora/grub.cfg 
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Generating grub configuration file ...
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;grub2-editenv: error: environment block too small.
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;...
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;I didn&amp;rsquo;t know what had caused it. However, it seemed like an easy fix was to remove the &lt;code&gt;grubenv&lt;/code&gt; file.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-console&#34; data-lang=&#34;console&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;# rm /boot/efi/EFI/fedora/grubenv
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;# grub-editenv /boot/efi/EFI/fedora/grubenv create
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;# grub2-mkconfig -o /boot/efi/EFI/fedora/grub.cfg 
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Generating grub configuration file ...
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Adding boot menu entry for EFI firmware configuration
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;done
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;By the way, as a word of caution, if you have a similar problem, please don&amp;rsquo;t just copy and paste the command above and run it. It may make your sitution worse.&lt;/p&gt;</description>
    </item>
    <item>
      <title>feh WARNING: abc.png - No Imlib2 loader for that file format</title>
      <link>https://blog.khmersite.net/p/feh-no-imlib2-loader-for-that-file-format/</link>
      <pubDate>Sun, 01 Sep 2019 16:00:52 +1000</pubDate>
      <guid>https://blog.khmersite.net/p/feh-no-imlib2-loader-for-that-file-format/</guid>
      <description>&lt;p&gt;As the title says, I cannot use &lt;code&gt;feh&lt;/code&gt; to open a PNG image. &lt;code&gt;feh&lt;/code&gt; on this machine can&amp;rsquo;t open a JPG image either. Let&amp;rsquo;s see what&amp;rsquo;s wrong.&lt;/p&gt;
&lt;p&gt;I should notice that this problem occured on a machine running Gentoo. :D&lt;/p&gt;
&lt;p&gt;First, let&amp;rsquo;s check if &lt;code&gt;feh&lt;/code&gt; is installed using my favorite tool called &lt;code&gt;eix&lt;/code&gt;:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-console&#34; data-lang=&#34;console&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;~ ❯❯❯ eix feh
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;[I] media-gfx/feh
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;     Available versions:  3.1.1 ~3.1.3 ~3.2 ~3.2.1^t {curl debug exif test xinerama}
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;     Installed versions:  3.1.1(11:11:04 PM 04/14/2019)(-curl -debug -exif -test -xinerama)
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;     Homepage:            https://feh.finalrewind.org/
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;     Description:         A fast, lightweight imageviewer using imlib2
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;According to the above information, &lt;code&gt;feh:3.1.1&lt;/code&gt; is already installed. It also mentions that &lt;code&gt;feh&lt;/code&gt; use &lt;code&gt;imlib2&lt;/code&gt; library.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Configure Encrypted Storage With LUKS</title>
      <link>https://blog.khmersite.net/p/configure-encrypted-storage-with-luks/</link>
      <pubDate>Thu, 29 Aug 2019 22:30:12 +1000</pubDate>
      <guid>https://blog.khmersite.net/p/configure-encrypted-storage-with-luks/</guid>
      <description>&lt;p&gt;I&amp;rsquo;m currently preparing for the &lt;a href=&#34;https://www.redhat.com/en/services/training/ex415-red-hat-certified-specialist-security-linux-exam&#34;&gt;Red Hat Certified Specialist in Security: Linux exam (EX415)&lt;/a&gt;. One of the exam objectives is about storage encryption using LUKS.&lt;/p&gt;
&lt;p&gt;Here&amp;rsquo;s my note learning about LUKS. It&amp;rsquo;s not meant to be a guide which you should copy and paste and run it on your production system.&lt;/p&gt;
&lt;p&gt;Suppose I have a new disk (&lt;strong&gt;/dev/vdb&lt;/strong&gt;) attached to my server and I&amp;rsquo;d like to use it as an encrypted storage using LUKS. Here is how I&amp;rsquo;d do it.&lt;/p&gt;</description>
    </item>
    <item>
      <title>How I Update Hugo on My Machine</title>
      <link>https://blog.khmersite.net/p/how-i-update-hugo-on-my-machine/</link>
      <pubDate>Sun, 25 Aug 2019 12:03:11 +1000</pubDate>
      <guid>https://blog.khmersite.net/p/how-i-update-hugo-on-my-machine/</guid>
      <description>&lt;p&gt;I run &lt;code&gt;hugo&lt;/code&gt; hot off the development branch. Periodically I need to checkout the code and re-build it. I find myself having to google to do this almost all the time. So today, I&amp;rsquo;m gonna document this here so I can quickly look it up next time I want to update &lt;code&gt;hugo&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;The &lt;code&gt;hugo&lt;/code&gt; code has already be cloned to the following location in my desktop:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-console&#34; data-lang=&#34;console&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;mkdir -p $HOME/dev/go
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;cd $HOME/dev/go
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;git clone https://github.com/gohugoio/hugo.git
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Here are the commands to update the &lt;code&gt;hugo&lt;/code&gt; code, rebuild and reinstall it:&lt;/p&gt;</description>
    </item>
    <item>
      <title>How to Generate a GPG Key</title>
      <link>https://blog.khmersite.net/p/how-to-generate-a-gpg-key/</link>
      <pubDate>Mon, 19 Aug 2019 14:32:13 +1000</pubDate>
      <guid>https://blog.khmersite.net/p/how-to-generate-a-gpg-key/</guid>
      <description>&lt;p&gt;&lt;a href=&#34;https://gnupg.org&#34;&gt;GPG&lt;/a&gt;, the GNU Privacy Guard, can be used to digitally sign email, encrypt files. GPG is also used to sign RPM package.&lt;/p&gt;
&lt;p&gt;In this post, I&amp;rsquo;ll write a short instruction on how to generate a new GPG key on RHEL or CentOS 7.&lt;/p&gt;
&lt;p&gt;The command we need to generate the GPG key is &lt;code&gt;gpg&lt;/code&gt;. This program is provided by &lt;code&gt;gnupg2&lt;/code&gt;, and it should have aready been installed in most system.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Upgrading Kernel Issues and Fixes on Gentoo</title>
      <link>https://blog.khmersite.net/p/upgrading-kernel-issues-and-fixes-on-gentoo/</link>
      <pubDate>Tue, 06 Aug 2019 23:33:03 +1000</pubDate>
      <guid>https://blog.khmersite.net/p/upgrading-kernel-issues-and-fixes-on-gentoo/</guid>
      <description>&lt;p&gt;Today I decided to upgrade the kernel (gentoo-sources) from 4.19.64 to 5.2.6 on my old ThinkPad X220. Apart from a few hiccups, everything went quite smoothly. I already have a blog post about &lt;a href=&#34;https://blog.khmersite.net/p/upgrade-kernel-on-gentoo/&#34;&gt;upgrading the kernel on Gentoo&lt;/a&gt;, so I&amp;rsquo;ll skip many things here.&lt;/p&gt;
&lt;p&gt;First, ensure the &lt;code&gt;sys-kernel/gentoo-sources-5.2.6&lt;/code&gt; is installed:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-console&#34; data-lang=&#34;console&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;# emerge -av &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;sys-kernel/gentoo-sources-5.26
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;After the above package installed, we should be able to list it:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-console&#34; data-lang=&#34;console&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;~ ❯❯❯ eselect kernel list
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Available kernel symlink targets:
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  [1]   linux-4.14.63-gentoo-r1
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  [2]   linux-4.14.65-gentoo
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  [3]   linux-4.14.78-gentoo
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  [4]   linux-4.14.83-gentoo
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  [5]   linux-4.19.27-gentoo-r1
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  [6]   linux-4.19.44-gentoo
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  [7]   linux-4.19.52-gentoo
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  [8]   linux-4.19.57-gentoo
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  [9]   linux-4.19.64-gentoo *
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  [10]  linux-5.2.6-gentoo
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Let&amp;rsquo;s select &lt;code&gt;linux-5.2.6-gentoo&lt;/code&gt; as the version we&amp;rsquo;d like to switch to:&lt;/p&gt;</description>
    </item>
    <item>
      <title>New Device Firmware Available for ThinkPad P1</title>
      <link>https://blog.khmersite.net/p/new-device-firmware-available-for-thinkpad-p1/</link>
      <pubDate>Sun, 04 Aug 2019 22:29:42 +1000</pubDate>
      <guid>https://blog.khmersite.net/p/new-device-firmware-available-for-thinkpad-p1/</guid>
      <description>&lt;p&gt;It looks like there are more device firmware available for Lenovo ThinkPad P1 (and X1 Extreme).&lt;/p&gt;
&lt;p&gt;&lt;img alt=&#34;Gnome Software Centre&#34; loading=&#34;lazy&#34; src=&#34;https://blog.khmersite.net/wp-content/uploads/2019/08/thinkpad_p1_update_20190804_2.png&#34;&gt;&lt;/p&gt;
&lt;p&gt;Based on the list from Gnome Software Center, the available firmware are:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Thunderbolt Firmware N2ETF12W&lt;/li&gt;
&lt;li&gt;System Firmware (Embedded Controller) 0.1.11&lt;/li&gt;
&lt;li&gt;System Firmware (?) 0.1.23&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;It&amp;rsquo;s time to update all of them on my P1.&lt;/p&gt;</description>
    </item>
    <item>
      <title>New Firmware 1.21 Available for ThinkPad P1</title>
      <link>https://blog.khmersite.net/p/new-firmware-1-21-available-for-thinkpad-p1/</link>
      <pubDate>Sat, 08 Jun 2019 11:48:18 +1000</pubDate>
      <guid>https://blog.khmersite.net/p/new-firmware-1-21-available-for-thinkpad-p1/</guid>
      <description>&lt;p&gt;I run Fedora 30 on my ThinkPad P1 with i3 as a windows manager. Today, I switched to Plasma to test something out. While running plasma, I launched (Gnome) Software centre to check if there was any firmware update for this P1. To my surprise, there was one available: 1.21 released on April 29, 2019.&lt;/p&gt;
&lt;p&gt;&lt;img alt=&#34;Gnome Software Center&#34; loading=&#34;lazy&#34; src=&#34;https://blog.khmersite.net/wp-content/uploads/2019/06/thinkpad_p1_firmware_1.21.png&#34;&gt;&lt;/p&gt;
&lt;p&gt;Feel free to find out what&amp;rsquo;s new in this firmware at the following link: &lt;a href=&#34;https://pcsupport.lenovo.com/au/en/products/laptops-and-netbooks/thinkpad-p-series-laptops/thinkpad-p1-type-20md-20me/downloads&#34;&gt;P1 (Type 20MD, 20ME) Laptop (ThinkPad)&lt;/a&gt;.&lt;/p&gt;</description>
    </item>
    <item>
      <title>New Firmware for Sony A6500 v1.06</title>
      <link>https://blog.khmersite.net/p/new-firmware-for-sony-a6500-1-06/</link>
      <pubDate>Tue, 28 May 2019 23:11:24 +1000</pubDate>
      <guid>https://blog.khmersite.net/p/new-firmware-for-sony-a6500-1-06/</guid>
      <description>&lt;p&gt;In early March this year Sony released version 1.05 firmware for Sony A6500. Today, I found out that Sony has a newer version of the firmware available, 1.06.&lt;/p&gt;
&lt;p&gt;This time around, Sony didn&amp;rsquo;t clearly specify what&amp;rsquo;s changed in this version beside just one point:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Improves the overall stability of the camera&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;To update the firmware, you&amp;rsquo;ll need either a Windows or a Mac machine. Here is a link to download the firmware from Australian Sony website:&lt;/p&gt;</description>
    </item>
    <item>
      <title>Destroying Unknown Status Pod in OpenShift</title>
      <link>https://blog.khmersite.net/p/destroying-unknown-status-pod-in-openshift/</link>
      <pubDate>Fri, 17 May 2019 10:09:40 +1000</pubDate>
      <guid>https://blog.khmersite.net/p/destroying-unknown-status-pod-in-openshift/</guid>
      <description>&lt;p&gt;Here&amp;rsquo;s a quick tip to remove an OpenShift pod with &amp;ldquo;Unknown&amp;rdquo; status.&lt;/p&gt;
&lt;p&gt;Suppose this is the output when I run &lt;code&gt;oc get pods&lt;/code&gt;:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-console&#34; data-lang=&#34;console&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;~ ❯❯❯ oc get pods
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;NAME            READY     STATUS              RESTARTS   AGE
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;dothe-4-bjq8v   0/1       ContainerCreating   0          5h
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;dothe-4-ghttj   1/1       Unknown             0          15h
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#960050;background-color:#1e0010&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;~ ❯❯❯ oc delete pod dothe-4-ghttj
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;pod &amp;#34;dothe-4-ghttj&amp;#34; deleted
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;~ ❯❯❯ oc get pods
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;NAME            READY     STATUS              RESTARTS   AGE
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;dothe-4-bjq8v   0/1       ContainerCreating   0          5h
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;dothe-4-ghttj   1/1       Unknown             0          15h
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Let&amp;rsquo;s try deleting the bad pod again with &lt;code&gt;--force&lt;/code&gt; option:&lt;/p&gt;</description>
    </item>
    <item>
      <title>Fedora 30 Beta With ZFS Support</title>
      <link>https://blog.khmersite.net/p/fedora-30-beta-with-zfs/</link>
      <pubDate>Thu, 18 Apr 2019 19:18:30 +1000</pubDate>
      <guid>https://blog.khmersite.net/p/fedora-30-beta-with-zfs/</guid>
      <description>&lt;p&gt;Up until today, I have been running Fedora 29 with the kernel 4.9. The current version of the kernel on Fedora 29 is 5.0. However, I had to stick with the 4.20 version for a very long while due to a &lt;a href=&#34;https://blog.khmersite.net/2019/01/zfs-testing-on-fedora&#34;&gt;thing&lt;/a&gt; I did a short while back. So what is that thing? Well, at one point ZFS (stable) no stopped working with the new kernel on Fedora 29. At then, I had a choice to either keep running older version of the kernel or trying out the new version of ZFS (testing). I opped for the second option. When Fedora 29 bumped its kernel to 5.0, unfortunately, the testing ZFS didn&amp;rsquo;t support this version of the kernel.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Connect Bose QC35 to Fedora 29 Using i3</title>
      <link>https://blog.khmersite.net/p/connect-qc35-to-fedora-i3/</link>
      <pubDate>Mon, 18 Mar 2019 16:43:38 +1100</pubDate>
      <guid>https://blog.khmersite.net/p/connect-qc35-to-fedora-i3/</guid>
      <description>&lt;p&gt;I have a very nice pair of headphones Bose QC35 and would like to connect it to my laptop running Fedora 29. It&amp;rsquo;s normally quite easy to pair up the headphones and the laptop when running Gnome or KDE as the desktop environment. But, how to do this from a minimal tiling windows manager such as i3? In this post, I&amp;rsquo;m going briefly show how one can do that.&lt;/p&gt;
&lt;p&gt;First ensure that the &lt;strong&gt;bluetooth&lt;/strong&gt; service is running:&lt;/p&gt;</description>
    </item>
    <item>
      <title>New Firmware v1.05 Available for Sony Alpha 6500</title>
      <link>https://blog.khmersite.net/p/new-firmware-available-for-sony-alpha-6500/</link>
      <pubDate>Sat, 02 Mar 2019 23:47:20 +1100</pubDate>
      <guid>https://blog.khmersite.net/p/new-firmware-available-for-sony-alpha-6500/</guid>
      <description>&lt;p&gt;Unlike FujiFilm, Sony doesn&amp;rsquo;t often release updated firmware for its cameras. For that reason, I&amp;rsquo;m almost never bothered to check if there is new one available for my Sony Alpha 6500 (a6500).&lt;/p&gt;
&lt;p&gt;However, out of the blue, I decided to just have a quick look up and found out that Sony has release v1.05 firmware for the A6500 since February last year. The firmware on my camera was v1.04.&lt;/p&gt;
&lt;p&gt;The most notable updates for the v1.05 firmware includes:&lt;/p&gt;</description>
    </item>
    <item>
      <title>Install Ansible on Freebsd</title>
      <link>https://blog.khmersite.net/p/install-ansible-on-freebsd/</link>
      <pubDate>Thu, 21 Feb 2019 14:11:22 +1100</pubDate>
      <guid>https://blog.khmersite.net/p/install-ansible-on-freebsd/</guid>
      <description>&lt;p&gt;This post briefly explains how to install Ansible on a FreeBSD host.&lt;/p&gt;
&lt;p&gt;I&amp;rsquo;m going to install Ansible in a virtual environment using Python 3. (If you still use Python 2, it&amp;rsquo;s time to start migrating to Python 3 &lt;strong&gt;now&lt;/strong&gt;.)&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-console&#34; data-lang=&#34;console&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;$ sudo pkg install python36
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;$ mkdir ~/dev/python3-venv
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;$ python3 -m venv ~/dev/python3-venv/ansible
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Next, activate the Python venv (ansible), and start installing Ansible using &lt;code&gt;pip&lt;/code&gt;:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-console&#34; data-lang=&#34;console&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;$ source ~/dev/python3-venv/ansible
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;$ pip install ansible
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;You may or may not need to update &lt;strong&gt;pip&lt;/strong&gt; module as I did. In my case, Python complains that I have older version of pip. To update pip, just run:&lt;/p&gt;</description>
    </item>
    <item>
      <title>Install Lmod on Gentoo</title>
      <link>https://blog.khmersite.net/p/install-lmod-on-gentoo/</link>
      <pubDate>Tue, 19 Feb 2019 20:42:41 +1100</pubDate>
      <guid>https://blog.khmersite.net/p/install-lmod-on-gentoo/</guid>
      <description>&lt;p&gt;Lmod is not available in Gentoo&amp;rsquo;s portage. This blog post will document how I got Lmod installed on my Gentoo machine.&lt;/p&gt;
&lt;p&gt;First requirement is to install &lt;code&gt;lua&lt;/code&gt;. I picked lua 5.2 as I had problem when experimenting with Lua 5.1. To install &lt;code&gt;lua-5.2.3&lt;/code&gt; from portage, run:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-console&#34; data-lang=&#34;console&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;# emerge -av &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;dev-lang/lua-5.2.3
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;If you have multiple versions of Lua installed, make sure to select this lua 5.2.3 as the default version using &lt;code&gt;eselect&lt;/code&gt;:&lt;/p&gt;</description>
    </item>
    <item>
      <title>Autostart a KVM Domain</title>
      <link>https://blog.khmersite.net/p/kvm-autostart-a-domain/</link>
      <pubDate>Wed, 13 Feb 2019 10:55:04 +1100</pubDate>
      <guid>https://blog.khmersite.net/p/kvm-autostart-a-domain/</guid>
      <description>&lt;p&gt;Again this is a quick note to explain myself how to set a kvm (domain/vm) autostart when the server boots up.&lt;/p&gt;
&lt;p&gt;To list autostart domains:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-console&#34; data-lang=&#34;console&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;virsh list --autostart
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;To set a domian, e.g. &lt;code&gt;dhcp1&lt;/code&gt;, to autostart:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-console&#34; data-lang=&#34;console&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;virsh autostart dhcp1
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;To disable autostart for a domain (e.g. named &lt;code&gt;dhcp1&lt;/code&gt;):&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-console&#34; data-lang=&#34;console&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;virsh autostart dhcp1 --disable
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Ref:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;https://www.cyberciti.biz/faq/rhel-centos-linux-kvm-virtualization-start-virtual-machine-guest/&#34;&gt;KVM: Start a Virtual Machine / Guest At Boot Time&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;</description>
    </item>
    <item>
      <title>ZFS Testing on Fedora</title>
      <link>https://blog.khmersite.net/p/zfs-testing-on-fedora/</link>
      <pubDate>Thu, 31 Jan 2019 11:37:20 +1100</pubDate>
      <guid>https://blog.khmersite.net/p/zfs-testing-on-fedora/</guid>
      <description>&lt;p&gt;When Fedora release kernel 4.20.*, the ZFS 0.7.12 could no longer compiled. Accoriding to the &lt;a href=&#34;https://github.com/zfsonline/zfs/releases&#34;&gt;ZFS release page at Github&lt;/a&gt; zfs-0.7.12 is only compartible iwth kernels 2.6.32 - 4.19.&lt;/p&gt;
&lt;p&gt;At first I was going to just wait for the 0.8.0 release, and continue to use kernel 4.19. However, Fedora keeps releasing the updates of kernel 4.20. As of this writing, the current version of the kernel on Fedora 29 is 4.20.6-200. At the same time, zfs-0.8.0 is still not yet released.&lt;/p&gt;</description>
    </item>
    <item>
      <title>NVME Not Found on Boot With UEFI</title>
      <link>https://blog.khmersite.net/p/nvme-not-found-on-boot-uefi/</link>
      <pubDate>Thu, 17 Jan 2019 20:32:55 +1100</pubDate>
      <guid>https://blog.khmersite.net/p/nvme-not-found-on-boot-uefi/</guid>
      <description>&lt;p&gt;A quick note to remind myself how to get NVME recognized on Dell XPS 15 9570 on Gentoo.&lt;/p&gt;
&lt;p&gt;Make sure to add the kernel &lt;code&gt;BLK_DEV_NVME&lt;/code&gt; options.&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;NVM Express block device (BLK_DEV_NVME)
CONFIG_BLK_DEV_NVME:
The NVM Express driver is for solid state drives directly
connected to the PCI or PCI Express bus. If you know you
don&amp;#39;t have one of these, it is safe to answer N.
To compile this driver as a module, choose M here: the
module will be called nvme.
Symbol: BLK_DEV_NVME [=m]
Type : tristate
Prompt: NVM Express block device
Location:
-&amp;gt; Device Drivers
Defined at drivers/nvme/host/Kconfig:1
Depends on: PCI [=y] &amp;amp;&amp;amp; BLOCK [=y]
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Ref:&lt;/p&gt;</description>
    </item>
    <item>
      <title>How to Connect to Hidden Wifi Using nmcli</title>
      <link>https://blog.khmersite.net/p/how-to-connect-to-hidden-wifi-using-nmcli/</link>
      <pubDate>Tue, 15 Jan 2019 18:00:14 +1100</pubDate>
      <guid>https://blog.khmersite.net/p/how-to-connect-to-hidden-wifi-using-nmcli/</guid>
      <description>&lt;p&gt;Today I need to setup a wifi connection on a laptop to my home network with hidden SSID. Like so many things that I only have to do it once in a while, I couldn&amp;rsquo;t remember how to do it. So this blog post is something to remind me in the future should I need to do it agian.&lt;/p&gt;
&lt;p&gt;Here is one way to do it, thanks to this &lt;a href=&#34;https://stackoverflow.com/questions/35476428/how-to-connect-to-hidden-wifi-network-using-nmcli#&#34;&gt;Stack Overflow question&lt;/a&gt;. (Alternatively, check &lt;code&gt;man nmcli&lt;/code&gt; and &lt;code&gt;man nmcli-examples&lt;/code&gt; which have detailed information):&lt;/p&gt;</description>
    </item>
    <item>
      <title>Fix Dbus Daemon Autolaunch Was Disabled at Compile Time</title>
      <link>https://blog.khmersite.net/p/fix-dbus-daemon-autolaunch-was-disabled-at-compile-time/</link>
      <pubDate>Tue, 15 Jan 2019 15:03:36 +1100</pubDate>
      <guid>https://blog.khmersite.net/p/fix-dbus-daemon-autolaunch-was-disabled-at-compile-time/</guid>
      <description>&lt;p&gt;When I tried to run &lt;code&gt;notify-send&lt;/code&gt; on my laptop running Gentoo, it didn&amp;rsquo;t work and was given the following message:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-console&#34; data-lang=&#34;console&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;$ notify-send &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#39;hello&amp;#39;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Connecting to D-Bus failed: Using X11 for dbus-daemons autolaunch was disabled at compile time, set your DBUS_SESSION_BUS_ADDRESS instead
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;How do one set &lt;code&gt;DBUS_SESSION_BUS_ADDRESS&lt;/code&gt;? Accoridng to &lt;a href=&#34;https://stackoverflow.com/questions/41242460/how-to-export-dbus-session-bus-address&#34;&gt;this&lt;/a&gt;, it can be done by running:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-console&#34; data-lang=&#34;console&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;$ export &lt;span style=&#34;color:#66d9ef&#34;&gt;$(&lt;/span&gt;dbus-launch&lt;span style=&#34;color:#66d9ef&#34;&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;However, I want to also have D-Bus compiled with X11 support.&lt;/p&gt;
&lt;p&gt;First let&amp;rsquo;s verify if &lt;code&gt;D-Bus&lt;/code&gt; service is running:&lt;/p&gt;</description>
    </item>
    <item>
      <title>Upgrade Kernel on Gentoo</title>
      <link>https://blog.khmersite.net/p/upgrade-kernel-on-gentoo/</link>
      <pubDate>Mon, 14 Jan 2019 20:17:30 +1100</pubDate>
      <guid>https://blog.khmersite.net/p/upgrade-kernel-on-gentoo/</guid>
      <description>&lt;p&gt;Today I&amp;rsquo;m going to document how I built and installed kernel &lt;code&gt;4.20.1&lt;/code&gt; a Gentoo laptop, Dell XPS 15 9570.&lt;/p&gt;
&lt;p&gt;This blog post is not intended to be a tutorial or even a guide. I&amp;rsquo;m very new to Gentoo, and have been spoiled by Ubuntu and Fedora for not needing to compile my own kernel. :)&lt;/p&gt;
&lt;p&gt;Anyhow, it&amp;rsquo;s very likely that I&amp;rsquo;ll need to compile the kernel again on Gentoo, and therefore I think having some sorts of documents is better than nothing at all.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Gentoo Eix Tool</title>
      <link>https://blog.khmersite.net/p/gentoo-eix-tool/</link>
      <pubDate>Mon, 14 Jan 2019 19:52:29 +1100</pubDate>
      <guid>https://blog.khmersite.net/p/gentoo-eix-tool/</guid>
      <description>&lt;p&gt;A utility that I use quite a lot on a Gentoo system is called &lt;a href=&#34;https://wiki.gentoo.org/wiki/Eix&#34;&gt;eix&lt;/a&gt;. This tool allows me to search for packages by name and list all available flags.&lt;/p&gt;
&lt;p&gt;The &lt;a href=&#34;https://wiki.gentoo.org/wiki/Eix&#34;&gt;document&lt;/a&gt; on the Gentoo Wiki is great and has detailed explanation about it.&lt;/p&gt;
&lt;p&gt;In this blog post, I&amp;rsquo;m just going to write down what I did to get it installed.&lt;/p&gt;
&lt;p&gt;I want to set its flag to use &lt;code&gt;qlite&lt;/code&gt;.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-console&#34; data-lang=&#34;console&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;# echo &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#39;app-portage/eix sqlite&amp;#39;&lt;/span&gt; &amp;gt; /etc/portage/package.use/eix
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Then proced with the installation:&lt;/p&gt;</description>
    </item>
    <item>
      <title>How to remove Ctrl-M characters from files</title>
      <link>https://blog.khmersite.net/p/how-to-remove-ctrl-m-characters/</link>
      <pubDate>Sun, 06 Jan 2019 20:30:17 +1100</pubDate>
      <guid>https://blog.khmersite.net/p/how-to-remove-ctrl-m-characters/</guid>
      <description>&lt;p&gt;A short while back, after exporting my blog from WordPress to Hugo I noticed that there were some weird &lt;code&gt;^M&lt;/code&gt; characters in some files as shown in the following screenshot in blue.&lt;/p&gt;
&lt;p&gt;&lt;img alt=&#34;screenshot of text with ^M character&#34; loading=&#34;lazy&#34; src=&#34;https://blog.khmersite.net/post/2019/01/remove-ctrl-m.png&#34;&gt;&lt;/p&gt;
&lt;p&gt;This is a special character, &lt;code&gt;CTRL+M&lt;/code&gt; and can be removed using &lt;code&gt;sed&lt;/code&gt; or &lt;code&gt;vim&lt;/code&gt;. Using &lt;strong&gt;vim&lt;/strong&gt; we can replace/substitute a text with the following command:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-vim&#34; data-lang=&#34;vim&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;%&lt;span style=&#34;color:#a6e22e&#34;&gt;s&lt;/span&gt;&lt;span style=&#34;color:#e6db74&#34;&gt;/MATCH-TEXT/&lt;/span&gt;&lt;span style=&#34;color:#a6e22e&#34;&gt;WITH&lt;/span&gt;-&lt;span style=&#34;color:#a6e22e&#34;&gt;NEW&lt;/span&gt;-&lt;span style=&#34;color:#a6e22e&#34;&gt;TEXT&lt;/span&gt;/&lt;span style=&#34;color:#a6e22e&#34;&gt;g&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Therefore, we should be able to replace &lt;code&gt;^M&lt;/code&gt;, by typing &lt;code&gt;CTRL+V&lt;/code&gt; then &lt;code&gt;CTRL+M&lt;/code&gt;, with an empty space as so:&lt;/p&gt;</description>
    </item>
    <item>
      <title>Getting Started With Armadillo C&#43;&#43; Library</title>
      <link>https://blog.khmersite.net/p/getting-started-with-armadillo-cpp-library/</link>
      <pubDate>Tue, 01 Jan 2019 02:09:12 +1100</pubDate>
      <guid>https://blog.khmersite.net/p/getting-started-with-armadillo-cpp-library/</guid>
      <description>&lt;p&gt;Yesterday while I was running system update on my home desktop, I noticed the &lt;code&gt;armadillo&lt;/code&gt; 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.&lt;/p&gt;
&lt;p&gt;Upon looking it up, I found out that &lt;a href=&#34;http://arma.sourceforge.net/&#34;&gt;Armadillo&lt;/a&gt; is a C++ library for linear algebra. Coincidentally, I&amp;rsquo;ve been reviewing C++ during this end of year holiday. So it&amp;rsquo;s like a very good time to try this library out.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Compiling C&#43;&#43; Statically</title>
      <link>https://blog.khmersite.net/p/compiling-cpp-statically/</link>
      <pubDate>Mon, 24 Dec 2018 18:05:28 +1100</pubDate>
      <guid>https://blog.khmersite.net/p/compiling-cpp-statically/</guid>
      <description>&lt;p&gt;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.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Ansible Automation Exam EX407</title>
      <link>https://blog.khmersite.net/p/ansible-automation-exam-ex407/</link>
      <pubDate>Sat, 15 Dec 2018 21:18:44 +1100</pubDate>
      <guid>https://blog.khmersite.net/p/ansible-automation-exam-ex407/</guid>
      <description>&lt;p&gt;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.&lt;/p&gt;
&lt;p&gt;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&amp;rsquo;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.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Upgrading Freebsd 11.2 to 12.0-RELEASE</title>
      <link>https://blog.khmersite.net/p/upgrading-freebsd-11-2-to-12-0-release/</link>
      <pubDate>Wed, 12 Dec 2018 21:07:08 +1100</pubDate>
      <guid>https://blog.khmersite.net/p/upgrading-freebsd-11-2-to-12-0-release/</guid>
      <description>&lt;p&gt;&lt;img alt=&#34;bsdinfo&#34; loading=&#34;lazy&#34; src=&#34;https://blog.khmersite.net/post/2018/12/nas_freebsd_12.0_Screenshot_20181212_231118.png&#34; title=&#34;FreeBSD 12.0-RELEASE&#34;&gt;&lt;/p&gt;
&lt;p&gt;FreeBSD 12.0-RELEASE was released today, and that means it&amp;rsquo;s time to upgrade 2 of FreeBSD 11.2 machines to this latest version.&lt;/p&gt;
&lt;p&gt;One of my FreeBSD boxes is a desktop used at work, and the upgrade went well without any issues. In this post, I&amp;rsquo;m going to document how the upgrade is done on my nas server at home.&lt;/p&gt;
&lt;p&gt;First ensure that the FreeBSD is up to date:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-console&#34; data-lang=&#34;console&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;root@nas:~ # freebsd-update fetch
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;src component not installed, skipped
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Looking up update.FreeBSD.org mirrors... 2 mirrors found.
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Fetching metadata signature for 11.2-RELEASE from update1.freebsd.org... done.
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Fetching metadata index... done.
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Inspecting system... done.
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Preparing to download files... done.
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#960050;background-color:#1e0010&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;No updates needed to update system to 11.2-RELEASE-p6.
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Begin to perform the upgrade:&lt;/p&gt;</description>
    </item>
    <item>
      <title>Fix puppet-firewalld: puppet fails with unknown type of string error</title>
      <link>https://blog.khmersite.net/p/fix-puppet-firewalld-puppet-fails-with-unknown-type-of-string-error/</link>
      <pubDate>Tue, 18 Sep 2018 12:00:21 +0000</pubDate>
      <guid>https://blog.khmersite.net/p/fix-puppet-firewalld-puppet-fails-with-unknown-type-of-string-error/</guid>
      <description>&lt;p&gt;To manage firewalld on a desktop, I use the module created by Craig Dunn available at &lt;a href=&#34;https://github.com/crayfishx/puppet-firewalld&#34;&gt;https://github.com/crayfishx/puppet-firewalld&lt;/a&gt;. Recently, I came across this issue for the second time after restarting &lt;code&gt;puppetserver&lt;/code&gt;:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-console&#34; data-lang=&#34;console&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;# puppet agent -vt
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Info: Using configured environment &amp;#39;production&amp;#39;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Info: Retrieving pluginfacts
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Info: Retrieving plugin
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Info: Loading facts
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;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
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;            if value.keys.sort != %i[action type]
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;                                    ^ at /etc/puppetlabs/code/modules/firewalld/manifests/init.pp:135:7 on node mathtxx
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Warning: Not using cache on failed catalog
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Error: Could not retrieve catalog; skipping run
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Previously, the problem seem to disappear after awhile, and because I&amp;rsquo;ve been occupied with other tasks, I kinda forgot about it.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Becoming a Red Hat Certified Engineer</title>
      <link>https://blog.khmersite.net/p/becoming-a-red-hat-certified-engineer/</link>
      <pubDate>Thu, 13 Sep 2018 23:55:20 +0000</pubDate>
      <guid>https://blog.khmersite.net/p/becoming-a-red-hat-certified-engineer/</guid>
      <description>&lt;p&gt;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&amp;rsquo;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.&lt;/p&gt;
&lt;p&gt;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!&lt;/p&gt;</description>
    </item>
    <item>
      <title>Update ThinkPad X1 Carbon G6 BIOS Update on Fedora</title>
      <link>https://blog.khmersite.net/p/update-thinkpad-x1-carbon-g6-bios-update-on-fedora/</link>
      <pubDate>Thu, 13 Sep 2018 23:04:42 +0000</pubDate>
      <guid>https://blog.khmersite.net/p/update-thinkpad-x1-carbon-g6-bios-update-on-fedora/</guid>
      <description>&lt;p&gt;As a ThinkPad fan, I really like X1 Carbon (G6). I run Fedora 28 on it, and almost everything runs flawlessly. One issue that bothers me a lot is problem with suspend. The X1 Carbon G6 supports S0i3 instead of the S3. Without the S3, when the laptop is put to suspended, the battery continue to drain and sometimes the cpu fan keeps running.&lt;/p&gt;
&lt;p&gt;Fortunately, this issue has been recently addressed by Lenovo through firmware update. According to the &lt;a href=&#34;https://wiki.archlinux.org/index.php/Lenovo_ThinkPad_X1_Carbon_(Gen_6)&#34;&gt;wiki.archlinux.org&lt;/a&gt;, S3 can be enabled in BIOS from BIOS version 1.30 or newer.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Connect to a WPA2-Enterprise Connection Using nmcli</title>
      <link>https://blog.khmersite.net/p/connect-to-a-wpa2-enterprise-connection-using-nmcli/</link>
      <pubDate>Mon, 27 Aug 2018 14:11:38 +0000</pubDate>
      <guid>https://blog.khmersite.net/p/connect-to-a-wpa2-enterprise-connection-using-nmcli/</guid>
      <description>&lt;p&gt;This is like a re-post of a question from &lt;a href=&#34;https://askubuntu.com/questions/262491/connect-to-a-wpa2-enterprise-connection-via-cli-no-desktop&#34;&gt;askubuntu.com&lt;/a&gt;. To get to that post, I usually had to google it. So, I’ll post it here so I know where to look for when I need it again.&lt;/p&gt;
&lt;p&gt;At work, we use WPA2-Enterprise for wireless connection. To create a new connection on my laptop with &lt;code&gt;wlp3s0&lt;/code&gt; as Wifi device, follow this step:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;# nmcli con add type wifi ifname wlp3s0 con-name work-wifi ssid work-ssid

# nmcli con edit id work-wifi
nmcli&amp;gt; set ipv4.method auto
nmcli&amp;gt; set 802-1x.eap peap
nmcli&amp;gt; set 802-1x.phase2-auth mschapv2
nmcli&amp;gt; set 802-1x.identity myusername
nmcli&amp;gt; set 802-1x.password mypassword
nmcli&amp;gt; set wifi-sec.key-mgmt wpa-eap
nmcli&amp;gt; save
nmcli&amp;gt; activate
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;That’s it if you know how to do it.&lt;/p&gt;</description>
    </item>
    <item>
      <title>How to Generate SELinux Policy Manual Page</title>
      <link>https://blog.khmersite.net/p/how-to-generate-selinux-policy-manual-page/</link>
      <pubDate>Sun, 26 Aug 2018 23:21:33 +0000</pubDate>
      <guid>https://blog.khmersite.net/p/how-to-generate-selinux-policy-manual-page/</guid>
      <description>&lt;p&gt;It seems that by default, SELinux policy manpage is not available. Here’s how to make it available.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;First install &lt;code&gt;selinux-policy-devel&lt;/code&gt; package&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Then generate the man page by running:&lt;br&gt;
&lt;code&gt;# sepolicy manpage -a -p /usr/share/man/man8&amp;lt;br/&amp;gt;&lt;/code&gt;&lt;br&gt;
&lt;code&gt;-a&lt;/code&gt;  : all domains&lt;br&gt;
&lt;code&gt;-p&lt;/code&gt; : path to store the manpage (by default it’s /tmp)&lt;br&gt;
&lt;code&gt;/usr/share/man/man8&lt;/code&gt; – section 8 of manpage is for system admin command&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Create or update manual page index caches&lt;br&gt;
&lt;code&gt;# mandb&lt;/code&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Benefit&lt;br&gt;
&lt;code&gt;# man -k _selinux&lt;/code&gt; (or e.g. ”&lt;code&gt;man httpd_selinux&lt;/code&gt;“)&lt;/p&gt;</description>
    </item>
    <item>
      <title>RHEL Recovering the Root Password</title>
      <link>https://blog.khmersite.net/p/rhel-recovering-the-root-password/</link>
      <pubDate>Sun, 12 Aug 2018 14:24:05 +0000</pubDate>
      <guid>https://blog.khmersite.net/p/rhel-recovering-the-root-password/</guid>
      <description>&lt;p&gt;Early last year I started a blog &lt;a href=&#34;https://blog.khmersite.net/2017/02/rhcsas-prep/&#34;&gt;post&lt;/a&gt; about the preparation for Red Hat Certified System Administrator (RHCSA) exam. My intention back then was to have more posts follow suit about the exam topics. Like many things in life, things don&amp;rsquo;t always go according to plan. That was the only post, but I passed the RHCSA exam.&lt;/p&gt;
&lt;p&gt;Today, I&amp;rsquo;m going to start another new post about the preparation for the Red Hat Certified System Engineer (RHCSE) exam. I already booked an exam which is taking place on September 12. The exam is 3.5 hours long and cover a broader range than before.&lt;/p&gt;</description>
    </item>
    <item>
      <title>How to change shell in Fedora</title>
      <link>https://blog.khmersite.net/p/how-to-change-shell-in-fedora/</link>
      <pubDate>Mon, 23 Jul 2018 21:35:11 +0000</pubDate>
      <guid>https://blog.khmersite.net/p/how-to-change-shell-in-fedora/</guid>
      <description>&lt;p&gt;If your search engine take you to this page, chances are you get used to use &lt;code&gt;chsh&lt;/code&gt; to change user&amp;rsquo;s shell. On Fedora (28 at least), &lt;code&gt;chsh&lt;/code&gt; is not available by default. You can install &lt;code&gt;util-linux-user&lt;/code&gt; according to this &lt;a href=&#34;https://ask.fedoraproject.org/en/question/89601/chsh-command-is-missing-in-fedora-24-fresh-install/&#34;&gt;post&lt;/a&gt; to get the &lt;code&gt;chsh&lt;/code&gt; command.&lt;/p&gt;
&lt;p&gt;However, there is another alternative which I didn&amp;rsquo;t even think of - use &lt;code&gt;usermod&lt;/code&gt; command.&lt;/p&gt;
&lt;p&gt;Here&amp;rsquo;s how I did it to change to &lt;code&gt;zsh&lt;/code&gt; shell:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-console&#34; data-lang=&#34;console&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;$ sudo usermod -s /usr/bin/zsh kenno
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;$ getent passwd kenno
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;kenno:x:1000:1000:Oh Kenno:/home/kenno:/usr/bin/zsh
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Just log out and log back in. That&amp;rsquo;s it.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Changing the urxvt font size on the fly (take 2)</title>
      <link>https://blog.khmersite.net/p/changing-the-urxvt-font-size-on-the-fly-take-2/</link>
      <pubDate>Thu, 05 Jul 2018 21:31:24 +0000</pubDate>
      <guid>https://blog.khmersite.net/p/changing-the-urxvt-font-size-on-the-fly-take-2/</guid>
      <description>&lt;p&gt;A while back I posted &lt;a href=&#34;https://blog.khmersite.net/p/change-the-urxvt-font-size-on-the-fly/&#34;&gt;an instruction on how to change the font size in urxvt (terminal emulator) on the fly&lt;/a&gt;. In that post, I used a perl extension from &lt;a href=&#34;https://github.com/simmel/urxvt-resize-font&#34;&gt;https://github.com/simmel/urxvt-resize-font&lt;/a&gt;. Tonight, I tried to setup this extension on a brand new laptop running Fedora 28. For some reason, it doesn’t work at all. Luckily, I found another perl extension which works quite well.&lt;/p&gt;
&lt;p&gt;Here’s how I got it working on this Fedora 28, with Sway tiling windows manager (instead of i3 because I run Wayland with this Fedora 28).&lt;/p&gt;</description>
    </item>
    <item>
      <title>Upgrading my nas from FreeBSD 11.1-RELEASE to 11.2-RELEASE</title>
      <link>https://blog.khmersite.net/p/upgrading-my-nas-from-freebsd-11-1-release-to-11-2-release/</link>
      <pubDate>Sat, 30 Jun 2018 20:33:54 +0000</pubDate>
      <guid>https://blog.khmersite.net/p/upgrading-my-nas-from-freebsd-11-1-release-to-11-2-release/</guid>
      <description>&lt;p&gt;FreeBSD 11.2-RELEASE was released a few days ago. This means it’s time to upgrade the FreeBSD running on my nas.&lt;/p&gt;
&lt;p&gt;For the most part, this was all what I did:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;# freebsd-update -r 11.2-RELEASE upgrade
# freebsd-update install
# reboot
# freebsd-update install
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;&lt;img alt=&#34;screenshot&#34; loading=&#34;lazy&#34; src=&#34;https://blog.khmersite.net/wp-content/uploads/2018/06/bsdinfo_freebsd_11.2.png&#34;&gt;&lt;/p&gt;
&lt;p&gt;After it&amp;rsquo;s been upgraded, I also need to update the Zpool.&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;root@nas:~ # zpool status
  pool: zroot
 state: ONLINE
status: Some supported features are not enabled on the pool. The pool can
        still be used, but some features are unavailable.
action: Enable all features using &amp;#39;zpool upgrade&amp;#39;. Once this is done,
        the pool may no longer be accessible by software that does not support
        the features. See zpool-features(7) for details.
  scan: scrub repaired 0 in 0h0m with 0 errors on Tue Jan 23 23:54:42 2018
config:

        NAME        STATE     READ WRITE CKSUM
        zroot       ONLINE       0     0     0
          gpt/zfs0  ONLINE       0     0     0

errors: No known data errors
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Let&amp;rsquo;s upgrade the zpool &lt;code&gt;zroot&lt;/code&gt; as suggested:&lt;/p&gt;</description>
    </item>
    <item>
      <title>Playing movie with Dragon player on Fedora 28</title>
      <link>https://blog.khmersite.net/p/playing-movie-with-dragon-player-on-fedora-28/</link>
      <pubDate>Sun, 24 Jun 2018 22:52:56 +0000</pubDate>
      <guid>https://blog.khmersite.net/p/playing-movie-with-dragon-player-on-fedora-28/</guid>
      <description>&lt;p&gt;With fresh installation of Fedora 28 I wasn’t able to play any downloaded Japanese animations with the default movie player – Dragon player. My other machine which also runs Fedora 28 could play the movie fine. Without any doubts I must have installed some additional codecs on that machine. But which codecs? Like last time, Google I must search.&lt;/p&gt;
&lt;p&gt;&lt;img loading=&#34;lazy&#34; src=&#34;https://blog.khmersite.net/wp-content/uploads/2018/06/Screenshot_20180624_224856.png&#34;&gt;&lt;/p&gt;
&lt;p&gt;I’m going to write this post so I wouldn’t have to repeatedly search for the same solution.&lt;/p&gt;</description>
    </item>
    <item>
      <title>How to reload tmux config</title>
      <link>https://blog.khmersite.net/p/how-to-reload-tmux-config/</link>
      <pubDate>Fri, 22 Jun 2018 15:58:05 +0000</pubDate>
      <guid>https://blog.khmersite.net/p/how-to-reload-tmux-config/</guid>
      <description>&lt;p&gt;To reload tmux&amp;rsquo;s config without quitting and starting it again, we can hit &lt;code&gt;Ctrl + B&lt;/code&gt; then &lt;code&gt;:&lt;/code&gt;. Once the we get the prompt just run:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;:source-file ~/.tmux.conf
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Ref: &lt;a href=&#34;https://sanctum.geek.nz/arabesque/reloading-tmux-config/&#34;&gt;https://sanctum.geek.nz/arabesque/reloading-tmux-config/&lt;/a&gt;&lt;/p&gt;</description>
    </item>
    <item>
      <title>Install MATE Desktop on CentOS 7</title>
      <link>https://blog.khmersite.net/p/install-mate-desktop-on-centos-7/</link>
      <pubDate>Wed, 13 Jun 2018 01:26:00 +0000</pubDate>
      <guid>https://blog.khmersite.net/p/install-mate-desktop-on-centos-7/</guid>
      <description>&lt;p&gt;Tonight I started to review the learning material for Red Hat System Administration III to prepare for RHCSE exam. I need a machine with GUI, and all my CentOS 7 VMs are headless. So let’s install the GUI on it, shall I?&lt;/p&gt;
&lt;p&gt;First install &lt;code&gt;epel&lt;/code&gt; repo, if it’s not yet installed:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;# yum install epel-release -y
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Then install the 2 groups:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;# yum groupinstall &amp;#34;X Window system&amp;#34; -y
# yum groupinstall &amp;#34;MATE Desktop&amp;#34; -y
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Tip, if “I” can’t remember the names of the groups, I can run this command to list all available groups:&lt;/p&gt;</description>
    </item>
    <item>
      <title>How to set timezone in FreeBSD 12.0</title>
      <link>https://blog.khmersite.net/p/how-to-set-timezone-in-freebsd-12-0/</link>
      <pubDate>Mon, 28 May 2018 17:11:37 +0000</pubDate>
      <guid>https://blog.khmersite.net/p/how-to-set-timezone-in-freebsd-12-0/</guid>
      <description>&lt;p&gt;FreeBSD 12.0 install media :20180208 misses a lot of timezone file. E.g. it doesn’t have &lt;code&gt;/usr/share/zoneinfo/Australia/Sydney&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;Ensure: &lt;code&gt;zoneinfo&lt;/code&gt; package is installed.&lt;/p&gt;
&lt;p&gt;Then run:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;# tzsetup
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;And confirm: Fri Feb 16 00:19:48 AEDT 2018&lt;/p&gt;</description>
    </item>
    <item>
      <title>Where is the Startup folder in Windows 10?</title>
      <link>https://blog.khmersite.net/p/where-is-the-startup-folder-in-windows-10/</link>
      <pubDate>Wed, 23 May 2018 10:18:08 +0000</pubDate>
      <guid>https://blog.khmersite.net/p/where-is-the-startup-folder-in-windows-10/</guid>
      <description>&lt;p&gt;Here’s one way to locate it:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Click on the Windows Start Menu icon. Type “Run”, and click on Run (Desktop App).&lt;/li&gt;
&lt;li&gt;Then, when the Run dialog box presents, just enter &lt;code&gt;shell:common startup&lt;/code&gt; and hit the Enter key&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Ref: http://www.thewindowsclub.com/startup-folder-in-windows-8&lt;/p&gt;</description>
    </item>
    <item>
      <title>Fix: VirtualBox installation fails on macOS High Sierra 10.13.4</title>
      <link>https://blog.khmersite.net/p/fix-virtualbox-installation-fails-on-macos-high-sierra-10-13-4/</link>
      <pubDate>Tue, 08 May 2018 11:12:27 +0000</pubDate>
      <guid>https://blog.khmersite.net/p/fix-virtualbox-installation-fails-on-macos-high-sierra-10-13-4/</guid>
      <description>&lt;p&gt;Just a quick note to remind myself how I fixed the problem installing VirtualBox 5.2.10 on a Mac laptop running 10.13.4.&lt;/p&gt;
&lt;p&gt;The installation seemed to go well until it reached the end and reported failing to install. I’ve had this issues for a few weeks already and Google for solution seems to have hit and missed until today. I finally found a solution posted here: &lt;a href=&#34;https://github.com/docksal/docksal/issues/417&#34;&gt;https://github.com/docksal/docksal/issues/417&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Basically, I need to go the System Preferences and tick the box to allow ‘System software from developer “Oracle America, Inc.” was block from loading’.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Make Github code viewer more pleasant on Firefox on FreeBSD</title>
      <link>https://blog.khmersite.net/p/make-github-code-viewer-more-pleasant-on-firefox-on-freebsd/</link>
      <pubDate>Sun, 22 Apr 2018 13:56:08 +0000</pubDate>
      <guid>https://blog.khmersite.net/p/make-github-code-viewer-more-pleasant-on-firefox-on-freebsd/</guid>
      <description>&lt;p&gt;Ever since I have FreeBSD 12 installed on a spare laptop, I notice that this is the most frequently used portable machine at home. (Of course, I still use my main desktop, which runs Fedoda 27, for everything.) I think one of the main reasons is that I like the experiences when I started using Linux years ago – not everything works out of the box, and sometimes I’m forced to learn and understand better about an issue before it can be fixed.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Ansible 2.5.0 { &#34;changed&#34;: false, &#34;cmd&#34;: &#34;None -s system-product-name&#34;, &#34;msg&#34;: &#34;[Errno 2] No such file or directory</title>
      <link>https://blog.khmersite.net/p/ansible-2-5-0-changed-false-cmd-none-s-system-product-name-msg-errno-2-no-such-file-or-directory/</link>
      <pubDate>Sat, 31 Mar 2018 21:15:48 +0000</pubDate>
      <guid>https://blog.khmersite.net/p/ansible-2-5-0-changed-false-cmd-none-s-system-product-name-msg-errno-2-no-such-file-or-directory/</guid>
      <description>&lt;p&gt;I just updated Ansible to version 2.5.0 tonight, and I came across this issue when I tried to run a playbook for an Ubuntu 16.04 machine:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-console&#34; data-lang=&#34;console&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;PLAY [Ansible Playbook for configuring odroid.***.com] ***************************************************************************************
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#960050;background-color:#1e0010&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;TASK [Gathering Facts] *****************************************************************************************************************************
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;fatal: [odroid.***.com]: FAILED! =&amp;gt; {&amp;#34;changed&amp;#34;: false, &amp;#34;cmd&amp;#34;: &amp;#34;None -s system-product-name&amp;#34;, &amp;#34;msg&amp;#34;: &amp;#34;[Errno 2] No such file or directory: &amp;#39;None&amp;#39;&amp;#34;, &amp;#34;rc&amp;#34;: 2}
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;According to the &lt;a href=&#34;https://github.com/ansible/ansible/issues/37911&#34;&gt;issue #37911&lt;/a&gt;, the remote system doesn’t have the &lt;code&gt;dmidecode&lt;/code&gt; package installed. This is true in my case, and it can be verified as the following:&lt;/p&gt;</description>
    </item>
    <item>
      <title>Automount External Drive on OS X</title>
      <link>https://blog.khmersite.net/p/automount-external-drive-on-os-x/</link>
      <pubDate>Thu, 22 Mar 2018 23:37:36 +0000</pubDate>
      <guid>https://blog.khmersite.net/p/automount-external-drive-on-os-x/</guid>
      <description>&lt;p&gt;At work, we want to backup an external disk that&amp;rsquo;s connected to the Mac machine using rsnapshot. In order to do that, the external drive needs to be mounted, and this happens when a user logs in to the Mac. The problem is that when nobody logs in, the external drive is not mounted and rsnapshot will fail.&lt;/p&gt;
&lt;p&gt;The fix should be easy if there is away to mount the external drive without a user logs in. It turns out that on OS X (tested on High Sierra) we can set a flag to have the external drives get mounted when the Mac boots up.&lt;/p&gt;</description>
    </item>
    <item>
      <title>How to change FreeBSD Firefox user agent</title>
      <link>https://blog.khmersite.net/p/how-to-change-freebsd-firefox-user-agent/</link>
      <pubDate>Tue, 13 Mar 2018 17:50:15 +0000</pubDate>
      <guid>https://blog.khmersite.net/p/how-to-change-freebsd-firefox-user-agent/</guid>
      <description>&lt;p&gt;This laptop runs FreeBSD 12.0 current. The version of the installed Firefox is 59, which is pretty new isn’t it? Well, that’s not new or good enough to browse outlook.office365.com email. What happened is that, the Outlook web based email would just automatically switch to class Outlook web access. This problem is not unique to Outlook email, even some work related websites refuse to load correctly on Firefox running FreeBSD.&lt;/p&gt;</description>
    </item>
    <item>
      <title>How to extend ZFS partition</title>
      <link>https://blog.khmersite.net/p/how-to-extend-zfs-partition/</link>
      <pubDate>Sun, 11 Mar 2018 11:37:07 +0000</pubDate>
      <guid>https://blog.khmersite.net/p/how-to-extend-zfs-partition/</guid>
      <description>&lt;p&gt;I have a FreeBSD server which used to run of a smaller SSD drive. When replaced with a larger capacity SSD by using &lt;code&gt;dd&lt;/code&gt; command to clone the disk, there is free space allocated. I want to extend the existing &lt;code&gt;zroot&lt;/code&gt; pool to use this space. The following describes how I achieve this with the help of a forum &lt;a href=&#34;https://forums.freebsd.org/threads/extend-zfs-partition.55964/&#34;&gt;post&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Let&amp;rsquo;s list some information about the &lt;code&gt;zroot&lt;/code&gt; pool:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-console&#34; data-lang=&#34;console&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;root@nas:~ # zfs list zroot
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;NAME    USED  AVAIL  REFER  MOUNTPOINT
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;zroot  4.88G  50.8G   144K  none
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;List the partition scheme of the drive I&amp;rsquo;d like to extend my &lt;code&gt;zroot&lt;/code&gt; zpool with:&lt;/p&gt;</description>
    </item>
    <item>
      <title>SELinux is preventing mpd from getattr access on the directory /root/.config.</title>
      <link>https://blog.khmersite.net/p/selinux-is-preventing-mpd-from-getattr-access-on-the-directory-root-config/</link>
      <pubDate>Fri, 02 Mar 2018 00:04:21 +0000</pubDate>
      <guid>https://blog.khmersite.net/p/selinux-is-preventing-mpd-from-getattr-access-on-the-directory-root-config/</guid>
      <description>&lt;p&gt;What? Why does &lt;strong&gt;mpd&lt;/strong&gt; want to access &lt;code&gt;/root/.config&lt;/code&gt;? What’s MPD? It’s a daemon for playing music. It runs as a service, which I connect to with either &lt;code&gt;ncmp&lt;/code&gt; or &lt;code&gt;ncmpcpp&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;Here’s the full SETroubleshoot detail:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;SELinux is preventing mpd from getattr access on the directory /root/.config.

*****  Plugin catchall (100. confidence) suggests   **************************

If you believe that mpd should be allowed getattr access on the .config directory by default.
Then you should report this as a bug.
You can generate a local policy module to allow this access.
Do
allow this access for now by executing:
# ausearch -c &amp;#39;mpd&amp;#39; --raw | audit2allow -M my-mpd
# semodule -X 300 -i my-mpd.pp

Additional Information:
Source Context                system_u:system_r:mpd_t:s0
Target Context                unconfined_u:object_r:config_home_t:s0
Target Objects                /root/.config [ dir ]
Source                        mpd
Source Path                   mpd
Port                          
Host                          watamem.local
Source RPM Packages           
Target RPM Packages           
Policy RPM                    selinux-policy-3.13.1-283.26.fc27.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     watamem.local
Platform                      Linux watamem.local 4.15.4-300.fc27.x86_64
                              #1 SMP Mon Feb 19 23:31:15 UTC 2018 x86_64 x86_64
Alert Count                   2
First Seen                    2018-03-01 19:37:10 AEDT
Last Seen                     2018-03-01 19:40:15 AEDT
Local ID                      95638a12-2d84-4060-9339-8f05c61c619e

Raw Audit Messages
type=AVC msg=audit(1519893615.831:1060): avc:  denied  { getattr } for  pid=23997 comm=&amp;#34;mpd&amp;#34; path=&amp;#34;/root/.config&amp;#34; dev=&amp;#34;dm-0&amp;#34; ino=1703951 scontext=system_u:system_r:mpd_t:s0 tcontext=unconfined_u:object_r:config_home_t:s0 tclass=dir permissive=0


Hash: mpd,mpd_t,config_home_t,dir,getattr
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;The version of MPD that causes this issue is: 0.20.10 on Fedora 27. I’m pretty sure it was working last week and I didn’t have to do anything. So what’s changed? Well, it seems like this could be a very old problem as reported int bug &lt;a href=&#34;https://bugzilla.redhat.com/show_bug.cgi?id=1325502&#34;&gt;1325502&lt;/a&gt;. Basically, when &lt;code&gt;mpd&lt;/code&gt; is started, it tries to read the MPD configuration file (&lt;code&gt;mpd.conf&lt;/code&gt;). According to the man page for &lt;code&gt;mpd.conf&lt;/code&gt;, the configuration file should be read in the following order:&lt;/p&gt;</description>
    </item>
    <item>
      <title>FreeBSD 12 : Can&#39;t update packages size mismatch</title>
      <link>https://blog.khmersite.net/p/freebsd-12-cant-update-packages-size-mismatch/</link>
      <pubDate>Thu, 15 Feb 2018 23:10:26 +0000</pubDate>
      <guid>https://blog.khmersite.net/p/freebsd-12-cant-update-packages-size-mismatch/</guid>
      <description>&lt;p&gt;It’s another night with another FreeBSD problem. Well, I could just use Linux like Ubuntu or Void, but then things would just work. Where is the fun? 😉&lt;/p&gt;
&lt;p&gt;So, I’ve been having problem with upgrading or installing new binary packages on a machine running FreeBSD 12.0 for a few days now.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-console&#34; data-lang=&#34;console&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;root@vansota:~ # pkg upgrade
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Updating FreeBSD repository catalogue...
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;FreeBSD repository is up to date.
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;All repositories are up to date.
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Checking for upgrades (13 candidates): 100%
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Processing candidates (13 candidates): 100%
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;The following 6 package(s) will be affected (of 0 checked):
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#960050;background-color:#1e0010&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;New packages to be INSTALLED:
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;	p5-Locale-gettext: 1.07
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#960050;background-color:#1e0010&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Installed packages to be REINSTALLED:
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;	xorg-server-1.18.4_6,1 (needed shared library changed)
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;	xf86-input-synaptics-1.9.0 (options changed)
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;	texinfo-6.5,1 (options changed)
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;	m4-1.4.18,1 (options changed)
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;	help2man-1.47.5 (options changed)
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#960050;background-color:#1e0010&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Number of packages to be installed: 1
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Number of packages to be reinstalled: 5
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#960050;background-color:#1e0010&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;The process will require 2 MiB more space.
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;3 MiB to be downloaded.
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#960050;background-color:#1e0010&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Proceed with this action? [y/N]: y
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;[1/6] Fetching xorg-server-1.18.4_6,1.txz: 100%    1 MiB 184.0kB/s    00:08    
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;pkg: cached package xorg-server-1.18.4_6,1: size mismatch, fetching from remote
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;[2/6] Fetching xorg-server-1.18.4_6,1.txz:  18%  272 KiB 180.2kB/s    00:08 ETA
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;First I&amp;rsquo;d thought it was just some FreeBSD mirrors were out of sync of each others. This happens quite frequently with Ubuntu mirrors. Usually, we give it a bit of time and the problem will fix itself.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Fix: Fail running Firefox on FreeBSD without D-Bus running</title>
      <link>https://blog.khmersite.net/p/fix-fail-running-firefox-on-freebsd-without-d-bus-running/</link>
      <pubDate>Sun, 11 Feb 2018 17:15:08 +0000</pubDate>
      <guid>https://blog.khmersite.net/p/fix-fail-running-firefox-on-freebsd-without-d-bus-running/</guid>
      <description>&lt;p&gt;This weekend I replaced Kubuntu 16.04 with FreeBSD 12 on an old HP laptop. I came across with lots of problems, but mainly because I wanted to have some experiences with UEFI and GPT.&lt;/p&gt;
&lt;p&gt;Anyway, currently the laptop is running FreeBSD 12-current with i3 as the windows manager. After Firefox was installed, I ran it from the menu (rofi) and nothing appeared. So I ran it from a terminal instead. Here was the output:&lt;/p&gt;</description>
    </item>
    <item>
      <title>Create a FreeBSD install disk with dd on OS X</title>
      <link>https://blog.khmersite.net/p/create-a-freebsd-install-disk-with-dd-on-os-x/</link>
      <pubDate>Fri, 09 Feb 2018 22:23:20 +0000</pubDate>
      <guid>https://blog.khmersite.net/p/create-a-freebsd-install-disk-with-dd-on-os-x/</guid>
      <description>&lt;p&gt;I need to create a bootable FreeBSD install disk and the downloaded file happened to be on a Mac laptop. Since OS X is based on BSD, it also comes with &lt;code&gt;dd&lt;/code&gt; utility.&lt;/p&gt;
&lt;p&gt;After a USB is inserted, I need to identify the disk. This can be done using &lt;code&gt;diskutil&lt;/code&gt; command:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;$ sudo diskutil list
/dev/disk0 (internal):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      GUID_partition_scheme                         251.0 GB   disk0
   1:                        EFI EFI                     314.6 MB   disk0s1
   2:                 Apple_APFS Container disk1         250.7 GB   disk0s2
/dev/disk1 (synthesized):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      APFS Container Scheme -                      +250.7 GB   disk1
                                 Physical Store disk0s2
   1:                APFS Volume Macintosh HD            98.6 GB    disk1s1
   2:                APFS Volume Preboot                 21.4 MB    disk1s2
   3:                APFS Volume Recovery                509.8 MB   disk1s3
   4:                APFS Volume VM                      3.2 GB     disk1s4
/dev/disk2 (external, physical):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:     Apple_partition_scheme                        *2.1 GB     disk2
   1:        Apple_partition_map                         4.1 KB     disk2s1
   2:                  Apple_HFS                         2.4 MB     disk2s2
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;From the above output, the USB drive is &lt;code&gt;/dev/disk2&lt;/code&gt;. Now, I can use &lt;code&gt;dd&lt;/code&gt; to copy the image file to the USB drive using the following command:&lt;/p&gt;</description>
    </item>
    <item>
      <title>MySQL server has gone away &amp;#8211; how to get it back</title>
      <link>https://blog.khmersite.net/p/mysql-server-has-gone-away-how-to-get-it-back/</link>
      <pubDate>Thu, 08 Feb 2018 15:56:47 +0000</pubDate>
      <guid>https://blog.khmersite.net/p/mysql-server-has-gone-away-how-to-get-it-back/</guid>
      <description>&lt;p&gt;Has MySQL/MariaDB server ever run away from you? If it hasn’t, you’re lucky or you’re likely to use PostgreSQL instead.&lt;/p&gt;
&lt;p&gt;Today I’m trying to restore a database from backup (database dump) onto a new MariaDB server. This is what happened:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;# mysql -u db_user -p db4 &amp;amp;lt; db4-4.4.2_02-08-2018.sql
Enter password:
ERROR 2006 (HY000) at line 354: MySQL server has gone away
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;The database size is 1.7G, and this should not surprised a database administrator. But it did surprise me because: firstly I’m not a db admin, and secondly I had this issue before just a few weeks ago. So here is a blog post to make sure I won’t forget it for the 3rd time. Basically, I just need to increase the &lt;code&gt;max_allowed_packet&lt;/code&gt; size from the default 16MB to something bigger. I chose 128MB.&lt;/p&gt;</description>
    </item>
    <item>
      <title>FreeBSD Recover GTP Table</title>
      <link>https://blog.khmersite.net/p/freebsd-recover-gtp-table/</link>
      <pubDate>Sat, 03 Feb 2018 22:30:18 +0000</pubDate>
      <guid>https://blog.khmersite.net/p/freebsd-recover-gtp-table/</guid>
      <description>&lt;p&gt;Recently one of my servers that runs FreeBSD 11.1 keeps hanging on boot. Usually, the 2nd hard reboot will fix it. The root file system on this server is using ZFS and the ZFS pool report it as healthy.&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;nas:~ # zpool status                                                                                                [136/462]
  pool: zroot                                                                                                                     
 state: ONLINE                                                                                                                    
  scan: scrub repaired 0 in 0h0m with 0 errors on Tue Jan 23 23:54:42 2018                                                        
config:                                                                                                                           
                                                                                                                                  
        NAME        STATE     READ WRITE CKSUM                                                                                    
        zroot       ONLINE       0     0     0                                                                                    
          gpt/zfs0  ONLINE       0     0     0                                                                                    
                                                                                                                                  
errors: No known data errors                                        
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;So I’ve been reluctant to do anything about it. Until tonight, when I accidentally list the partition of that drive (&lt;code&gt;ada4&lt;/code&gt;):&lt;/p&gt;</description>
    </item>
    <item>
      <title>Blacklisting Local Disk from Multipath</title>
      <link>https://blog.khmersite.net/p/blacklisting-local-disk-from-multipath/</link>
      <pubDate>Sun, 28 Jan 2018 23:43:03 +0000</pubDate>
      <guid>https://blog.khmersite.net/p/blacklisting-local-disk-from-multipath/</guid>
      <description>&lt;p&gt;In my previous post, I wrote about my quest to identify a disk presented by the Dell server itself. At the end of the post, I mentioned that I should be able to resume with creating a LVM volume on the new disk. LVM stands for Logical Volume Management. There is a good tutorial available at this page if you’re interested in – &lt;a href=&#34;https://www.digitalocean.com/community/tutorials/how-to-use-lvm-to-manage-storage-devices-on-ubuntu-16-04&#34;&gt;How To Use LVM To Manage Storage Devices on Ubuntu 16.04&lt;/a&gt;.&lt;/p&gt;</description>
    </item>
    <item>
      <title>How to identify a disk on a Dell server</title>
      <link>https://blog.khmersite.net/p/how-to-identify-a-disk-on-a-dell-server/</link>
      <pubDate>Wed, 24 Jan 2018 13:37:14 +0000</pubDate>
      <guid>https://blog.khmersite.net/p/how-to-identify-a-disk-on-a-dell-server/</guid>
      <description>&lt;p&gt;&lt;img loading=&#34;lazy&#34; src=&#34;https://blog.khmersite.net/wp-content/uploads/2018/01/dell_r370_idrac.png&#34;&gt;&lt;/p&gt;
&lt;p&gt;I have a Dell R730 server at work, which connects to a back-end storage with optical fiber cables. In addition, the server itself also has 6 disks. Two of the disks have already been configured as RAID1 and has the operating system installed on it.&lt;/p&gt;
&lt;p&gt;Today, I want to configure the remaining 4 disks as RAID10, and setup logical volume on it. The first part was easy. All I had to do was to login to the Integrated Dell Remote Access Controller (iDRAC), and create a new Virtual Disk from the 4 physical disks. The second part is a bit tricky. As the server is connected to the stroage server, it sees a lot of disks.&lt;/p&gt;</description>
    </item>
    <item>
      <title>How to find the motherboard model on Windows 10</title>
      <link>https://blog.khmersite.net/p/how-to-find-the-motherboard-model-on-windows-10/</link>
      <pubDate>Sun, 14 Jan 2018 19:59:50 +0000</pubDate>
      <guid>https://blog.khmersite.net/p/how-to-find-the-motherboard-model-on-windows-10/</guid>
      <description>&lt;p&gt;&lt;img loading=&#34;lazy&#34; src=&#34;https://blog.khmersite.net/wp-content/uploads/2018/01/motherboard_info_on_windows.png&#34;&gt;&lt;/p&gt;
&lt;p&gt;To find the motherboard model number on Windows (10), run &lt;code&gt;cmd&lt;/code&gt;, and type:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;C:\Users\kenno&amp;gt;wmic baseboard get product,Manufacturer,version,serialnumber
Manufacturer                   Product         SerialNumber            Version
Gigabyte Technology Co., Ltd.  Z170N-Gaming 5  To be filled by O.E.M.  x.x
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Ref &amp;amp; credit: &lt;a href=&#34;http://windowsreport.com/computer-motherboard-serial-number-windows-10/&#34;&gt;How to Find Computer and Motherboard Model Serial Number on Windows 10&lt;/a&gt;&lt;/p&gt;</description>
    </item>
    <item>
      <title>How to set system locale on Ubuntu 16.04</title>
      <link>https://blog.khmersite.net/p/how-to-set-system-locale-on-ubuntu-16-04/</link>
      <pubDate>Sun, 31 Dec 2017 12:03:48 +0000</pubDate>
      <guid>https://blog.khmersite.net/p/how-to-set-system-locale-on-ubuntu-16-04/</guid>
      <description>&lt;p&gt;TLDR; just follow this &lt;a href=&#34;https://www.server-world.info/en/note?os=Ubuntu_16.04&amp;amp;p=locale&#34;&gt;guide&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;At home I run DHCP and DNS servers on Odroid U3, a system on a chip (SoC) computer. This allows me to have lots of control over my home network and most importantly – fun. I also run some web sites and Postgresql databases for testing purposes.&lt;/p&gt;
&lt;p&gt;The SoC computer runs Ubuntu 16.04 as the operating system. Recently, the Odroid U3 died.&lt;/p&gt;
&lt;p&gt;&lt;img loading=&#34;lazy&#34; src=&#34;https://blog.khmersite.net/wp-content/uploads/2017/12/odroid_u3_20171225_230233.jpg&#34;&gt;&lt;/p&gt;
&lt;p&gt;A coworker also has an SoC, an Odroid XU4. But, he found no use of it so I bought it off him at a very good price. This new SoC will replace the Odroid U3.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Change the urxvt font size on the fly</title>
      <link>https://blog.khmersite.net/p/change-the-urxvt-font-size-on-the-fly/</link>
      <pubDate>Sun, 24 Dec 2017 13:42:48 +0000</pubDate>
      <guid>https://blog.khmersite.net/p/change-the-urxvt-font-size-on-the-fly/</guid>
      <description>&lt;p&gt;urxvt or unicode-rxvt is a terminal simulator like Gnome-terminal or Konsole. Recently I’m trying to switch to use i3 (i3-gaps), a tiling windows manager, and urxvt is good compliment to i3.&lt;/p&gt;
&lt;p&gt;Unlike Gnome-terminal or Konsole, the font name and size for urxvt are configured in ~/.Xresources. To make change to font size, for example, I’d edit ~/.Xresources, reload it with &lt;code&gt;xrdb ~/.Xresources&lt;/code&gt;, and finally close and re-open urxvt itself. Though there is no built-in function to allow changing font size on the fly, urxvt allows us to do this via extensions.&lt;/p&gt;</description>
    </item>
    <item>
      <title>ZFS on Linux is now available for Fedora 27</title>
      <link>https://blog.khmersite.net/p/zfs-on-linux-is-now-available-for-fedora-27/</link>
      <pubDate>Tue, 19 Dec 2017 00:34:26 +0000</pubDate>
      <guid>https://blog.khmersite.net/p/zfs-on-linux-is-now-available-for-fedora-27/</guid>
      <description>&lt;p&gt;My main machine at home has been upgraded from Fedora 26 to 27 since the day the 27 was released. Everything has been working great, except the ZFS file system. I’m a ZFS-believer and I store my important files on ZFS-based storage.&lt;/p&gt;
&lt;p&gt;For a while there was no repository for Fedora 27 provided by zfsonlinux, until 6 days ago.&lt;/p&gt;
&lt;p&gt;&lt;img loading=&#34;lazy&#34; src=&#34;https://blog.khmersite.net/wp-content/uploads/2017/12/Screenshot-from-2017-12-19-01-31-14.png&#34;&gt;&lt;/p&gt;
&lt;p&gt;I have been using packages provided for Fedora 26 as work around solution. If you’ve been using the ZFS packages for Fedora 26, you can upgrade to the ones for Fedora 27 now.&lt;/p&gt;</description>
    </item>
    <item>
      <title>How to remove a copr repository in Fedora</title>
      <link>https://blog.khmersite.net/p/how-to-remove-a-copr-repository-in-fedora/</link>
      <pubDate>Mon, 11 Dec 2017 09:56:45 +0000</pubDate>
      <guid>https://blog.khmersite.net/p/how-to-remove-a-copr-repository-in-fedora/</guid>
      <description>&lt;p&gt;This is just a quick note to remind myself how to remove a Copr repository. What’s a Copr?&lt;/p&gt;
&lt;p&gt;“Copr (Cool Other Package Repo) is a Fedora project to help make building and managing third party package repositories easy.” – &lt;a href=&#34;https://fedoraproject.org/wiki/Category:Copr&#34;&gt;https://fedoraproject.org/wiki/Category:Copr&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Why do I want to remove it? One of the Copr repo I added a while back seemed to be no longer working, so I wanted to remove it.&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;# dnf update --refresh
Failed to synchronize cache for repo &amp;#39;tcg-themes&amp;#39;, disabling.
Last metadata expiration check: 0:00:00 ago on Fri 08 Dec 2017 11:12:45 AM AEDT.
Dependencies resolved.
Nothing to do.
Complete!
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;To list all repos on Fedora (27):&lt;/p&gt;</description>
    </item>
    <item>
      <title>How to unban IP from PF firewall</title>
      <link>https://blog.khmersite.net/p/how-to-unban-ip-from-pf-firewall/</link>
      <pubDate>Fri, 17 Nov 2017 13:26:49 +0000</pubDate>
      <guid>https://blog.khmersite.net/p/how-to-unban-ip-from-pf-firewall/</guid>
      <description>&lt;p&gt;This post is probably more relevant to my use case of PF firewall running on FreeBSD 11.1, and I need to remind myself how to unblock an IP from the block list.&lt;/p&gt;
&lt;p&gt;Here&amp;rsquo;s a snippet of what&amp;rsquo;s in &lt;code&gt;/etc/pf.conf&lt;/code&gt;:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-console&#34; data-lang=&#34;console&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;table persist
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#960050;background-color:#1e0010&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;# Don&lt;span style=&#34;color:#960050;background-color:#1e0010&#34;&gt;&amp;#39;&lt;/span&gt;t send rejections. Just drop.
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;set block-policy drop
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#960050;background-color:#1e0010&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;# Exempt the loopback interface to prevent services utilizing the
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;# local loop from being blocked accidentally.
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;set skip on lo0
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#960050;background-color:#1e0010&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;# all incoming traffic on external interface is normalized and fragmented
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;# packets are reassembled.
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;scrub in on $ext_if all fragment reassemble
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#960050;background-color:#1e0010&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;# set a default deny policy.
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;block in log all
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#960050;background-color:#1e0010&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;# This is a desktop so be permissive in allowing outgoing connections.
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;pass out quick modulate state
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#960050;background-color:#1e0010&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;# Enable antispoofing on the external interface
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;antispoof for $ext_if inet
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;#antispoof &lt;span style=&#34;color:#66d9ef&#34;&gt;for&lt;/span&gt; $ext_if inet6
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#960050;background-color:#1e0010&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;# block packets that fail a reverse path check. we look up the routing
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;# table, check to make sure that the outbound is the same as the source
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;# it came in on. &lt;span style=&#34;color:#66d9ef&#34;&gt;if&lt;/span&gt; not, it is probably source address spoofed.
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;block in from urpf-failed to any
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#960050;background-color:#1e0010&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;# drop broadcast requests quietly.
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;block in quick on $ext_if from any to 255.255.255.255
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#960050;background-color:#1e0010&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;block in log quick on $ext_if inet from  to any
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;In the &lt;code&gt;pf.conf&lt;/code&gt;, the blocked IP table is called &lt;code&gt;sshguard&lt;/code&gt;. To list all the blocked IPs, run:&lt;/p&gt;</description>
    </item>
    <item>
      <title>Set the HostName and Computer Name via command line on OS X</title>
      <link>https://blog.khmersite.net/p/set-the-hostname-and-computer-name-via-command-line-on-os-x/</link>
      <pubDate>Fri, 17 Nov 2017 09:44:26 +0000</pubDate>
      <guid>https://blog.khmersite.net/p/set-the-hostname-and-computer-name-via-command-line-on-os-x/</guid>
      <description>&lt;p&gt;Work recently acquired a few MacBook laptops to be used and shared by staff. Though the computing staff is not expected to have immense knowledge about OS X,  when things break down we are the first point of contact.&lt;/p&gt;
&lt;p&gt;The last time I used a Mac machine extensively was around 2007. Then I switched to Debian and could never look back. Anyway, there must be lot of new things and I’ll try document or post snippets here as I learn new things.&lt;/p&gt;</description>
    </item>
    <item>
      <title>How to list all installed R-packages</title>
      <link>https://blog.khmersite.net/p/how-to-list-all-installed-r-packages/</link>
      <pubDate>Thu, 05 Oct 2017 15:48:55 +0000</pubDate>
      <guid>https://blog.khmersite.net/p/how-to-list-all-installed-r-packages/</guid>
      <description>&lt;p&gt;I don&amp;rsquo;t use R, and nor I do know much about it. However, I maintain R&amp;rsquo;s installation on linux machines at work.&lt;/p&gt;
&lt;p&gt;Today, I learned a new trick to list all installed R-packages. Here it is:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;ip = as.data.frame(installed.packages()[,c(1,3:4)])
ip = ip[is.na(ip$Priority),1:2,drop=FALSE]
ip
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;And here is the sample output:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;Type &amp;#39;license()&amp;#39; or &amp;#39;licence()&amp;#39; for distribution details.

  Natural language support but running in an English locale

R is a collaborative project with many contributors.
Type &amp;#39;contributors()&amp;#39; for more information and
&amp;#39;citation()&amp;#39; on how to cite R or R packages in publications.

Type &amp;#39;demo()&amp;#39; for some demos, &amp;#39;help()&amp;#39; for on-line help, or
&amp;#39;help.start()&amp;#39; for an HTML browser interface to help.
Type &amp;#39;q()&amp;#39; to quit R.

&amp;gt; ip = as.data.frame(installed.packages()[,c(1,3:4)])
&amp;gt; ip = ip[is.na(ip$Priority),1:2,drop=FALSE]
&amp;gt; ip
                  Package   Version
akima               akima    0.5-12
alr3                 alr3     2.0.5
BRugs               BRugs     0.8-6
car                   car     2.1-2
coda                 coda    0.18-1
colorspace     colorspace     1.2-6
DEoptimR         DEoptimR     1.0-5
dichromat       dichromat     2.0-0
digest             digest     0.6.9
distillery     distillery     1.0-2
extRemes         extRemes     2.0-7
fields             fields     8.4-1
...
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;I don&amp;rsquo;t have time to explain what each line does. If you&amp;rsquo;re curious, you can check out using the references below:&lt;/p&gt;</description>
    </item>
    <item>
      <title>Build Docker Client for ARMv8</title>
      <link>https://blog.khmersite.net/p/build-docker-client-for-armv8/</link>
      <pubDate>Sun, 01 Oct 2017 12:51:48 +0000</pubDate>
      <guid>https://blog.khmersite.net/p/build-docker-client-for-armv8/</guid>
      <description>&lt;p&gt;The other day, after successfully building Docker-ce 17.06.0-dev for Odroid C2 which has ARMv8 CPU, i couldn’t find Docker client. Maybe it was just me not building the Docker engine correctly.&lt;/p&gt;
&lt;p&gt;Anyway, after some more times, I also managed building the Docker client for the Odroid C2. It turned out, like many things, it wasn’t that  hard after you figured it out. It’s worth to note too that the build instruction on &lt;a href=&#34;https://github.com/docker/cli&#34;&gt;https://github.com/docker/cli&lt;/a&gt; is to use Docker container. It didn’t work for me, and I decided to just build the Docker cli locally on the Odroid C2 instead.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Install Grub on GPT</title>
      <link>https://blog.khmersite.net/p/install-grub-on-gpt/</link>
      <pubDate>Mon, 25 Sep 2017 16:45:37 +0000</pubDate>
      <guid>https://blog.khmersite.net/p/install-grub-on-gpt/</guid>
      <description>&lt;p&gt;I came across a problem with grub being broken recently on a system running Ubuntu 16.04. This happened after the grub2 package got upgraded. This post will explain how I solved the problem. If you have similar issues, please do not just copy and paste the commands and execute on your machine. First read on, and try to understand it.&lt;/p&gt;
&lt;p&gt;Usually, when this happened in the past, we just need to chroot into the system and reinstall grub. On Ubuntu, assuming you’ve chrooted into the system, and the boot disk is &lt;code&gt;/dev/sda&lt;/code&gt;, this could be done by running:&lt;/p&gt;</description>
    </item>
    <item>
      <title>Remove trailing whitespace with VIM</title>
      <link>https://blog.khmersite.net/p/remove-trailing-whitespace-with-vim/</link>
      <pubDate>Thu, 27 Jul 2017 11:50:49 +0000</pubDate>
      <guid>https://blog.khmersite.net/p/remove-trailing-whitespace-with-vim/</guid>
      <description>&lt;p&gt;Here&amp;rsquo;s a quick tip on how to get rid of unwanted trailing whitespace using vim.&lt;/p&gt;
&lt;p&gt;Let&amp;rsquo;s say, I have the following code:&lt;/p&gt;
&lt;p&gt;&lt;img alt=&#34;trailing_whitespaces.png&#34; loading=&#34;lazy&#34; src=&#34;https://blog.khmersite.net/wp-content/uploads/2017/07/trailing_whitespaces.png&#34;&gt;&lt;/p&gt;
&lt;p&gt;Open that file with vim. The following command deletes any trailing white spaces.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-console&#34; data-lang=&#34;console&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;:%s/\s\+$//e
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Here&amp;rsquo;s the screenshot of the text after removing the whitespace:&lt;/p&gt;
&lt;p&gt;&lt;img alt=&#34;trailing_whitespaces_after.png&#34; loading=&#34;lazy&#34; src=&#34;https://blog.khmersite.net/wp-content/uploads/2017/07/trailing_whitespaces_after.png&#34;&gt;&lt;/p&gt;
&lt;p&gt;In search, &lt;code&gt;\s&lt;/code&gt; finds whitespace (a space or tab). &lt;code&gt;\+&lt;/code&gt; finds one or more occurrences. &lt;code&gt;$&lt;/code&gt; matches the end of line, finally &lt;code&gt;e&lt;/code&gt; flag means no error is displayed.&lt;/p&gt;</description>
    </item>
    <item>
      <title>RHCSA&amp;#8217;s Prep</title>
      <link>https://blog.khmersite.net/p/rhcsas-prep/</link>
      <pubDate>Sun, 19 Feb 2017 12:37:13 +0000</pubDate>
      <guid>https://blog.khmersite.net/p/rhcsas-prep/</guid>
      <description>&lt;p&gt;At the end of last year, I took a training to prepare for Red Hat Certified System Administrator (RHCSA EX200) exam. Now it’s February and I haven’t taken the exam yet. Even worse, I forgot most of the things I learned during that 3 day training. Well, since I’m being chased to get this exam done ASAP, with a passing grade of course, I think now it’s the best time to start revising the material again. As part as the exam prep, I’m going to post small challenges and solutions.&lt;/p&gt;</description>
    </item>
    <item>
      <title>How to toggle between buffers in Vim with vim-airline</title>
      <link>https://blog.khmersite.net/p/how-to-toggle-between-buffers-in-vim-with-vim-airline/</link>
      <pubDate>Sun, 29 Jan 2017 20:55:55 +0000</pubDate>
      <guid>https://blog.khmersite.net/p/how-to-toggle-between-buffers-in-vim-with-vim-airline/</guid>
      <description>&lt;p&gt;First if you haven&amp;rsquo;t yet heard about &lt;a href=&#34;https://github.com/vim-airline/vim-airline/&#34;&gt;vim-airline&lt;/a&gt; plugin, and you&amp;rsquo;re a Vim user, you really owe it to yourself to check it out.&lt;/p&gt;
&lt;p&gt;&lt;img alt=&#34;Screenshot-from-2017-01-29-21-27-18.png&#34; loading=&#34;lazy&#34; src=&#34;https://blog.khmersite.net/wp-content/uploads/2017/01/Screenshot-from-2017-01-29-21-27-18.png&#34;&gt;&lt;/p&gt;
&lt;p&gt;By default vim-airline displays the opening buffers on the top part of the window.&lt;/p&gt;
&lt;p&gt;So how to navigate between those buffers? Well, according to &lt;a href=&#34;https://github.com/vim-airline/vim-airline/issues/376&#34;&gt;this&lt;/a&gt;, it seems those buffers are for visual only. To navigate between them, we can use &lt;code&gt;:bp&lt;/code&gt; for previous buffer, and &lt;code&gt;:bn&lt;/code&gt; for next buffer. Alternatively, we can use &lt;code&gt;:ls&lt;/code&gt; to list all buffers, then navigate to a particular buffer by running &lt;code&gt;:number&lt;/code&gt; (substitute &lt;strong&gt;number&lt;/strong&gt; with an actual number).&lt;/p&gt;</description>
    </item>
    <item>
      <title>Changing a User&amp;#8217;s Password on FreeBSD</title>
      <link>https://blog.khmersite.net/p/changing-a-users-password-on-freebsd/</link>
      <pubDate>Tue, 10 Jan 2017 23:12:57 +0000</pubDate>
      <guid>https://blog.khmersite.net/p/changing-a-users-password-on-freebsd/</guid>
      <description>&lt;p&gt;Before getting into how to change a user’s password on FreeBSD, let’s have a quick revision on how that can be done on a Linux system.&lt;/p&gt;
&lt;p&gt;As a user we can change the password by typing:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;$ passwd
Changing password for user kenno.
Changing password for kenno.
Current password: 
...
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Or with a &lt;code&gt;root&lt;/code&gt; account, we can change/set the password for another user:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;# passwd kenno
Changing password for user kenno.
New password: 
...
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;How about a FreeBSD? It should be the same way as how it’s done on Linux right? Right? Well, not quite.&lt;/p&gt;</description>
    </item>
    <item>
      <title>FreeBSD 11 Blank Screen After Login via SLiM</title>
      <link>https://blog.khmersite.net/p/freebsd-11-blank-screen-after-login-via-slim/</link>
      <pubDate>Mon, 09 Jan 2017 16:46:23 +0000</pubDate>
      <guid>https://blog.khmersite.net/p/freebsd-11-blank-screen-after-login-via-slim/</guid>
      <description>&lt;p&gt;After rebooting my FreeBSD 11.0, I wasn’t able to login to Mate desktop manager via SLiM (Login Manager).&lt;/p&gt;
&lt;p&gt;I spent sometimes to try to fix it, but failed. I’ll try it again later when I have a bit of free time.&lt;/p&gt;
&lt;p&gt;Here’s a quick note of a work around, so I won’t forget what I’ve done.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Disable loading slim on start up by editing &lt;code&gt;/etc/rc.conf&lt;/code&gt; and commented out the following line:&lt;/p&gt;</description>
    </item>
    <item>
      <title>Zpool Not Automatically Mounted on Boot on Fedora</title>
      <link>https://blog.khmersite.net/p/zpool-not-automatically-mounted-on-boot-on-fedora/</link>
      <pubDate>Tue, 20 Dec 2016 15:12:40 +0000</pubDate>
      <guid>https://blog.khmersite.net/p/zpool-not-automatically-mounted-on-boot-on-fedora/</guid>
      <description>&lt;p&gt;I love ZFS, but there is something that has annoyed me for quite sometimes – the zpool doesn’t get automatically mounted on boot. To work around this, I had to login as root and run:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;# zpool import tank
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;to import &lt;code&gt;tank&lt;/code&gt; pool before I login with my normal user account.&lt;/p&gt;
&lt;p&gt;Well, I finally found a solution. This is what’s written on &lt;a href=&#34;https://github.com/zfsonlinux/zfs/wiki/Fedora&#34;&gt;zfsonlinux/zfs WIFI&lt;/a&gt; about Fedora specifically:&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Systemd Update:&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;When upgrading to the zfs-0.6.5.8 release it’s recommended that users manually reset the zfs systemd presets. Failure to do so can result in the pool not automatically importing when the system is rebooted.&lt;/p&gt;</description>
    </item>
    <item>
      <title>របៀប​លុប​អត្ថបទ​ចម្រៀង​​ចេញ​ពី​ mp3</title>
      <link>https://blog.khmersite.net/p/how-to-remove-embedded-lyric-from-mp3/</link>
      <pubDate>Sat, 17 Dec 2016 21:38:44 +0000</pubDate>
      <guid>https://blog.khmersite.net/p/how-to-remove-embedded-lyric-from-mp3/</guid>
      <description>&lt;p&gt;ខ្ញុំ​មាន​បទ​ចម្រៀង mp3 ពីរ​ឬបី​ ដែល​មាន​អត្ថបទ​ចម្រៀង​ភ្ជាប់ជាមួយ (embedded lyric)។ ខ្ញុំ​ចង់លុប​អត្ថបទ​នោះចេញ។&lt;/p&gt;
&lt;p&gt;នេះ​ជា​វិធី​មួយ​ ដែល​អាច​សម្រេច​បំណង​ខាងលើ ដោយប្រើកម្មវិធី​ឈ្មោះ &lt;strong&gt;id3v2&lt;/strong&gt; នៅ​លើហ្វេដ័ររ៉ា។ ឧទាហរណ៍​ថា​ ចម្រៀង​ដែល​ខ្ញុំ​ចង់លុប​អត្ថបទភ្ជាប់​នោះ​ មាន​ឈ្មោះ​ថា “01 love you.mp3” ខំម៉ានដែល​យើង​ត្រូវ​វាយ ដូច​ខាង​ក្រោម​នេះ៖&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;$ id3v2 --remove-frame &amp;#39;TEXT&amp;#39; 01\ love\ you.mp3
&lt;/code&gt;&lt;/pre&gt;&lt;ul&gt;
&lt;li&gt;&lt;code&gt;--remove-frame&lt;/code&gt; – លុប​ id3v2 frame&lt;/li&gt;
&lt;li&gt;&lt;code&gt;&#39;TEXT&#39;&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;បើសិន​ជា​យើង​មាន​ mp3 ច្រើន​ក្នុង​ directory តែ​មួយ​ ហើយយើង​ចង់​លុប​​ ‘TEXT’ frame ចេញ យើង​អាច​ប្រើ​ខំម៉ាន​ដូច​នេះ៖&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;$ for i in *.mp3; do id3v2 -r &amp;#39;TEXT&amp;#39; $i; done
Deleting Frame TEXT in file 01 love you.mp3 ...
Deleting Frame TEXT in file 02 Ima demo Aitai yo….mp3 ...
Deleting Frame TEXT in file 03 Brand New World.mp3 ...
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;សូម​កត់​សំគាល់​ថា ក្នុង​ខំម៉ាន​ខាង​លើ ខ្ញុំ​ប្រើ &lt;code&gt;-r&lt;/code&gt; ជំនួស​អោយ​ &lt;code&gt;--remove-frame&lt;/code&gt;។ អផសុន​ (options) ទាំង​ពីរ​នោះ វា​ដូច​គ្នា​ទេ៕&lt;/p&gt;</description>
    </item>
    <item>
      <title>Nvidia Driver on Fedora 25</title>
      <link>https://blog.khmersite.net/p/nvidia-driver-on-fedora-25/</link>
      <pubDate>Sat, 17 Dec 2016 16:22:44 +0000</pubDate>
      <guid>https://blog.khmersite.net/p/nvidia-driver-on-fedora-25/</guid>
      <description>&lt;p&gt;Fedora 25 has Wayland enabled by default. However, if your computer has a (good) Nvidia graphic card and want to make use of it, you’ll need to switch to Xorg and install the Nvidia proprietary driver.&lt;/p&gt;
&lt;p&gt;Note that only the Nvidia driver with the version newer than 375.20 works on Fedora 25.&lt;/p&gt;
&lt;p&gt;Ref: &lt;a href=&#34;https://ask.fedoraproject.org/en/question/96557/how-do-i-install-the-nvidia-driver-on-fedora-25/&#34;&gt;How do I install the Nvidia driver on Fedora 25?&lt;/a&gt;&lt;/p&gt;</description>
    </item>
    <item>
      <title>Install ZFS on Fedora 25 with kernel 4.8.13-300</title>
      <link>https://blog.khmersite.net/p/install-zfs-on-fedora-25-with-kernel-4-8-13-300/</link>
      <pubDate>Thu, 15 Dec 2016 23:08:52 +0000</pubDate>
      <guid>https://blog.khmersite.net/p/install-zfs-on-fedora-25-with-kernel-4-8-13-300/</guid>
      <description>&lt;p&gt;After I had my Fedora 24 upgraded to 25 on my desktop, ZFS no longer worked. I tried to remove &lt;code&gt;zfs&lt;/code&gt; package and reinstalled; it didn’t work.&lt;/p&gt;
&lt;p&gt;Here’s how I got it working after trying many things. There could be a different way to fix it, though.&lt;/p&gt;
&lt;p&gt;Let’s check the version of the kernel:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;[root@sangkae ~]# uname -r
4.8.13-300.fc25.x86_64
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Check if &lt;code&gt;spl, zfs&lt;/code&gt; are already installed:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;[root@sangkae ~]# dnf info spl
Last metadata expiration check: 1:01:18 ago on Thu Dec 15 22:42:25 2016.
Installed Packages
Name        : spl
Arch        : x86_64
Epoch       : 0
Version     : 0.6.5.8
Release     : 1.fc25
Size        : 48 k
Repo        : @System
From repo   : zfs
Summary     : Commands to control the kernel modules
URL         : http://zfsonlinux.org/
License     : GPLv2+
Description : This package contains the commands to verify the SPL
            : kernel modules are functioning properly.

[root@sangkae ~]# dnf info zfs
Last metadata expiration check: 1:01:26 ago on Thu Dec 15 22:42:25 2016.
Installed Packages
Name        : zfs
Arch        : x86_64
Epoch       : 0
Version     : 0.6.5.8
Release     : 1.fc25
Size        : 808 k
Repo        : @System
From repo   : zfs
Summary     : Commands to control the kernel modules and libraries
URL         : http://zfsonlinux.org/
License     : CDDL
Description : This package contains the ZFS command line utilities.
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Manually install &lt;code&gt;spl, dkms&lt;/code&gt;:&lt;/p&gt;</description>
    </item>
    <item>
      <title>លុបចោលសម្លេងពីឯកសារ MKV</title>
      <link>https://blog.khmersite.net/p/how-to-remove-audio-trak-from-mkv/</link>
      <pubDate>Tue, 15 Nov 2016 22:25:55 +0000</pubDate>
      <guid>https://blog.khmersite.net/p/how-to-remove-audio-trak-from-mkv/</guid>
      <description>&lt;p&gt;ឥឡូវនេះខែវិច្ឆិកាហើយ ប៉ុន្តែខ្ញុំមិនទាន់បាន​សរសេរ​អត្ថបទ​មួយឡើយ។ អញ្ចឹង គួរតែ​ចាប់ផ្តើម​មួយទៅមែន​ទេ?&lt;/p&gt;
&lt;p&gt;ថ្ងៃនេះខ្ញុំចង់ចែករំលេករបៀបលុប audio track ចេញពីឯកសារ &lt;a href=&#34;https://en.wikipedia.org/wiki/Matroska&#34;&gt;MKV&lt;/a&gt; ។ MKV ជា​ប្រភេទ​មួយ​នៃ​ហ្វមម៉ាត​របស់​ឯកសារ (file format) ដែល​យើង​អាច​ខ្ចប់​វីដេអូ សម្លេង និងសាប់ថាយថើល (subtitle)។ល។ ខ្ញុំមានឯកសារ MKV ដែលមានសំលេងពីរ ហ៊ីនឌី (Hindi) និងអង់គ្លេស ហើយ ខ្ញុំចង់លុបហ៊ីនឌីចេញ ដោយប្រើកុំព្យូទ័រជាមួយហ្វឺដរ៉ា (Fedora 24)។&lt;/p&gt;
&lt;p&gt;ជាដំបូង យើងត្រូវបញ្ចូលប្រូក្រាមមួយជាមុនសិន។&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;# dnf install mkvtoolnix
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;ក្រោយពីបញ្ចូលប្រូក្រាមខាងលើ យើងអាចមើលថាតើមានអ្វីខ្លះនៅក្នុងឯកសារ MKV នោះ។&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;$ mkvmerge -i Sample.mkv
File &amp;#39;Sample.mkv&amp;#39;: container: Matroska
Track ID 0: video (MPEG-4p10/AVC/h.264)
Track ID 1: audio (MP3)
Track ID 2: audio (AAC)
Track ID 3: subtitles (SubRip/SRT)
Attachment ID 1: type &amp;#39;image/jpeg&amp;#39;, size 298984 bytes, file name &amp;#39;Cover.jpg&amp;#39;
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;តាមលទ្ធផលខាងលើ យើងឃើញថា ឯកសារនោះមានសម្លេងពីរ Track ID 1 និង Track ID 2។ អ្វីដែលយើងមិនអាចដឹងគឺ តើធ្រាក់មួយណាជាសម្លេងភាសាហ៊ីនឌី? យើងអាចប្រើប្រូក្រាម &lt;code&gt;mplayer&lt;/code&gt;:&lt;/p&gt;</description>
    </item>
    <item>
      <title>How extract 7zip file on Linux</title>
      <link>https://blog.khmersite.net/p/how-extract-7zip-file-on-linux/</link>
      <pubDate>Thu, 20 Oct 2016 23:07:49 +0000</pubDate>
      <guid>https://blog.khmersite.net/p/how-extract-7zip-file-on-linux/</guid>
      <description>&lt;p&gt;This evening I need to extract a file with .7z extension. Guess what? I don’t know how to do that. I probably don’t even have 7zip program installed on my Fedora machine.&lt;/p&gt;
&lt;p&gt;Here’s something to remind myself how to get it working.&lt;/p&gt;
&lt;p&gt;First let’s find out what package we need to install:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;[root@watamem ~]# dnf search 7zip
Last metadata expiration check: 3:14:50 ago on Thu Oct 20 20:39:30 2016.
================ N/S Matched: 7zip ==================
p7zip-plugins.x86_64 : Additional plugins for p7zip
p7zip.x86_64 : Very high compression ratio file archiver
p7zip-gui.x86_64 : 7zG - 7-Zip GUI version
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;So, it seems we need to install &lt;code&gt;p7zip&lt;/code&gt;.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Labeling an XFS Partition</title>
      <link>https://blog.khmersite.net/p/labeling-an-xfs-partition/</link>
      <pubDate>Thu, 29 Sep 2016 11:19:09 +0000</pubDate>
      <guid>https://blog.khmersite.net/p/labeling-an-xfs-partition/</guid>
      <description>&lt;p&gt;Let&amp;rsquo;s say I have a partition as &lt;code&gt;/dev/sdc1&lt;/code&gt; formatted using XFS file system, and I want to give a label to it as &lt;code&gt;externo&lt;/code&gt;. Here is one way to do it:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-console&#34; data-lang=&#34;console&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;# xfs_admin -L externo /dev/sdc1
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;writing all SBs
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;new label = &amp;#34;externo&amp;#34;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;To read the label:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-console&#34; data-lang=&#34;console&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;# xfs_admin -l /dev/sdc1
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;label = &amp;#34;externo&amp;#34;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Reference:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;https://ubuntuswitch.wordpress.com/2007/06/04/howto-rename-a-xfs-filesystem-label-it/&#34;&gt;HowTo Rename a XFS-Filesystem (label it)&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;</description>
    </item>
    <item>
      <title>FreeBSD upgrade pool zroot</title>
      <link>https://blog.khmersite.net/p/freebsd-upgrade-pool-zroot/</link>
      <pubDate>Tue, 27 Sep 2016 21:09:39 +0000</pubDate>
      <guid>https://blog.khmersite.net/p/freebsd-upgrade-pool-zroot/</guid>
      <description>&lt;p&gt;Today I successfully upgraded my FreeBSD home nas server from 10.3 to 11.0. This is the final release of version 11.0, though the official announcement is expected to be made on September 28.&lt;/p&gt;
&lt;p&gt;After the system upgrade, I need to also upgrade the 2 zpools (tank and zroot) so they can have new features. Upgrading &lt;code&gt;tank&lt;/code&gt; was easy, all I needed to do was running this command:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-console&#34; data-lang=&#34;console&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;# zpool upgrade tank
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;This system supports ZFS pool feature flags.
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#960050;background-color:#1e0010&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Enabled the following features on &amp;#39;tank&amp;#39;:
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  sha512
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  skein
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;For &lt;code&gt;zroot&lt;/code&gt;, in addition to running the above command (by replacing the actually zpool name to &lt;code&gt;zroot&lt;/code&gt;), I also need to update the boot code.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Perl IO::Socket::INET6::sockaddr_in6 redefined error</title>
      <link>https://blog.khmersite.net/p/perl-iosocketinet6sockaddr_in6-redefined-error/</link>
      <pubDate>Wed, 14 Sep 2016 16:55:56 +0000</pubDate>
      <guid>https://blog.khmersite.net/p/perl-iosocketinet6sockaddr_in6-redefined-error/</guid>
      <description>&lt;p&gt;Yesterday I installed &lt;code&gt;spamassassin&lt;/code&gt; package on a server running RHEL 6.8. Then this morning, I received an email alert with the following message:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;Subroutine IO::Socket::INET6::sockaddr_in6 redefined at /usr/share/perl5/Exporter.pm line 67.
 at /usr/share/perl5/IO/Socket/INET6.pm line 21.
Subroutine IO::Socket::INET6::sockaddr_in6 redefined at /usr/share/perl5/Exporter.pm line 67.
 at /usr/share/perl5/IO/Socket/INET6.pm line 21.
Subroutine IO::Socket::INET6::sockaddr_in6 redefined at /usr/share/perl5/Exporter.pm line 67.
 at /usr/share/perl5/IO/Socket/INET6.pm line 21.
Subroutine IO::Socket::INET6::sockaddr_in6 redefined at /usr/share/perl5/Exporter.pm line 67.
 at /usr/share/perl5/IO/Socket/INET6.pm line 21.
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;This seems to be a bug exists in an old version of &lt;code&gt;IO::Socket::INET6&lt;/code&gt;. Upgrading this package should fix the problem:&lt;/p&gt;</description>
    </item>
    <item>
      <title>Warning: Use of &#34;localtime&#34; without parentheses is ambiguous</title>
      <link>https://blog.khmersite.net/p/warning-use-of-localtime-without-parentheses-is-ambiguous/</link>
      <pubDate>Wed, 14 Sep 2016 15:11:23 +0000</pubDate>
      <guid>https://blog.khmersite.net/p/warning-use-of-localtime-without-parentheses-is-ambiguous/</guid>
      <description>&lt;p&gt;While looking at the log produced by Request Tracker (RT) 4.2.12, I noticed there was a warning message about using &amp;ldquo;localtime&amp;rdquo; without parentheses.&lt;/p&gt;
&lt;p&gt;Here&amp;rsquo;s the actual error message:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-console&#34; data-lang=&#34;console&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;[warning]: Warning: Use of &amp;#34;localtime&amp;#34; without parentheses is ambiguous 
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;at /opt/rt4/sbin/../lib/RT/Interface/Email.pm line 526.
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;The solution which I found from &lt;a href=&#34;http://requesttracker.8502.n7.nabble.com/RT-4-2-Use-of-quot-localtime-quot-without-parentheses-is-ambiguous-td60453.html&#34;&gt;here&lt;/a&gt;, fixed the problem:&lt;/p&gt;
&lt;p&gt;On line 526 of file /opt/rt4/sbin/../lib/RT/Interface/Email.pm, replace:&lt;/p&gt;
&lt;p&gt;&lt;code&gt;localtime&lt;/code&gt; with &lt;code&gt;localtime()&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;Thanks to the chap who posted the solution.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Losing ZFS storage for Docker</title>
      <link>https://blog.khmersite.net/p/losing-zfs-storage-for-docker/</link>
      <pubDate>Sun, 11 Sep 2016 01:09:40 +0000</pubDate>
      <guid>https://blog.khmersite.net/p/losing-zfs-storage-for-docker/</guid>
      <description>&lt;p&gt;I use ZFS as a storage driver for docker engine running on my machine. Today after my machine rebooted from a crash, yes Linux system crashes too, I notice that all my docker images and containers disappeared.&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;~ ❯❯❯ docker ps
CONTAINER ID        IMAGE               COMMAND             CREATED             STATUS              PORTS               NAMES
~ ❯❯❯ docker ps -a
CONTAINER ID        IMAGE               COMMAND             CREATED             STATUS              PORTS               NAMES
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;First thing came to my mind was “did I accidentally destroy docker zfs data set last night?”&lt;/p&gt;</description>
    </item>
    <item>
      <title>Make Gnome Title Bar Small Again</title>
      <link>https://blog.khmersite.net/p/make-gnome-title-bar-small-again/</link>
      <pubDate>Fri, 02 Sep 2016 10:15:05 +0000</pubDate>
      <guid>https://blog.khmersite.net/p/make-gnome-title-bar-small-again/</guid>
      <description>&lt;p&gt;Sometimes in life, greater is not always better. Here&amp;rsquo;s a config which I used to make the Gnome 3 title bar smaller.&lt;/p&gt;
&lt;p&gt;Create a file in &lt;code&gt;~/.config/gtk-3.0/gtk.css&lt;/code&gt;:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-console&#34; data-lang=&#34;console&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;headerbar.default-decoration {
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    padding-top: 3px;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    padding-bottom: 3px;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    min-height: 0px;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    font-size: 0.7em;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;}
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#960050;background-color:#1e0010&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;headerbar.default-decoration button.titlebutton {
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    padding: 0px;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    min-height: 0px;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;}
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Here&amp;rsquo;s how the title bar looks like before and after applying the custom css file:&lt;/p&gt;
&lt;p&gt;&lt;img alt=&#34;Default title bar size&#34; loading=&#34;lazy&#34; src=&#34;https://blog.khmersite.net/wp-content/uploads/2016/09/Screenshot-from-2016-09-01-10-23-44.png&#34;&gt;&lt;/p&gt;</description>
    </item>
    <item>
      <title>Install Hack font on FreeBSD 10</title>
      <link>https://blog.khmersite.net/p/install-hack-font-on-freebsd-10/</link>
      <pubDate>Thu, 25 Aug 2016 16:57:20 +0000</pubDate>
      <guid>https://blog.khmersite.net/p/install-hack-font-on-freebsd-10/</guid>
      <description>&lt;p&gt;FreeBSD 10 comes with a pkgng package manager which allows to install binary packages faster and easier.&lt;/p&gt;
&lt;p&gt;Unfortunately, there is no binary package available for &lt;a href=&#34;http://sourcefoundry.org/hack/&#34;&gt;hack-font&lt;/a&gt; for FreeBSD 10. What is hack-font? It’s a very good font which looks very good for source code.&lt;/p&gt;
&lt;p&gt;Here’s how to install it from source.&lt;/p&gt;
&lt;p&gt;Check &lt;code&gt;/usr/ports/x11-fonts&lt;/code&gt; to see if there is a directory named &lt;code&gt;hack-font&lt;/code&gt;. If not, you might need to download or update the ports first. If you don’t have ports installed at all, do this:&lt;/p&gt;</description>
    </item>
    <item>
      <title>Puppetserver failed to start after upgrading to 2.5.0</title>
      <link>https://blog.khmersite.net/p/puppetserver-failed-to-start-after-upgrading-to-2-5-0/</link>
      <pubDate>Mon, 15 Aug 2016 11:24:55 +0000</pubDate>
      <guid>https://blog.khmersite.net/p/puppetserver-failed-to-start-after-upgrading-to-2-5-0/</guid>
      <description>&lt;p&gt;I upraded puppetserver from 2.4.0 to 2.5.0 on a server running Centos 6.8. Then, puppetserver no longer starts.&lt;/p&gt;
&lt;p&gt;The log (I think it was puppetsrver-daemon.log) said:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;Exception in thread &amp;#34;main&amp;#34; java.lang.IllegalArgumentException: Specified bootstrap config file does not exist: &amp;#39;/etc/puppetlabs/puppetserver/bootstrap.cfg&amp;#39;
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;As the error reported, &lt;code&gt;/etc/puppetlabs/puppetserver/bootstrap.cfg&lt;/code&gt; was not there. The disappearance must have happened during the puppetserver upgrade. I can confirm this by looking at my backup directory and finding the boostrap.cfg file there: &lt;code&gt;/srv/backup/etc/puppetlabs/puppetserver/bootstrap.cfg&lt;/code&gt;.&lt;/p&gt;</description>
    </item>
    <item>
      <title>How to remove a user password</title>
      <link>https://blog.khmersite.net/p/how-to-remove-a-user-password/</link>
      <pubDate>Sun, 07 Aug 2016 22:38:20 +0000</pubDate>
      <guid>https://blog.khmersite.net/p/how-to-remove-a-user-password/</guid>
      <description>&lt;p&gt;Sure, you Linux gurus must be laughing at me to see this post. However, this is my 2nd time needing to remove a user’s password and I had to Google for it! So here is just a quick tip to mind your truly:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;# passwd -d your_username
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;In case you’re wondering why I need to remove a password for an account, it’s for my 4 year old daughter who enjoys playing supertuxcart. She wants to have her own user account on a Fedora 24 box without a password.&lt;/p&gt;</description>
    </item>
    <item>
      <title>បង្កើត RSS feeds ពី SoundCloud និង iTunes urls</title>
      <link>https://blog.khmersite.net/p/%E1%9E%94%E1%9E%84%E1%9F%92%E1%9E%80%E1%9E%BE%E1%9E%8F-rss-feeds-%E1%9E%96%E1%9E%B8-soundcloud-%E1%9E%93%E1%9E%B7%E1%9E%84-itunes-urls/</link>
      <pubDate>Sun, 31 Jul 2016 00:25:56 +0000</pubDate>
      <guid>https://blog.khmersite.net/p/%E1%9E%94%E1%9E%84%E1%9F%92%E1%9E%80%E1%9E%BE%E1%9E%8F-rss-feeds-%E1%9E%96%E1%9E%B8-soundcloud-%E1%9E%93%E1%9E%B7%E1%9E%84-itunes-urls/</guid>
      <description>&lt;p&gt;ខ្ញុំ​​ចូល​ចិត្ត​ស្តាប់ ផត់ខាស់​ណាស់ ពីព្រោះវាមាន​អត្ថប្រយោជន៍​ជាច្រើន។ តើផត់ខាស​បានការអ្វី​ខ្លះ? បើសិន​ជាអ្នក​ចង់ដឹង សូម​សួរ​ក្នុង​ខំម៉ិន​ខាង​ក្រោម។&lt;/p&gt;
&lt;p&gt;ថ្ងៃ​នេះ ខ្មុំ​ចង់ប្រាប់​របៀបបង្កើត RSS feeds ពីផត់ខាស់​ដែល​ត្រូវការ អាយធូន​ដើម្បីស្តាប់បាន។ ជាមួយ RSS feeds យើង​អាច​ប្រើ​កម្មវិធី​ផ្សេងៗ​ដូចជា អាម៉ារ៉ុក។&lt;/p&gt;
&lt;p&gt;មុន​ដំបូង​ យើងត្រូវ​ចំលងលិង អាយធូន ហើយ​ចូល​ទៅ &lt;a href=&#34;http://getrssfeed.com/&#34;&gt;http://getrssfeed.com/&lt;/a&gt; និង​បិទលិងនោះ។ វិបសាយ​ getrssfeed.com និង​ផ្តល់​លិងថ្មី ដែល​ជា RSS feed.&lt;/p&gt;
&lt;p&gt;វិធីខាងលើអាច​ប្រើជាមួយ​ SoundCloud urls ផងដែរ៕&lt;/p&gt;</description>
    </item>
    <item>
      <title>Resizing an LVM logical volume</title>
      <link>https://blog.khmersite.net/p/resizing-an-lvm-logical-volume/</link>
      <pubDate>Wed, 20 Jul 2016 16:11:51 +0000</pubDate>
      <guid>https://blog.khmersite.net/p/resizing-an-lvm-logical-volume/</guid>
      <description>&lt;p&gt;One of the logical volumes on my desktop is running out of space. I want to add 200GB to that volume. Here is one way to achieve this task.&lt;/p&gt;
&lt;p&gt;First a bit of warning. Don&amp;rsquo;t, or never, just copy and paste what you see here if you want to apply it to your own system. You may accidentally destroy your precious data.&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;# lvs
  LV      VG     Attr       LSize   Pool Origin Data%  Meta%  Move Log Cpy%Sync Convert
  backup  data   -wi-ao---- 200.00g                                                    
  scratch data   -wi-ao----   1.00t                                                    
  home    system -wi-ao----  90.00g                                                    
  root    system -wi-ao---- 100.00g                                                    
  swap    system -wi-ao----  16.00g                                                    
  tmp     system -wi-a-----   4.00g                                                    
  var     system -wi-ao----  20.00g  
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Let&amp;rsquo;s check the available disk space of volume groups we can use:&lt;/p&gt;</description>
    </item>
    <item>
      <title>Fix corrupted GPT on FreeBSD</title>
      <link>https://blog.khmersite.net/p/fix-corrupted-gpt-on-freebsd/</link>
      <pubDate>Thu, 14 Jul 2016 18:40:15 +0000</pubDate>
      <guid>https://blog.khmersite.net/p/fix-corrupted-gpt-on-freebsd/</guid>
      <description>&lt;p&gt;One of the disks in my FreeBSD server reported an issue:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;Jul 14 18:00:56 nas kernel: GEOM: da0: the primary GPT table is corrupt or invalid.
Jul 14 18:00:56 nas kernel: GEOM: da0: using the secondary instead -- recovery strongly advised.
Jul 14 18:00:56 nas kernel: GEOM: diskid/DISK-67304734999999999999: the primary GPT table is corrupt or invalid.
Jul 14 18:00:56 nas kernel: GEOM: diskid/DISK-67304734999999999999: using the secondary instead -- recovery strongly advised.
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;To verify it, first I used gdisk command:&lt;/p&gt;</description>
    </item>
    <item>
      <title>How to convert vdi to qcow2 image</title>
      <link>https://blog.khmersite.net/p/how-to-convert-vdi-to-qcow2-image/</link>
      <pubDate>Sun, 03 Jul 2016 20:22:40 +0000</pubDate>
      <guid>https://blog.khmersite.net/p/how-to-convert-vdi-to-qcow2-image/</guid>
      <description>&lt;p&gt;vdi file is a type of disk image used by VirtualBox. qcow2, on the other hand, is the format of disk image used by KVM.&lt;/p&gt;
&lt;p&gt;Recently, I want to move some existing virtual machines running on VirtualBox to KVM. To do that I need to convert the disk image from vdi to qcow2. Here’s one way to achieve that:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;# qemu-img convert -f vdi -O qcow2 disk.vdi disk.qcow2
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Ref: &lt;a href=&#34;http://www.randomhacks.co.uk/how-to-convert-virtualbox-vdi-to-kvm-qcow2/&#34;&gt;How to convert VirtualBox vid to KVM qcow2&lt;/a&gt;&lt;/p&gt;</description>
    </item>
    <item>
      <title>FreeBSD git fatal: Unable to find remote helper for &#39;https&#39;</title>
      <link>https://blog.khmersite.net/p/freebsd-git-fatal-unable-to-find-remote-helper-for-https/</link>
      <pubDate>Fri, 01 Jul 2016 23:15:03 +0000</pubDate>
      <guid>https://blog.khmersite.net/p/freebsd-git-fatal-unable-to-find-remote-helper-for-https/</guid>
      <description>&lt;p&gt;I just found out that git is not fully functional on my FreeBSD (11) box. It was installed from port (using &lt;code&gt;portmaster git&lt;/code&gt;). I can clone a repo using SSH key, but not with HTTPS.&lt;/p&gt;
&lt;p&gt;I’m not quite sure if it’s always been this way. Here is how to fix it:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Reinstall &lt;code&gt;curl&lt;/code&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-console&#34; data-lang=&#34;console&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;# pkg remove curl
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;# portmaster curl
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;ol start=&#34;2&#34;&gt;
&lt;li&gt;Reinstall &lt;code&gt;git&lt;/code&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-console&#34; data-lang=&#34;console&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;# pkg remove git
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;# portmaster git
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Why did I install &lt;code&gt;git&lt;/code&gt; from port? Well, &amp;lsquo;cuz there is no binary package for FreeBSD 11 arm, which runs on my Raspberry Pi B+.&lt;/p&gt;</description>
    </item>
    <item>
      <title>grep: error while loading shared libraries: libpcre.so.0</title>
      <link>https://blog.khmersite.net/p/grep-error-while-loading-shared-libraries-libpcre-so-0/</link>
      <pubDate>Fri, 01 Jul 2016 14:14:13 +0000</pubDate>
      <guid>https://blog.khmersite.net/p/grep-error-while-loading-shared-libraries-libpcre-so-0/</guid>
      <description>&lt;p&gt;I have a server running CentOS 6 successfully upgraded to CentOS 7.&lt;/p&gt;
&lt;p&gt;The only problem I encountered so far is that ‘grep’ doesn’t work.&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;[root@zilla ~]# grep
grep: error while loading shared libraries: libpcre.so.0: cannot open shared object file: No such file or directory
&lt;/code&gt;&lt;/pre&gt;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;[root@zilla ~]# ldd /usr/bin/grep
        linux-vdso.so.1 =&amp;gt;  (0x00007ffc0b639000)
        libpcre.so.0 =&amp;gt; not found
        libc.so.6 =&amp;gt; /lib64/libc.so.6 (0x00007f6be1c6c000)
        /lib64/ld-linux-x86-64.so.2 (0x00007f6be2038000)
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;First thing I tried was to reinstall &lt;code&gt;pcre&lt;/code&gt; package which provides libpcre.so*. It still didn’t work. Fortunately, &lt;a href=&#34;http://sempike.blogspot.com.au/2016/02/update-to-centos-7-libpcreso0-no-such.html&#34;&gt;someone&lt;/a&gt; has posted a solution as the following:&lt;/p&gt;</description>
    </item>
    <item>
      <title>Create bootable USB Fedora 24</title>
      <link>https://blog.khmersite.net/p/create-bootable-usb-fedora-24/</link>
      <pubDate>Mon, 27 Jun 2016 10:21:29 +0000</pubDate>
      <guid>https://blog.khmersite.net/p/create-bootable-usb-fedora-24/</guid>
      <description>&lt;p&gt;Every time there is a new release of Linux distro, I need to create a bootable USB. And, I forgot how I did it last time. So, I tried by using the &amp;ldquo;Startup Disk Creator&amp;rdquo; program installed on my Ubuntu workstation, only to find out that it didn&amp;rsquo;t even work.&lt;/p&gt;
&lt;p&gt;After a while I remember, it was just a matter of using &lt;code&gt;dd&lt;/code&gt; command to copy the ISO image to the USB.&lt;/p&gt;</description>
    </item>
    <item>
      <title>How to remove a newline at end of file</title>
      <link>https://blog.khmersite.net/p/how-to-remove-a-newline-at-end-of-file/</link>
      <pubDate>Thu, 09 Jun 2016 16:21:06 +0000</pubDate>
      <guid>https://blog.khmersite.net/p/how-to-remove-a-newline-at-end-of-file/</guid>
      <description>&lt;p&gt;Those who know me know that I don’t like Perl. Sometimes in life the thing you don’t like could be best tool/friend.&lt;/p&gt;
&lt;p&gt;I need to remove a newline character from a text file: layouts/partials/pagination.html.&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;$ git diff layouts/partials/pagination.html
diff --git a/layouts/partials/pagination.html b/layouts/partials/pagination.html
index 00c1124..d8dd981 100644
--- a/layouts/partials/pagination.html
+++ b/layouts/partials/pagination.html
@@ -15,4 +15,4 @@
         &amp;lt;/span&amp;gt;
         {{ end }}
     {{ end }}
-&amp;lt;/nav&amp;gt;
\ No newline at end of file
+&amp;lt;/nav&amp;gt;
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;The easiest way to do this is to run the following command:&lt;/p&gt;</description>
    </item>
    <item>
      <title>Fedora 23/24 gcc: error: /usr/lib/rpm/redhat/redhat-hardened-cc1</title>
      <link>https://blog.khmersite.net/p/fedora-2324-gcc-error-usrlibrpmredhatredhat-hardened-cc1/</link>
      <pubDate>Sun, 15 May 2016 17:39:56 +0000</pubDate>
      <guid>https://blog.khmersite.net/p/fedora-2324-gcc-error-usrlibrpmredhatredhat-hardened-cc1/</guid>
      <description>&lt;p&gt;While updating Ansible pip package on Fedora 24 today, I got the following error message&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;gcc: error: /usr/lib/rpm/redhat/redhat-hardened-cc1: No such file or directory
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;I believe I came across this problem before when I installed a ruby gem on Centos 6 a short while back. Unfortunately, I already forgot how I’d solved it. So here’s a note to remind myself or anyone who’s having the same issue.&lt;/p&gt;
&lt;p&gt;We need to install a package called: &lt;code&gt;redhat-rpm-config&lt;/code&gt;.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Installing Pip with Python 3.5 on FreeBSD</title>
      <link>https://blog.khmersite.net/p/installing-pip-with-python-3-5-on-freebsd/</link>
      <pubDate>Fri, 06 May 2016 16:09:41 +0000</pubDate>
      <guid>https://blog.khmersite.net/p/installing-pip-with-python-3-5-on-freebsd/</guid>
      <description>&lt;p&gt;Here is a quick note serves as a self-reminder on how to get &lt;code&gt;pip&lt;/code&gt; working or installed on FreeBSD 10.3.&lt;/p&gt;
&lt;p&gt;First, ensure that Python 3 package is installed. Python 3 is provided by &lt;code&gt;python35&lt;/code&gt; package.&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;# pkg install python35
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;However, there is no package for &lt;code&gt;pip&lt;/code&gt;, at least at the time of this writing, on FreeBSD. To have it installed, run the following command:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;# python3.5 -m ensurepip
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;We should as well update &lt;code&gt;pip&lt;/code&gt; to new version:&lt;/p&gt;</description>
    </item>
    <item>
      <title>How to renew DHCP lease with NetworkManager</title>
      <link>https://blog.khmersite.net/p/how-to-renew-dhcp-lease-with-networkmanager/</link>
      <pubDate>Thu, 17 Mar 2016 22:24:25 +0000</pubDate>
      <guid>https://blog.khmersite.net/p/how-to-renew-dhcp-lease-with-networkmanager/</guid>
      <description>&lt;p&gt;Traditionally, we use &lt;code&gt;dhclient&lt;/code&gt; 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 &lt;code&gt;nmcli&lt;/code&gt; command line interface to manage networking. Here’s how to renew DHCP lease using &lt;code&gt;nmcli&lt;/code&gt; performing on my machine. Your output when running these commands could be different.&lt;/p&gt;
&lt;p&gt;First, let&amp;rsquo;s list the connections managed by NetworkManager.&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;# 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 
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Next, we can find out the current IP associated with enp0s25 by running command:&lt;/p&gt;</description>
    </item>
    <item>
      <title>របៀបប្តូរ​ time zone ពីខំម៉ាន​ឡាញ​ក្នុង​អ៊ូប៊ុនធូ</title>
      <link>https://blog.khmersite.net/p/how-to-change-timezone-on-ubuntu/</link>
      <pubDate>Fri, 11 Mar 2016 23:32:24 +0000</pubDate>
      <guid>https://blog.khmersite.net/p/how-to-change-timezone-on-ubuntu/</guid>
      <description>&lt;p&gt;ថ្ងៃ​នេះ ខ្ញុំ​បានទទួល Odroid-C2 ដែល​បាន​ទិញ​ពី​ Hardkernel កាលពីអាទិត្យ​មុន។ OS ដែល​អាច​ដើរលើ​វាបាន ​ក្នុង​ពេលនេះ​​ មាន​តែ Ubuntu Mate 16.04 LTS ដែល​ជាបេតា នៅឡើយ។&lt;/p&gt;
&lt;p&gt;Time zone ដែល​មាន​ស្រាប់ជាដើម​គឺ EST (American Eastern Standard Time)។​ ខ្ញុំ​ត្រូវការ AEST (Australian Eastern Standard Time) ព្រោះខ្ញុំ​នៅ​ស៊ីដនី។ នេះ​ជាខំម៉ាន​ដែល​អាចប្តូរ Time zone បាន ដោយ​វាយ ពី ធើរមិណល់។&lt;/p&gt;
&lt;p&gt;មុន​ដំបូង ឆែក​មើលមុនសិន៖&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;odroid64:~# date
Fri Mar 11 08:13:04 EST 2016
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;ប្រើខំមាន នេះ​ដើម្បី​ប្តូរ​ time zone៖&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;odroid64:~# dpkg-reconfigure tzdata
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;ជ្រើសយក​ប្រទេស រួច​ទីក្រុង។​ នេះជាលទ្ធផល៖&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;Current default time zone: &amp;#39;Australia/Sydney&amp;#39;
Local time is now:      Sat Mar 12 00:13:57 AEDT 2016.
Universal Time is now:  Fri Mar 11 13:13:57 UTC 2016.
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Reference:&lt;/p&gt;</description>
    </item>
    <item>
      <title>Fedora 23: Ansible util.am_i_root():NameError: global name &#39;util&#39; is not defined</title>
      <link>https://blog.khmersite.net/p/fedora-23-ansible-util-am_i_rootrnnameerror-global-name-util-is-not-definedrn/</link>
      <pubDate>Sun, 28 Feb 2016 13:49:14 +0000</pubDate>
      <guid>https://blog.khmersite.net/p/fedora-23-ansible-util-am_i_rootrnnameerror-global-name-util-is-not-definedrn/</guid>
      <description>&lt;p&gt;If you see a similar error message as the following when running Ansible on a Fedora 23 machines, there is an easy fix.&lt;/p&gt;
&lt;p&gt;&lt;img alt=&#34;ansible_fedora23_dnf&#34; loading=&#34;lazy&#34; src=&#34;https://blog.khmersite.net/wp-content/uploads/2016/02/ansible_fedora23_dnf.png&#34;&gt;&lt;/p&gt;
&lt;p&gt;It is very likely that a package “python2-dnf” is missing. This package is required for Python script to interact with DNF package manager.&lt;/p&gt;
&lt;p&gt;&lt;img alt=&#34;ansible_fedora24_dnf&#34; loading=&#34;lazy&#34; src=&#34;https://blog.khmersite.net/wp-content/uploads/2016/02/ansible_fedora24_dnf.png&#34;&gt;&lt;/p&gt;
&lt;p&gt;There is a good article available at &lt;a href=&#34;https://fedoramagazine.org/&#34;&gt;fedoramagazine.org&lt;/a&gt; about &lt;a href=&#34;https://fedoramagazine.org/getting-ansible-working-fedora-23/&#34;&gt;running Ansible on Fedora 23&lt;/a&gt;. (I only found this later, and it&amp;rsquo;s very informative.)&lt;/p&gt;</description>
    </item>
    <item>
      <title>Mouse not working in Xorg on FreeBSD</title>
      <link>https://blog.khmersite.net/p/mouse-not-working-in-xorg-on-freebsd/</link>
      <pubDate>Fri, 19 Feb 2016 09:45:06 +0000</pubDate>
      <guid>https://blog.khmersite.net/p/mouse-not-working-in-xorg-on-freebsd/</guid>
      <description>&lt;p&gt;After installing Mate desktop environment on a fresh FreeBSD 10.2 box, mouse was not working. This is what I have in my &lt;code&gt;/etc/rc.conf&lt;/code&gt;:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;...
moused_enable=&amp;#34;YES&amp;#34;
hald_enable=&amp;#34;YES&amp;#34;
dbus_enable=&amp;#34;YES&amp;#34;
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Some suggests that the order of hald and dbus to be swapped around. I tried that, and it still didn&amp;rsquo;t work.&lt;/p&gt;
&lt;p&gt;A bit of more Googlings, I found out a working solution [1]. I need to install: &lt;code&gt;xf86-input-mouse&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;Here&amp;rsquo;s how I did it:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;# portmaster x11/drivers/xf86-input-mouse
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;And that was all required. If your keyboard is not working in Xorg, you might want to also install &lt;code&gt;xf86-input-keyboard&lt;/code&gt;.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Upgrading STM32F4-Discovery Firmware on Linux</title>
      <link>https://blog.khmersite.net/p/upgrading-stm32f4-discovery-firmware-on-linux/</link>
      <pubDate>Mon, 25 Jan 2016 14:18:02 +0000</pubDate>
      <guid>https://blog.khmersite.net/p/upgrading-stm32f4-discovery-firmware-on-linux/</guid>
      <description>&lt;p&gt;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.&lt;/p&gt;
&lt;p&gt;There&amp;rsquo;s a very good news for Linux and Mac users. Now, you can do it from your favorite OSes. Since I&amp;rsquo;m so excited about this, here&amp;rsquo;s a short article on how to do just that.&lt;/p&gt;
&lt;p&gt;First download &amp;ldquo;STSW-LINK007&amp;rdquo; from &amp;lt;www.st.com/web/en/catalog/tools/PF260217&amp;gt;. At the time of this writing the file is called: &lt;code&gt;stsw-link007.zip&lt;/code&gt;.&lt;/p&gt;</description>
    </item>
    <item>
      <title>PostgreSQL: Drop a database which has a hyphen in name</title>
      <link>https://blog.khmersite.net/p/postgresql-drop-a-database-which-has-a-hyphen-in-name/</link>
      <pubDate>Fri, 22 Jan 2016 13:13:35 +0000</pubDate>
      <guid>https://blog.khmersite.net/p/postgresql-drop-a-database-which-has-a-hyphen-in-name/</guid>
      <description>&lt;p&gt;Normally to drop a database in PostgreSQL, we can just type:&lt;/p&gt;
&lt;p&gt;&lt;code&gt;DROP DATABASE database;&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;Here&amp;rsquo;s a list of my current databases:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;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)
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;I want to drop a database named &lt;code&gt;postgres-db&lt;/code&gt;. So, let&amp;rsquo;s try to drop it:&lt;/p&gt;</description>
    </item>
    <item>
      <title>Docker with OverlayFS on Ubuntu 15.10</title>
      <link>https://blog.khmersite.net/p/docker-with-overlayfs-on-ubuntu-15-10/</link>
      <pubDate>Sat, 26 Dec 2015 00:08:28 +0000</pubDate>
      <guid>https://blog.khmersite.net/p/docker-with-overlayfs-on-ubuntu-15-10/</guid>
      <description>&lt;p&gt;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 &lt;a href=&#34;http://developerblog.redhat.com/2014/09/30/overview-storage-scalability-docker/&#34;&gt;here&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Anyway, the purpose of this post is how to switch OverlayFS and avoid head-scratching.&lt;/p&gt;
&lt;p&gt;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:&lt;/p&gt;</description>
    </item>
    <item>
      <title>Puppet service resource provider</title>
      <link>https://blog.khmersite.net/p/puppet-service-resource-provider/</link>
      <pubDate>Wed, 16 Dec 2015 15:18:13 +0000</pubDate>
      <guid>https://blog.khmersite.net/p/puppet-service-resource-provider/</guid>
      <description>&lt;p&gt;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.&lt;/p&gt;
&lt;p&gt;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&lt;/p&gt;
&lt;p&gt;to check and make sure that ‘cups’ is running else will be automatically restarted.&lt;/p&gt;</description>
    </item>
    <item>
      <title>ZFS zpool upgrade</title>
      <link>https://blog.khmersite.net/p/zfs-zpool-upgrade/</link>
      <pubDate>Mon, 14 Dec 2015 00:56:26 +0000</pubDate>
      <guid>https://blog.khmersite.net/p/zfs-zpool-upgrade/</guid>
      <description>&lt;p&gt;I’m running ZFS on Fedora 23 and I notice that there’re new features which can be enabled in the existing pool.&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;# zpool status
  pool: tank
 state: ONLINE
status: Some supported features are not enabled on the pool. The pool can
        still be used, but some features are unavailable.
action: Enable all features using &amp;#39;zpool upgrade&amp;#39;. Once this is done,
        the pool may no longer be accessible by software that does not support
        the features. See zpool-features(5) for details.
  scan: none requested
config:

        NAME        STATE     READ WRITE CKSUM
        tank        ONLINE       0     0     0
          raidz1-0  ONLINE       0     0     0
            sdb     ONLINE       0     0     0
            sdc     ONLINE       0     0     0

errors: No known data errors
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Get the ZFS version for tank’s pool:&lt;/p&gt;</description>
    </item>
    <item>
      <title>Copy RaspBSD image to micro SD card</title>
      <link>https://blog.khmersite.net/p/copy-raspbsd-image-to-micro-sd-card/</link>
      <pubDate>Wed, 02 Dec 2015 22:30:33 +0000</pubDate>
      <guid>https://blog.khmersite.net/p/copy-raspbsd-image-to-micro-sd-card/</guid>
      <description>&lt;p&gt;The RaspBSD image for Raspberry Pi can be found at &lt;a href=&#34;http://raspbsd.org/raspberrypi.html&#34;&gt;http://raspbsd.org/raspberrypi.html&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;After it’s been downloaded, we need to copy it to a microSD card. Before we can do that, we need to find out the device name represents the microSD card. One way to find out is to plug the card in, and check the newest messages of &lt;strong&gt;dmesg&lt;/strong&gt;.&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;$ dmesg
...
[282430.689656] mmc0: new SDHC card at address aaaa
[282430.691039] mmcblk0: mmc0:aaaa SU08G 7.40 GiB 
[282430.711060] mmcblk0: p1 p2
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;In my case, using Ubuntu 15.10, the card is detected as &lt;strong&gt;mmcblk0&lt;/strong&gt;.&lt;/p&gt;</description>
    </item>
    <item>
      <title>ERROR: could not insert &amp;#8216;nvidia_352&amp;#8217;: Unknown symbol in module, or unknown parameter (see dmesg)</title>
      <link>https://blog.khmersite.net/p/error-could-not-insert-nvidia_352-unknown-symbol-in-module-or-unknown-parameter-see-dmesg/</link>
      <pubDate>Tue, 01 Dec 2015 13:15:02 +0000</pubDate>
      <guid>https://blog.khmersite.net/p/error-could-not-insert-nvidia_352-unknown-symbol-in-module-or-unknown-parameter-see-dmesg/</guid>
      <description>&lt;p&gt;This is my third time having problem installing Nvidia drivers on Ubuntu (14.04). What’s worse is that I could not remember how I fixed them last time.&lt;/p&gt;
&lt;p&gt;Hope this blog post will prevent me from pulling my hair out for the 4th time.&lt;/p&gt;
&lt;p&gt;So, I installed Nvidia driver as usual:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;# apt-get install nvidia_352
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;After it’s finished, I tried to load the module:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;# modprobe nvidia
modprobe: ERROR: could not insert &amp;#39;nvidia_352&amp;#39;: Unknown symbol in module, or unknown parameter (see dmesg)
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Well, it turned out that I need to also install another linux-image package: linux-image-extra-3.13.0-70-generic. If you try to install this package on your machine, ensure that you match the version of the kernel too; i.e. 3.13.0-70 in my case.&lt;/p&gt;</description>
    </item>
    <item>
      <title>How to get IP of guest OS in VirtualBox</title>
      <link>https://blog.khmersite.net/p/how-to-get-ip-of-guest-os-in-virtualbox/</link>
      <pubDate>Wed, 11 Nov 2015 09:21:18 +0000</pubDate>
      <guid>https://blog.khmersite.net/p/how-to-get-ip-of-guest-os-in-virtualbox/</guid>
      <description>&lt;p&gt;After upgrading my VM running Fedora 23 beta to the release version, Gnome Desktop Manager (GDM) no longer started again. This is the same issue with newer version of xorg-x11-*, and it’s not yet supported by VirtualBox 5.0.&lt;/p&gt;
&lt;p&gt;I previously posted a quick fix by downgrading xorg-x11-* packages. To do that, I need to ssh into the VM.&lt;/p&gt;
&lt;p&gt;Here’s how we can find the IP address of running VMs.&lt;/p&gt;
&lt;p&gt;Let’s list the VMs available:&lt;/p&gt;</description>
    </item>
    <item>
      <title>Changing MongoDB storage engine from Mmapv1 to WiredTiger</title>
      <link>https://blog.khmersite.net/p/changing-mongodb-storage-engine-from-mmapv1-to-wiredtiger/</link>
      <pubDate>Tue, 03 Nov 2015 09:03:24 +0000</pubDate>
      <guid>https://blog.khmersite.net/p/changing-mongodb-storage-engine-from-mmapv1-to-wiredtiger/</guid>
      <description>&lt;p&gt;Changing the storage engine for a standalone MongoDB server from Mmapv1 to WiredTiger is relatively painless.&lt;/p&gt;
&lt;p&gt;Here’s how I did it.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Backup the database&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;mongodump --out /srv/backup/mongodb
&lt;/code&gt;&lt;/pre&gt;&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Stop monbodb service&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;service mongodb stop
&lt;/code&gt;&lt;/pre&gt;&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Update mongodb.conf. Here’s my /etc/mongodb.conf file:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;# mongod.conf

storage:
  dbPath: &amp;#34;/var/lib/mongo&amp;#34; 
  engine: wiredTiger
  wiredTiger:
    engineConfig:
      cacheSizeGB: 1
      statisticsLogDelaySecs: 0
      journalCompressor: snappy
      directoryForIndexes: false
    collectionConfig:
      blockCompressor: snappy
    indexConfig:
      prefixCompression: true

systemLog:
  verbosity: 1
  path: &amp;#34;/var/log/mongodb/mongod.log&amp;#34; 
  logAppend: true
  logRotate: reopen
  destination: file
  timeStampFormat: iso8601-utc

processManagement:
  fork: true
  pidFilePath: &amp;#34;/var/run/mongodb/mongod.pid&amp;#34; 

net:
  bindIp: 127.0.0.1
  port: 27017
  wireObjectCheck: false
  unixDomainSocket:
    enabled: true
&lt;/code&gt;&lt;/pre&gt;&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Start monbodb service&lt;/p&gt;</description>
    </item>
    <item>
      <title>GDM Doesn&amp;#8217;t Start on Fedora 23 Beta and VirtualBox</title>
      <link>https://blog.khmersite.net/p/gdm-doesnt-start-on-fedora-23-beta-and-virtualbox/</link>
      <pubDate>Tue, 27 Oct 2015 16:08:16 +0000</pubDate>
      <guid>https://blog.khmersite.net/p/gdm-doesnt-start-on-fedora-23-beta-and-virtualbox/</guid>
      <description>&lt;p&gt;I just finished upgrading Fedora 22 to Fedora 23 Beta and upon rebooting, gdm no longer started. I tried to reinstall the VirtualBox Guest Additions; unfortunately it still didn’t fix.&lt;/p&gt;
&lt;p&gt;To cut the story short, someone has given a working tip at this &lt;a href=&#34;http://forums.fedoraforum.org/showthread.php?t=306857&#34;&gt;forum&lt;/a&gt;. The solution is to downgrade xorg-x11-server-Xorg package.&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;# dnf --showduplicates --allowerasing --releasever=22 downgrade xorg-x11-server-Xorg
# mount /dev/cdrom /mnt; cd /mnt
# ./VBoxLinuxAdditions.run
# reboot
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;After rebooting, I was able to login again.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Kinetis Design Studio crashes on Kubuntu 14.04</title>
      <link>https://blog.khmersite.net/p/kinetis-design-studio-crashes-on-kubuntu-14-04/</link>
      <pubDate>Mon, 03 Aug 2015 12:01:24 +0000</pubDate>
      <guid>https://blog.khmersite.net/p/kinetis-design-studio-crashes-on-kubuntu-14-04/</guid>
      <description>&lt;p&gt;On Kubuntu 14.04, Kinetis Design Studio (KDS) could be started, but when I tried to create a new project, it’d crash with the following message displayed in the terminal:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;$ kinetis-design-studio 
java: /build/buildd/gtk2-engines-oxygen-1.4.5/src/animations/oxygencomboboxdata.cpp:87: void Oxygen::ComboBoxData::setButton(GtkWidget*): Assertion `!_button._widget&amp;#39; failed.
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;KDS is a Eclipse-based IDE. So I suspect the issue is related to Eclipse IDE itself. (I can’t confirm this as I’m not running the Eclipse IDE on this machine. I know I could have just downloaded and test it; but I don’t have time.)&lt;/p&gt;</description>
    </item>
    <item>
      <title>Updating Kinetis Design Studio on Linux</title>
      <link>https://blog.khmersite.net/p/updating-kinetis-design-studio-on-linux/</link>
      <pubDate>Tue, 28 Jul 2015 11:22:38 +0000</pubDate>
      <guid>https://blog.khmersite.net/p/updating-kinetis-design-studio-on-linux/</guid>
      <description>&lt;p&gt;&lt;img alt=&#34;kds1&#34; loading=&#34;lazy&#34; src=&#34;https://blog.khmersite.net/wp-content/uploads/2015/07/kds1.png&#34;&gt;&lt;/p&gt;
&lt;p&gt;For Linux users who want to update Kinetis Design Studio (DKS), if you launch KDS as a non-privileged user, you’d have to relaunch KDS with sudo for update to go ahead.&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;$ sudo /opt/Freescale/KDS_3.0.0/eclipse/kinetis-design-studio
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Then to update it, just click on Help -&amp;gt; Check for Updates from the menu.&lt;/p&gt;</description>
    </item>
    <item>
      <title>PF firewall rule for DNS server</title>
      <link>https://blog.khmersite.net/p/pf-firewall-rule-for-dns-server/</link>
      <pubDate>Thu, 09 Jul 2015 21:06:27 +0000</pubDate>
      <guid>https://blog.khmersite.net/p/pf-firewall-rule-for-dns-server/</guid>
      <description>&lt;p&gt;A reminder to readers, most of these blog posts are to remind me what I have done or fixed some problems. What works for me may not work for you. Most of the time, they aren&amp;rsquo;t even the best practice.&lt;/p&gt;
&lt;p&gt;Here&amp;rsquo;s a snippet of the PF firewall rule on my FreeBSD box which acts as a DNS server. Basically, the firewall opens up UDP port 53 to allow LAN access it.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Remove a file/directory starting with dash/hyphen</title>
      <link>https://blog.khmersite.net/p/remove-file-directory-starting-with-dash-hyphen/</link>
      <pubDate>Tue, 07 Jul 2015 21:15:12 +0000</pubDate>
      <guid>https://blog.khmersite.net/p/remove-file-directory-starting-with-dash-hyphen/</guid>
      <description>&lt;p&gt;I just noticed that in the /root directory, there exists a directory with its name starting with a dash: -p in my FreeBSD box.&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;root@raspbsd:~ # ls -l
total 144
drwxr-xr-x  2 root  wheel    512 May  5 18:26 -p
drwxr-xr-x  2 root  wheel    512 May  5 20:45 .byobu
drwxr-xr-x  3 root  wheel    512 May  5 20:45 .cache
-rw-r--r--  2 root  wheel    959 Jan 23 00:59 .cshrc
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;As much as I wanted to get rid of it, I was curious to find out what’s inside that directory.&lt;/p&gt;</description>
    </item>
    <item>
      <title>ISC Dhcpd Duplicate UID Lease</title>
      <link>https://blog.khmersite.net/p/isc-dhcpd-duplicate-uid-lease/</link>
      <pubDate>Thu, 25 Jun 2015 14:10:51 +0000</pubDate>
      <guid>https://blog.khmersite.net/p/isc-dhcpd-duplicate-uid-lease/</guid>
      <description>&lt;p&gt;Someone asked this question in &lt;a href=&#34;http://www.culmination.org/2008/10/isc-dhcpd-duplicate-uid-lease/&#34;&gt;one&lt;/a&gt; of his blog posts:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;Ever see this?

dhcpd: uid lease 192.168.1.150 for client xx:xx:xx:xx:xx:xx is duplicate on 192.168.1/24
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Yes, I’m seeing something like that now in the my dhdcp logs. Here is the actual message:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;DHCPREQUEST for 192.168.1.109 from 08:00:27:6e:61:b8 via eth0
DHCPACK on 192.168.1.109 to 08:00:27:6e:61:b8 via eth0
DHCPINFORM from 192.168.1.109 via eth0
DHCPACK to 192.168.1.109 (08:00:27:6e:61:b8) via eth0
uid lease 192.168.1.224 for client 08:00:27:6e:61:b8 is duplicate on 192.168.1.0/24
DHCPREQUEST for 192.168.1.109 from 08:00:27:6e:61:b8 via eth0
DHCPACK on 192.168.1.109 to 08:00:27:6e:61:b8 via eth0
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;I think I know why this happened. Basically, the machine with MAC address of ’08:00:27:6e:61:b8′ used to have grab an IP address&lt;/p&gt;</description>
    </item>
    <item>
      <title>PySpark takeOrdered example</title>
      <link>https://blog.khmersite.net/p/pyspark-takeordered-example/</link>
      <pubDate>Wed, 24 Jun 2015 20:54:04 +0000</pubDate>
      <guid>https://blog.khmersite.net/p/pyspark-takeordered-example/</guid>
      <description>&lt;p&gt;Sort by keys (ascending):&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;RDD.takeOrdered(5, key = lambda x: x[0])
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Sort by keys (descending):&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;RDD.takeOrdered(5, key = lambda x: -x[0])
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Sort by values (ascending):&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;RDD.takeOrdered(5, key = lambda x: x[1])
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Sort by values (descending):&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;RDD.takeOrdered(5, key = lambda x: -x[1])
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Credit: &lt;a href=&#34;http://stackoverflow.com/questions/30787635/takeordered-descending-pyspark&#34;&gt;http://stackoverflow.com/questions/30787635/takeordered-descending-pyspark&lt;/a&gt;&lt;/p&gt;</description>
    </item>
    <item>
      <title>YUM what provides this file, huh?</title>
      <link>https://blog.khmersite.net/p/yum-what-provides-this-file-huh/</link>
      <pubDate>Wed, 24 Jun 2015 17:08:20 +0000</pubDate>
      <guid>https://blog.khmersite.net/p/yum-what-provides-this-file-huh/</guid>
      <description>&lt;p&gt;This post is primarily written to remind myself, an Ubuntu user, to figure out how to find what RPM package provides a file — for example a header file.&lt;/p&gt;
&lt;p&gt;Today, I’m trying to compile and install R 3.1.3 on CentOS 6 from source code. This R installation is one of the requirements to install Tessera stack. The instruction from the &lt;a href=&#34;http://tessera.io/docs-install-cluster/#installation&#34;&gt;installation&lt;/a&gt; page is:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;sudo yum install blas blas-devel lapack lapack-devel
wget http://cran.r-project.org/src/base/R-3/R-3.1.3.tar.gz
tar zxvf R-3.1.3.tar.gz
cd R-3.1.3
./configure --with-blas --with-lapack --with-x --enable-R-shlib
make
sudo make install
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Unfortunately, the process failed with &lt;code&gt;./configure&lt;/code&gt; with the complain about missing readline library. To fix it, I had to install readline-devel package.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Install PostgreSQL server on Raspberry Pi from FreeBSD port</title>
      <link>https://blog.khmersite.net/p/install-postgresql-server-on-raspberry-pi-from-freebsd-port/</link>
      <pubDate>Thu, 18 Jun 2015 20:04:40 +0000</pubDate>
      <guid>https://blog.khmersite.net/p/install-postgresql-server-on-raspberry-pi-from-freebsd-port/</guid>
      <description>&lt;p&gt;Before I wrote this blog post, I had thought there was no binary package for PostgreSQL server for FreeBSD 11 running on Raspberry Pi. Hmm… how wrong I was! I just wasted the whole night compiling Postgres from source. DOH!&lt;/p&gt;
&lt;p&gt;Anyhow, here’s the step I took to do it. If you’re familiar with FreeBSD, there’s nothing new here. But, I only use FreeBSD once in awhile, and so I tend to forget a lot what I do.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Disable puppet-lint class inheriting from params class</title>
      <link>https://blog.khmersite.net/p/disable-puppet-lint-class-inheriting-from-params-class/</link>
      <pubDate>Thu, 18 Jun 2015 11:17:51 +0000</pubDate>
      <guid>https://blog.khmersite.net/p/disable-puppet-lint-class-inheriting-from-params-class/</guid>
      <description>&lt;p&gt;I normally use Vim to edit Puppet modules and manifests codes. However, recently I just found out about &lt;a href=&#34;http://atom.io&#34;&gt;Atom&lt;/a&gt; editor, and quite like it. Out of the box, Atom supports many programming languages by providing syntax highlight. There are hundreds of Packages available which provide more functionalities such as make Atom to behave like a Vi editor, support Puppet codes, etc.&lt;/p&gt;
&lt;p&gt;As mentioned earlier, Atom provides syntax highlighting for various programming languages; well except Puppet. So we need to manually install a package that fills that requirement: language-puppet. I also suggest that you additionally install linter and linter-puppet packages.&lt;/p&gt;</description>
    </item>
    <item>
      <title>ការបញ្ចូល git ក្នុង Raspberry Pi ដើរ​ FreeBSD 11</title>
      <link>https://blog.khmersite.net/p/installing-git-command-on-raspberrypi-freebsd11/</link>
      <pubDate>Fri, 29 May 2015 21:36:56 +0000</pubDate>
      <guid>https://blog.khmersite.net/p/installing-git-command-on-raspberrypi-freebsd11/</guid>
      <description>&lt;p&gt;ដោយ​សារ​ពុំមាន​ កញ្ចប់បាយនារី (binary package) នៃ​​ git យើង​​ត្រូវ​បញ្ចូល​ git​ពីសោះ​ខូត ដូច​ខាងក្រោម៖&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;# cd /usr/ports/devel/git
# make install clean
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;សង្ឃឹម​ថា​ថ្ងៃ​ក្រោយ​ឆាប់ៗ កញ្ចប់​បាយនារី នឹង​បាន​បង្កើត​ឡើង​ ព្រោះខំផាយ​ពី សោះខូត​យើត​ណាស់ ជាពិសេស​ពេល​ខំផាយ​វា​លើ​ រ៉ាស់​ប៊ែរី​ផាយ។&lt;/p&gt;</description>
    </item>
    <item>
      <title>របៀបលុបណូត​ចេញ​ពី Puppet master</title>
      <link>https://blog.khmersite.net/p/removing-node-from-puppet-master/</link>
      <pubDate>Fri, 22 May 2015 10:24:52 +0000</pubDate>
      <guid>https://blog.khmersite.net/p/removing-node-from-puppet-master/</guid>
      <description>&lt;p&gt;នៅ​កន្លែង​ធ្វើ​ការ​ ខ្ញុំ​ប្រើ​ Puppet ដើម្បី​គ្រប់​គ្រង​ ម៉ាស៊ីន​ជា​ច្រើន។ ជួនកាល​ខ្ញុំ​ត្រូ​វការលុប​ម៉ាស៊ីន​ចេញ ពី Puppet master ដោយ​សារ​ម៉ាស៊ីន​នោះ​លែង​ត្រូវ​ការហើយ។ នេះ​ជា​ជំហាន​ដែល​ត្រូវ​ធ្វើ៖&lt;/p&gt;
&lt;p&gt;១. លុបមាស៊ីន​ ឬ ណូត​នោះ​ពី puppet dashboard&lt;/p&gt;
&lt;p&gt;២. លុប certificate របស់ម៉ាស៊ីននោះ​ចេញពី puppet master ដោយវាយ ខំម៉ាន&lt;/p&gt;
&lt;p&gt;&lt;code&gt;# puppet cert clean node123.example.com&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;៣. ដោយសារ​ខ្ញុំ​ប្រើ PuppetDB ខ្ញុំ​ត្រូវ​លុប​ ណូត​នោះ ចេញ​ពី PuppetDB ដែរ&lt;/p&gt;
&lt;p&gt;&lt;code&gt;# puppet node deactivate node123.example.com&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;ខ្ញុំ​សរសេរ អត្ថបទ​នេះ ដើម្បី​រំលឹក​ខ្លួន​ឯង​ពេល​ខ្ញុំ​ត្រូវ​ការ​ធ្វើ​វា​ម្តង​ទៀត។ បើ​សិន​ជា​លោកអ្នក​ មាន​សំណូម​ពរ​ ឬ​សំណួរ​ទាក់ទង​នឹង​ ការប្រើប្រាស់ Puppet អាចសួរ​ខ្ញុំ​បាន៕&lt;/p&gt;</description>
    </item>
    <item>
      <title>R-tip: List installed R packages</title>
      <link>https://blog.khmersite.net/p/r-tip-list-installed-r-packages/</link>
      <pubDate>Wed, 29 Apr 2015 17:04:03 +0000</pubDate>
      <guid>https://blog.khmersite.net/p/r-tip-list-installed-r-packages/</guid>
      <description>&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;&amp;gt; rownames(installed.packages())
 [1] &amp;#34;bitops&amp;#34;     &amp;#34;manipulate&amp;#34; &amp;#34;RCurl&amp;#34;      &amp;#34;rgl&amp;#34;        &amp;#34;rstudio&amp;#34;   
 [6] &amp;#34;scrapeR&amp;#34;    &amp;#34;XML&amp;#34;        &amp;#34;base&amp;#34;       &amp;#34;boot&amp;#34;       &amp;#34;class&amp;#34;     
[11] &amp;#34;cluster&amp;#34;    &amp;#34;codetools&amp;#34;  &amp;#34;compiler&amp;#34;   &amp;#34;datasets&amp;#34;   &amp;#34;foreign&amp;#34;   
[16] &amp;#34;graphics&amp;#34;   &amp;#34;grDevices&amp;#34;  &amp;#34;grid&amp;#34;       &amp;#34;KernSmooth&amp;#34; &amp;#34;lattice&amp;#34;   
[21] &amp;#34;MASS&amp;#34;       &amp;#34;Matrix&amp;#34;     &amp;#34;methods&amp;#34;    &amp;#34;mgcv&amp;#34;       &amp;#34;nlme&amp;#34;      
[26] &amp;#34;nnet&amp;#34;       &amp;#34;parallel&amp;#34;   &amp;#34;rpart&amp;#34;      &amp;#34;spatial&amp;#34;    &amp;#34;splines&amp;#34;   
[31] &amp;#34;stats&amp;#34;      &amp;#34;stats4&amp;#34;     &amp;#34;survival&amp;#34;   &amp;#34;tcltk&amp;#34;      &amp;#34;tools&amp;#34;     
[36] &amp;#34;utils&amp;#34;     
&amp;gt; 
&lt;/code&gt;&lt;/pre&gt;</description>
    </item>
    <item>
      <title>Fixing &amp;#8220;Starting version 219&amp;#8221; bug in Kubuntu 15.04 Beta</title>
      <link>https://blog.khmersite.net/p/fixing-starting-version-219-bug-in-kubuntu-15-04-beta/</link>
      <pubDate>Fri, 27 Mar 2015 14:52:18 +0000</pubDate>
      <guid>https://blog.khmersite.net/p/fixing-starting-version-219-bug-in-kubuntu-15-04-beta/</guid>
      <description>&lt;p&gt;After restarting my laptop which run Kubuntu 15.04 beta, it got stuck at a black screen with a message: Starting version 219. I tried to reboot it a few times, and it always displayed the same message. Fortunately, I found a solution from this &lt;a href=&#34;http://life.wamari.com/2015/03/16/fixing-starting-version-219-bug-in-kubuntu-15-04-vivid-vervet-beta/&#34;&gt;page&lt;/a&gt; which fixed the problem.&lt;/p&gt;
&lt;p&gt;Here’s a recap on how to do it.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;When you see the above message, hit Ctrl + Alt + F2&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Run sudo systemctl enable sddm.service -f&lt;/p&gt;</description>
    </item>
    <item>
      <title>Installing Code Composer Studio 6 on Ubuntu 14.10 (64-bit)</title>
      <link>https://blog.khmersite.net/p/installing-code-composer-studio-6-on-ubuntu-14-10-64-bit/</link>
      <pubDate>Tue, 03 Mar 2015 22:48:55 +0000</pubDate>
      <guid>https://blog.khmersite.net/p/installing-code-composer-studio-6-on-ubuntu-14-10-64-bit/</guid>
      <description>&lt;p&gt;As of today, Code Composer Studio (ccs) 6 is only available for 32-bit Linux platform.  The good news is that it can be installed on a 64-bit version of Ubuntu and Fedora.&lt;/p&gt;
&lt;p&gt;&lt;img alt=&#34;ccs6&#34; loading=&#34;lazy&#34; src=&#34;https://blog.khmersite.net/wp-content/uploads/2015/03/ccs6.png&#34;&gt;&lt;/p&gt;
&lt;p&gt;In this blog post, I’m going to show a few issues I came across and how to fix them on Ubuntu 14.10 64-bit.&lt;/p&gt;
&lt;p&gt;Issue 1:&lt;/p&gt;
&lt;p&gt;After the installation, when I ran the ccs, it produces some warning and error messages then quit.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Mounting qcow2 VM disk images</title>
      <link>https://blog.khmersite.net/p/mounting-qcow2-vm-disk-images/</link>
      <pubDate>Thu, 19 Feb 2015 10:05:12 +0000</pubDate>
      <guid>https://blog.khmersite.net/p/mounting-qcow2-vm-disk-images/</guid>
      <description>&lt;p&gt;From time to time, after applying Windows updates on my Windows 7 kvm-based virtual machine, the machine won’t boot after restarting. In the &lt;a href=&#34;http://blog.khmersite.net/2014/09/windows-7-boot-error-with-mpfilter-sys-corrupted/&#34;&gt;past&lt;/a&gt;, I was lucky to be able to fix it.&lt;/p&gt;
&lt;p&gt;Last night, I could not say the same thing. Instead of stressing out losing my hair on how to get it working again, it’s decided to just restore the whole Windows image. First, I need to get some updated data from it though.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Good permission for /tmp</title>
      <link>https://blog.khmersite.net/p/good-permission-for-tmp/</link>
      <pubDate>Mon, 16 Feb 2015 12:44:18 +0000</pubDate>
      <guid>https://blog.khmersite.net/p/good-permission-for-tmp/</guid>
      <description>&lt;p&gt;I have been having issues getting X2Go running on a CentOS 6.5 box. It took me a while to figure out that the problem laid with the permission of /tmp directory. I’ll write how to solve the X2Go problem in another post.&lt;/p&gt;
&lt;p&gt;The recommended permission for /tmp is 1777. Notice that the forwarding ‘1’ is the sticky bit which only allows the owner of the file within /tmp (or the root user) to delete/rename the file.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Pololu A-Star 32U4 Mini on Ubuntu</title>
      <link>https://blog.khmersite.net/p/pololu-a-star-32u4-mini-on-ubuntu/</link>
      <pubDate>Sat, 13 Dec 2014 23:12:40 +0000</pubDate>
      <guid>https://blog.khmersite.net/p/pololu-a-star-32u4-mini-on-ubuntu/</guid>
      <description>&lt;p&gt;Recently I received a A-Star 32U4 mini board from Pololu, which I’d bought during the Black Friday for just $6.&lt;/p&gt;
&lt;p&gt;Since this mico-controller board shares many similarities with Arduino Leonardo, I thought I could just upload the program using Arduino IDE by selecting Arduino Leonardo as the board type.&lt;/p&gt;
&lt;p&gt;Unfortunately, that did not work even after I tried resetting the board as suggested in the following the error message logged by Arduino IDE in the console:&lt;/p&gt;</description>
    </item>
    <item>
      <title>Updating Nexus 7 to Lollipop using sideload</title>
      <link>https://blog.khmersite.net/p/updating-nexus-7-to-lollipop-using-sideload/</link>
      <pubDate>Sat, 13 Dec 2014 22:16:57 +0000</pubDate>
      <guid>https://blog.khmersite.net/p/updating-nexus-7-to-lollipop-using-sideload/</guid>
      <description>&lt;p&gt;This post is a note to remind myself how to manually flash Android firmware on a Nexus device.&lt;/p&gt;
&lt;p&gt;Step 1, download the firmware to your computer. I downloaded Android 5 from:&lt;/p&gt;
&lt;p&gt;&lt;a href=&#34;http://www.droid-life.com/2014/11/13/download-android-5-0-ota-update-nexus-5-7-10-4/&#34;&gt;http://www.droid-life.com/2014/11/13/download-android-5-0-ota-update-nexus-5-7-10-4/&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Step 2, connect Nexus 7 to the computer. Mine runs Ubuntu 14.10, and I already downloaded Android SDK.&lt;/p&gt;
&lt;p&gt;Make sure that “Developer Options” is enabled. If it’s not, go to Settings -&amp;gt; About tablet. Then click on “Build Number” 7 times.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Gtk-Message: Failed to load module &#34;overlay-scrollbar&#34;</title>
      <link>https://blog.khmersite.net/p/gtk-message-failed-to-load-module-overlay-scrollbar/</link>
      <pubDate>Tue, 09 Dec 2014 22:12:58 +0000</pubDate>
      <guid>https://blog.khmersite.net/p/gtk-message-failed-to-load-module-overlay-scrollbar/</guid>
      <description>&lt;p&gt;On Ubuntu distro, if you see the error message below in console whenever you run a Gnome-based applications, chances are you had &lt;strong&gt;overlay-scrollbar&lt;/strong&gt; package previously installed but now removed. In addition, the configuration file which came with that package remained on your system.&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;Gtk-Message: Failed to load module &amp;#34;overlay-scrollbar&amp;#34;
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;To verify this, we can run the command:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;$ dpkg -l overlay-scrollbar
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name                         Version             Architecture        Description
+++-============================-===================-===================-================
rc  overlay-scrollbar            0.2.16+r359+14.04.2 all                 Scrollbar overlay
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;&lt;strong&gt;rc&lt;/strong&gt; : remove but config file still presents.&lt;/p&gt;</description>
    </item>
    <item>
      <title>vim-youcompleteme</title>
      <link>https://blog.khmersite.net/p/vim-youcompleteme/</link>
      <pubDate>Fri, 05 Dec 2014 13:32:14 +0000</pubDate>
      <guid>https://blog.khmersite.net/p/vim-youcompleteme/</guid>
      <description>&lt;p&gt;I need to setup &lt;strong&gt;vim-youcompleteme&lt;/strong&gt; to get real-time completion for write Golang code.&lt;/p&gt;
&lt;p&gt;&lt;img alt=&#34;vim_youcompleteme.png&#34; loading=&#34;lazy&#34; src=&#34;https://blog.khmersite.net/wp-content/uploads/2014/12/vim_youcompleteme.png&#34;&gt;&lt;/p&gt;
&lt;p&gt;Assuming that this part has been completed first:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;$ cd ~/.vim/bundle
$ git clone https://github.com/fatih/vim-go.github
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Here&amp;rsquo;s how &lt;strong&gt;vim-youcompleteme&lt;/strong&gt; is installed/enabled on Ubuntu 14.04:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;$ sudo apt-get install vim-addon-manager vim-youcompleteme
$ vam install youcompleteme
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Note: &lt;code&gt;vam&lt;/code&gt; is short for the &lt;code&gt;vim-addon-manager&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;Reference:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;http://blog.gopheracademy.com/vimgo-development-environment/&#34;&gt;http://blog.gopheracademy.com/vimgo-development-environment/&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;</description>
    </item>
    <item>
      <title>Android Studio Cannot Resolve Symbol R</title>
      <link>https://blog.khmersite.net/p/android-studio-cannot-resolve-symbol-r/</link>
      <pubDate>Tue, 25 Nov 2014 15:36:52 +0000</pubDate>
      <guid>https://blog.khmersite.net/p/android-studio-cannot-resolve-symbol-r/</guid>
      <description>&lt;p&gt;I just got this problem today when I opened an Android project with Android Studio. Basically, anywhere there&amp;rsquo;s a reference to R, for example &lt;code&gt;R.layout.footer_view&lt;/code&gt;, Android Studio will complain that it cannot resolve symbol R.&lt;/p&gt;
&lt;p&gt;The fix is surprisingly easy. All I need to do was running Gradle clean and Gradle build.&lt;/p&gt;
&lt;p&gt;Ref: &lt;a href=&#34;http://stackoverflow.com/questions/17054000/cannot-resolve-symbol-r-android-studio&#34;&gt;http://stackoverflow.com/questions/17054000/cannot-resolve-symbol-r-android-studio&lt;/a&gt;&lt;/p&gt;</description>
    </item>
    <item>
      <title>Installing Linux Mint 17 on Virtualbox</title>
      <link>https://blog.khmersite.net/p/installing-linux-mint-17-on-virtualbox/</link>
      <pubDate>Tue, 21 Oct 2014 10:37:40 +0000</pubDate>
      <guid>https://blog.khmersite.net/p/installing-linux-mint-17-on-virtualbox/</guid>
      <description>&lt;p&gt;You may or may not have problem installing Linux Mint 17 on VirtualBox depending on the setting of your Virtualbox VM. I had this problem and took me a while to fix it.&lt;/p&gt;
&lt;p&gt;Basically, ensure that you set the system memory of your VM to be larger than 512MB, otherwise you might see black screen after booting your VM from the Mint DVD installation.&lt;/p&gt;
&lt;p&gt;Once the installation is finished, feel free to reduce the VM’s system memory to 512MB or smaller.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Progamming Arduino using USBasp on Ubuntu</title>
      <link>https://blog.khmersite.net/p/progamming-arduino-using-usbasp-on-ubuntu/</link>
      <pubDate>Sat, 13 Sep 2014 20:13:36 +0000</pubDate>
      <guid>https://blog.khmersite.net/p/progamming-arduino-using-usbasp-on-ubuntu/</guid>
      <description>&lt;p&gt;My USBAsp dongle arrived from China. It’s connected to the ISCP pins on an Arduino Nano, and also plugged to a computer via USB connection.&lt;/p&gt;
&lt;p&gt;&lt;img alt=&#34;usbasp_nano&#34; loading=&#34;lazy&#34; src=&#34;https://blog.khmersite.net/wp-content/uploads/2014/09/usbasp_nano.png&#34;&gt;&lt;/p&gt;
&lt;p&gt;According to lots of intructions on the Internet, to upload a sketch to an Arduino, we need to do the following steps:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Tools -&amp;gt; Programmer -&amp;gt; USBasp&lt;/li&gt;
&lt;li&gt;File -&amp;gt; Upload Using Programmer&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Unfortunatly, it did not work for me. Here is the error message produced by Arduino IDE:&lt;/p&gt;</description>
    </item>
    <item>
      <title>Windows 7 Boot Error with MpFilter.sys corrupted</title>
      <link>https://blog.khmersite.net/p/windows-7-boot-error-with-mpfilter-sys-corrupted/</link>
      <pubDate>Thu, 11 Sep 2014 16:48:47 +0000</pubDate>
      <guid>https://blog.khmersite.net/p/windows-7-boot-error-with-mpfilter-sys-corrupted/</guid>
      <description>&lt;p&gt;After doing patch-Tuesday update yesterday, my Windows 7 no longer booted. This is the second time it happened. Last time I fixed it, didn’t get to document and it took me a while to figure out how I did it.&lt;/p&gt;
&lt;p&gt;&lt;img alt=&#34;win7_mpfilter_corrupted&#34; loading=&#34;lazy&#34; src=&#34;https://blog.khmersite.net/wp-content/uploads/2014/09/win7_mpfilter_corrupted.png&#34;&gt;&lt;/p&gt;
&lt;p&gt;This version of Windows is Windows 7 Professional 32-bit. After some digging, MpFilter.sys is Microsoft Malware Protection Minifilter, which is a part of Microsoft Security Essentials (MSE). MSE is installed on my Windows 7 machine.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Arduino improving nRF24L01&#43; reliability</title>
      <link>https://blog.khmersite.net/p/arduino-improving-nrf24l01-reliability/</link>
      <pubDate>Tue, 12 Aug 2014 23:08:29 +0000</pubDate>
      <guid>https://blog.khmersite.net/p/arduino-improving-nrf24l01-reliability/</guid>
      <description>&lt;p&gt;In the past few weeks, I noticed that data transmitting from one of sensor nodes got dropped dramatically. This sensor node is an Arduino Micro using nRF24L01+ as the transmitter.&lt;/p&gt;
&lt;p&gt;&lt;img alt=&#34;NRF20L01+&#34; loading=&#34;lazy&#34; src=&#34;https://blog.khmersite.net/wp-content/uploads/2014/08/nrf4l01g.png&#34;&gt;&lt;/p&gt;
&lt;p&gt;Well, it&amp;rsquo;s supposed to send data to the base station once every 30 seconds; however the transmitting recurrence time exceeded 2 minutes. By default the transmitting rate is at 1 Mb/s, so I dropped it to 250 Kb/s to see if had any better improvement. It didn&amp;rsquo;t help.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Python: How to convert a list to a string</title>
      <link>https://blog.khmersite.net/p/python-how-to-convert-a-list-to-a-string/</link>
      <pubDate>Sat, 02 Aug 2014 10:47:55 +0000</pubDate>
      <guid>https://blog.khmersite.net/p/python-how-to-convert-a-list-to-a-string/</guid>
      <description>&lt;p&gt;There must already exist a gazillion articles about how to do this; but one more won&amp;rsquo;t hurt, right?&lt;/p&gt;
&lt;p&gt;Suppose you have a list, called &lt;code&gt;alist&lt;/code&gt;, as the following:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-python&#34; data-lang=&#34;python&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;In [&lt;span style=&#34;color:#ae81ff&#34;&gt;2&lt;/span&gt;]: alist
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Out[&lt;span style=&#34;color:#ae81ff&#34;&gt;2&lt;/span&gt;]: [&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#39;apple&amp;#39;&lt;/span&gt;, &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#39;banana&amp;#39;&lt;/span&gt;, &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#39;pear&amp;#39;&lt;/span&gt;]
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;To create a string from “alist” with a comma separator, we can do this:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-python&#34; data-lang=&#34;python&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;In [&lt;span style=&#34;color:#ae81ff&#34;&gt;3&lt;/span&gt;]: &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#39;,&amp;#39;&lt;/span&gt;&lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt;join(alist)
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Out[&lt;span style=&#34;color:#ae81ff&#34;&gt;3&lt;/span&gt;]: &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#39;apple,banana,pear&amp;#39;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Basically, you can place a desired separator in the &lt;code&gt;&#39;,&#39;&lt;/code&gt; or omit it totally.&lt;/p&gt;
&lt;p&gt;Reference: &lt;a href=&#34;http://www.decalage.info/en/python/print_list&#34;&gt;http://www.decalage.info/en/python/print_list&lt;/a&gt;&lt;/p&gt;</description>
    </item>
    <item>
      <title>Set Timezone in Fedora 20</title>
      <link>https://blog.khmersite.net/p/set-timezone-in-fedora-20/</link>
      <pubDate>Mon, 21 Jul 2014 23:09:50 +0000</pubDate>
      <guid>https://blog.khmersite.net/p/set-timezone-in-fedora-20/</guid>
      <description>&lt;p&gt;While looking at the log file on my Raspberry Pi (running Fedora 20 Remix), I noticed that the date/time didn’t look right.&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;# date
Mon Jul 21 09:01:18 EDT 2014
# timedatectl 
      Local time: Mon 2014-07-21 08:56:16 EDT
  Universal time: Mon 2014-07-21 12:56:16 UTC
        Timezone: n/a (EDT, -0400)
     NTP enabled: yes
NTP synchronized: yes
 RTC in local TZ: no
      DST active: yes
 Last DST change: DST began at
                  Sun 2014-03-09 01:59:59 EST
                  Sun 2014-03-09 03:00:00 EDT
 Next DST change: DST ends (the clock jumps one hour backwards) at
                  Sun 2014-11-02 01:59:59 EDT
                  Sun 2014-11-02 01:00:00 EST
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;EDT is a North American Eastern Daylight Time, which is 4 hours behind UTC. You can read more about it &lt;a href=&#34;http://www.timeanddate.com/library/abbreviations/timezones/na/edt.html&#34;&gt;here&lt;/a&gt;. In my case, I prefer the time zone set to AEST (Australian Eastern Standard Time), which is 10 hour ahead of UTC.&lt;/p&gt;</description>
    </item>
    <item>
      <title>systemd - start, status, enable example</title>
      <link>https://blog.khmersite.net/p/systemd-start-status-enable-example/</link>
      <pubDate>Thu, 17 Jul 2014 16:56:40 +0000</pubDate>
      <guid>https://blog.khmersite.net/p/systemd-start-status-enable-example/</guid>
      <description>&lt;p&gt;This is just a quick note to remind myself how to enable or disable services using Systemd. In this example, I&amp;rsquo;m using &lt;code&gt;denyhosts&lt;/code&gt; service.&lt;/p&gt;
&lt;p&gt;Check if a service is running.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-console&#34; data-lang=&#34;console&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;# systemctl status denyhosts
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;denyhosts.service - SSH log watcher
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;   Loaded: loaded (/usr/lib/systemd/system/denyhosts.service; disabled)
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;   Active: inactive (dead)
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Start a service and verify its running status:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-console&#34; data-lang=&#34;console&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;# systemctl start denyhosts
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;# systemctl status denyhosts
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;denyhosts.service - SSH log watcher
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;   Loaded: loaded (/usr/lib/systemd/system/denyhosts.service; disabled)
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;   Active: active (running) since Thu 2014-07-17 01:44:29 EDT; 1min 25s ago
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  Process: 15722 ExecStart=/usr/bin/denyhosts.py --daemon --config=/etc/denyhosts.conf (code=exited, status=0/SUCCESS)
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  Process: 15719 ExecStartPre=/bin/rm -f /run/lock/subsys/denyhosts (code=exited, status=0/SUCCESS)
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; Main PID: 19367 (denyhosts.py)
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;   CGroup: /system.slice/denyhosts.service
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;           └─19367 /usr/bin/python /usr/bin/denyhosts.py --daemon --config=/etc/denyhosts.conf
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#960050;background-color:#1e0010&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Jul 17 01:44:29 pidora.local systemd[1]: PID file /run/lock/subsys/denyhosts not readable (yet?) after start.
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Jul 17 01:44:29 pidora.local systemd[1]: Started SSH log watcher.
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Check if a &lt;code&gt;denyhosts&lt;/code&gt; service is enabled or not:&lt;/p&gt;</description>
    </item>
    <item>
      <title>Managing LVM</title>
      <link>https://blog.khmersite.net/p/managing-lvm/</link>
      <pubDate>Fri, 04 Jul 2014 16:37:13 +0000</pubDate>
      <guid>https://blog.khmersite.net/p/managing-lvm/</guid>
      <description>&lt;p&gt;LVM stands for Logical Volume Manager. It is a tool for logical volume management allowing us to allocate disks, strip, mirror and resize logical volumes. With LVM, we can manage partitions dynamically.&lt;/p&gt;
&lt;p&gt;Recently at work, we opted to use LVM to create logical partitions instead of physical partition on Linux desktop. This post is just a note to remind me of some common used commands. If you want to learn more about LVM, hit this &lt;a href=&#34;http://www.redhat.com/magazine/009jul05/features/lvm2/&#34;&gt;link&lt;/a&gt; instead.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Eclipse ADT Fatal Error on Linux</title>
      <link>https://blog.khmersite.net/p/eclipse-adt-fatal-error-on-linux/</link>
      <pubDate>Wed, 02 Jul 2014 14:23:56 +0000</pubDate>
      <guid>https://blog.khmersite.net/p/eclipse-adt-fatal-error-on-linux/</guid>
      <description>&lt;p&gt;The Eclipse IDE that comes bundle with Android Development Tools (ADT) crashes when run on my laptop running Fedora.&lt;/p&gt;
&lt;p&gt;&lt;img alt=&#34;ADT&#34; loading=&#34;lazy&#34; src=&#34;https://blog.khmersite.net/wp-content/uploads/2014/07/eclipse_adt.png&#34;&gt;&lt;/p&gt;
&lt;p&gt;The error message which logged to console is:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;#
# A fatal error has been detected by the Java Runtime Environment:
#
#  SIGSEGV (0xb) at pc=0x0000003cc2270061, pid=9653, tid=140330452297472
#
# JRE version: Java(TM) SE Runtime Environment (7.0_55-b13) (build 1.7.0_55-b13)
# Java VM: Java HotSpot(TM) 64-Bit Server VM (24.55-b03 mixed mode linux-amd64 compressed oops)
# Problematic frame:
# C  [libsoup-2.4.so.1+0x70061]  soup_session_feature_detach+0x11
#
# Failed to write core dump. Core dumps have been disabled. To enable core dumping, try &amp;#34;ulimit -c unlimited&amp;#34; before starting Java again
#
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Fortunately, there’s a way to fix this problem by opening ‘eclipse.ini’ file, in my case:&lt;/p&gt;</description>
    </item>
    <item>
      <title>Running Kompare from command line</title>
      <link>https://blog.khmersite.net/p/running-kompare-from-command-line/</link>
      <pubDate>Wed, 11 Jun 2014 14:05:11 +0000</pubDate>
      <guid>https://blog.khmersite.net/p/running-kompare-from-command-line/</guid>
      <description>&lt;p&gt;Recently I started to use Kompare a lot to compare the differences between two files. The way I compare two files is to open both files from the menu (File -&amp;gt; Compare Files). This is annoying and how I wish there were a way to just run Kompare from the command line passing 2 files as options.&lt;/p&gt;
&lt;p&gt;&lt;img loading=&#34;lazy&#34; src=&#34;https://blog.khmersite.net/wp-content/uploads/2014/06/kompare.png&#34;&gt;&lt;/p&gt;
&lt;p&gt;Well, it looks like my wish has been granted. I found the information &lt;a href=&#34;http://superuser.com/questions/355480/how-to-open-local-files-for-diffing-in-kompare-from-command-line&#34;&gt;here&lt;/a&gt; on how to do just that:&lt;/p&gt;</description>
    </item>
    <item>
      <title>New P&amp;#038;E OpenSDA Firmware v115 for K20D50M</title>
      <link>https://blog.khmersite.net/p/new-pe-opensda-firmware-v115-for-k20d50m/</link>
      <pubDate>Tue, 03 Jun 2014 21:03:04 +0000</pubDate>
      <guid>https://blog.khmersite.net/p/new-pe-opensda-firmware-v115-for-k20d50m/</guid>
      <description>&lt;p&gt;Having trouble uploading compiled code to K20D50M board? There’s a new firmware that (should) fix this.&lt;/p&gt;
&lt;p&gt;&lt;img alt=&#34;FRDM K20D50M&#34; loading=&#34;lazy&#34; src=&#34;https://blog.khmersite.net/wp-content/uploads/2014/06/P1420464.jpg&#34;&gt;&lt;/p&gt;
&lt;p&gt;A few weeks ago, I’ve updated the OpenSDA firmware on my Freescale FRDM-K20D50M to v114 only to find out that it no longer let me uploading any compiled files to the board.&lt;/p&gt;
&lt;p&gt;At first I thought my board was faulty, but felt relieved to hear that Erich Styger, an mbed expert, &lt;a href=&#34;http://mcuoneclipse.com/2013/12/14/new-pe-opensda-firmware-v114/?replytocom=23241#respond&#34;&gt;confirming&lt;/a&gt; this v114 firwmare also affected his K20D50M. Erich contacted P&amp;amp;E, and they in turn confirmed the problem.&lt;/p&gt;</description>
    </item>
    <item>
      <title>MongoDB warning: Failed to connect</title>
      <link>https://blog.khmersite.net/p/mongodb-warning-failed-to-connect/</link>
      <pubDate>Thu, 22 May 2014 16:44:32 +0000</pubDate>
      <guid>https://blog.khmersite.net/p/mongodb-warning-failed-to-connect/</guid>
      <description>&lt;p&gt;After upgrading MongoDB from version 2.4 to 2.6, I am not able to connect to it from another machine. The firewall has been checked to ensure that port 27017 is opened for the machine that I want to connect from.&lt;/p&gt;
&lt;p&gt;So what else could go wrong?  Well, I was impatient and turned to you know what… Google search. According to this link: &lt;a href=&#34;https://groups.google.com/forum/#!msg/mongodb-user/yhf05AW-hK8/YqES0cVIXlUJ&#34;&gt;https://groups.google.com/forum/#!msg/mongodb-user/yhf05AW-hK8/YqES0cVIXlUJ&lt;/a&gt;, the problem is due to the database is bound to only local IP.&lt;/p&gt;</description>
    </item>
    <item>
      <title>FreeBSD 10: Shared object &#39;libstdc&#43;&#43;.so.6&#39; not found</title>
      <link>https://blog.khmersite.net/p/freebsd-10-shared-object-libstdc-so-6-not-found/</link>
      <pubDate>Fri, 25 Apr 2014 11:53:53 +0000</pubDate>
      <guid>https://blog.khmersite.net/p/freebsd-10-shared-object-libstdc-so-6-not-found/</guid>
      <description>&lt;p&gt;Today while I was updating &lt;code&gt;py27-m2crypto&lt;/code&gt; package on FreeBSD 10 using &lt;code&gt;portmaster&lt;/code&gt;, the following error message was displayed:&lt;/p&gt;
&lt;p&gt;&lt;code&gt;Shared object &amp;quot;libstdc++.so.6&amp;quot; not found, required by &amp;quot;swig&amp;quot;&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;Fortunately, someone else has found the problem and solution before me. According this &lt;a href=&#34;http://www.laszlopusztai.net/2014/01/26/running-perforce-on-freebsd-10/&#34;&gt;blog post&lt;/a&gt;, FreeBSD 10 includes a &lt;a href=&#34;https://wiki.freebsd.org/NewC++Stack&#34;&gt;new C++ stack&lt;/a&gt; and gcc, including &lt;code&gt;libstdc++&lt;/code&gt;, is not installed by default.&lt;/p&gt;
&lt;p&gt;Therefore, to fix the missing this &lt;code&gt;libstdc++.so.6&lt;/code&gt; issue, we need to install &lt;code&gt;lang/gcc&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;If you use &lt;strong&gt;portmaster&lt;/strong&gt;, the command to install &lt;code&gt;lang/gcc&lt;/code&gt; is:&lt;/p&gt;</description>
    </item>
    <item>
      <title>moserial - a serial terminal for Linux</title>
      <link>https://blog.khmersite.net/p/moserial-a-serial-terminal-for-linux/</link>
      <pubDate>Tue, 22 Apr 2014 21:38:06 +0000</pubDate>
      <guid>https://blog.khmersite.net/p/moserial-a-serial-terminal-for-linux/</guid>
      <description>&lt;p&gt;The real tag line for moserial is &amp;ldquo;a serial terminal for the GNOME desktop&amp;rdquo;. However, since it&amp;rsquo;s installed just fine on my KDE desktop, I titled this post as &amp;ldquo;moserial - a serial terminal for &lt;strong&gt;Linux&lt;/strong&gt;&amp;rdquo;. (Well, it probably works on servers as well, not just &lt;em&gt;desktop&lt;/em&gt;.)&lt;/p&gt;
&lt;p&gt;&lt;img alt=&#34;moserial&#34; loading=&#34;lazy&#34; src=&#34;https://blog.khmersite.net/wp-content/uploads/2014/04/moserial.png#center&#34;&gt;&lt;/p&gt;
&lt;p&gt;So what is this moserial? It&amp;rsquo;s a terminal which allows you to connect to view or send data to a serial port. For example, a lot of mbed device or micro controllers, such as Arduino, can be configured to send/receive data via serial port. Before I found out about this program, I normally open up Arduinio IDE and connect to the Arduino via Serial Monitor function. Now, I never look back after using moserial.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Puppet agent hangs after loading facts</title>
      <link>https://blog.khmersite.net/p/puppet-agent-hangs-after-loading-facts/</link>
      <pubDate>Tue, 22 Apr 2014 11:37:51 +0000</pubDate>
      <guid>https://blog.khmersite.net/p/puppet-agent-hangs-after-loading-facts/</guid>
      <description>&lt;p&gt;At my current work place, we use Puppet to manage desktop machines. Recently, I need to prepare an new image based on Ubuntu 14.04 LTS.&lt;/p&gt;
&lt;p&gt;To prepare an image, in brief, first thing is to install a fresh Ubuntu on a machine, compile and package lots of applications, and make change to configuration such as look and feels, etc. As mentioned earlier, I use Puppet to manage machine, so I store all customed configuration on the Puppet server.&lt;/p&gt;</description>
    </item>
    <item>
      <title>How to test cron</title>
      <link>https://blog.khmersite.net/p/how-to-test-cron/</link>
      <pubDate>Tue, 18 Feb 2014 14:33:22 +0000</pubDate>
      <guid>https://blog.khmersite.net/p/how-to-test-cron/</guid>
      <description>&lt;p&gt;So you drop a script in &lt;code&gt;/etc/cron.daily&lt;/code&gt;. How to check if that script does what it is expected to do without having to wait, in this case, a day?&lt;/p&gt;
&lt;p&gt;Here is how:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;# run-parts -v /etc/cron.daily
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Reference:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;http://stackoverflow.com/questions/4984725/how-to-test-cron-job&#34;&gt;http://stackoverflow.com/questions/4984725/how-to-test-cron-job&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;</description>
    </item>
    <item>
      <title>Can&#39;t find the &#39;libpq-fe.h header</title>
      <link>https://blog.khmersite.net/p/cant-find-the-libpq-fe-h-header/</link>
      <pubDate>Mon, 03 Feb 2014 12:59:10 +0000</pubDate>
      <guid>https://blog.khmersite.net/p/cant-find-the-libpq-fe-h-header/</guid>
      <description>&lt;p&gt;I need to install pg 0.17.1 gem on a server running CentOS. This is the error message I saw:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;# gem install pg -v &amp;#39;0.17.1&amp;#39;
Building native extensions.  This could take a while...
ERROR:  Error installing pg:
        ERROR: Failed to build gem native extension.

/usr/bin/ruby extconf.rb
checking for pg_config... no
No pg_config... trying anyway. If building fails, please try again with
 --with-pg-config=/path/to/pg_config
checking for libpq-fe.h... no
Can&amp;#39;t find the &amp;#39;libpq-fe.h header
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of
necessary libraries and/or headers.  Check the mkmf.log file for more
details.  You may need configuration options.
...
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;First thing came to my mind was I must have forgotten to install the -dev package.&lt;/p&gt;</description>
    </item>
    <item>
      <title>PostgreSQL: Peer authentication failed for user</title>
      <link>https://blog.khmersite.net/p/postgresql-peer-authentication-failed-for-user/</link>
      <pubDate>Thu, 23 Jan 2014 10:53:12 +0000</pubDate>
      <guid>https://blog.khmersite.net/p/postgresql-peer-authentication-failed-for-user/</guid>
      <description>&lt;p&gt;Ever since Oracle took the ownership of MySQL, I&amp;rsquo;ve been leaning more and more toward PostgreSQL, or other NoSQL database like MongoDB.&lt;/p&gt;
&lt;p&gt;Also, I&amp;rsquo;m not completely new to PostgreSQL, but the fact that I only have to touch it once in awhile, makes me feel PostgreSQL is so hard to use and missing the goold-oldie MySQL.&lt;/p&gt;
&lt;p&gt;Anyway, this is the issue I had:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;# su - postgres
-bash-4.1$ psql -l
                                   List of databases
    Name     |  Owner   | Encoding |   Collate   |    Ctype    |   Access privileges
-------------+----------+----------+-------------+-------------+-----------------------
 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
(5 rows)

-bash-4.1$ psql -d puppetdb -U puppetdb --password
Password for user puppetdb:
psql: FATAL:  Peer authentication failed for user &amp;#34;puppetdb&amp;#34;
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;To fix it, we need to modify &lt;code&gt;pg_hba.conf&lt;/code&gt;, which is located in the &lt;code&gt;/var/lib/pgsql/9.3/data/&lt;/code&gt; directory on my system.&lt;/p&gt;</description>
    </item>
    <item>
      <title>How to suspend/hibernate from command line</title>
      <link>https://blog.khmersite.net/p/how-to-suspendhibernate-from-command-line/</link>
      <pubDate>Mon, 06 Jan 2014 09:22:35 +0000</pubDate>
      <guid>https://blog.khmersite.net/p/how-to-suspendhibernate-from-command-line/</guid>
      <description>&lt;p&gt;First find out what states your system is supported:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;$ cat /sys/power/state
mem disk
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;To suspend to ram:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;# echo -n mem &amp;gt; /sys/power/state
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;To hibernate:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;# echo -n disk &amp;gt; /sys/power/state
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Ref: &lt;a href=&#34;http://askubuntu.com/questions/1792/how-can-i-suspend-hibernate-from-command-line&#34;&gt;http://askubuntu.com/questions/1792/how-can-i-suspend-hibernate-from-command-line&lt;/a&gt;&lt;/p&gt;</description>
    </item>
    <item>
      <title>Installing Plasma on Fedora 20</title>
      <link>https://blog.khmersite.net/p/fedora-20-installing-kde/</link>
      <pubDate>Thu, 02 Jan 2014 15:07:10 +0000</pubDate>
      <guid>https://blog.khmersite.net/p/fedora-20-installing-kde/</guid>
      <description>&lt;p&gt;From the command line:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;# yum install -y kde-runtime.x86_64 kdm @kde-desktop
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Optionally, if you want to run KDM instead of GDM:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;# systemctl disable gdm
# systemctl stop gdm
# systemctl start kdm
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Note: This guide should work on Fedora 19 as well; but I haven’t tested it.&lt;/p&gt;
&lt;p&gt;Source: &lt;a href=&#34;http://marcofalchi.blogspot.com.au/2013/10/fedora-1920-install-kde-kdm-swith-from.html&#34;&gt;http://marcofalchi.blogspot.com.au/2013/10/fedora-1920-install-kde-kdm-swith-from.html&lt;/a&gt;&lt;/p&gt;</description>
    </item>
    <item>
      <title>How to extract .xz file</title>
      <link>https://blog.khmersite.net/p/how-to-extract-xz-file/</link>
      <pubDate>Sun, 29 Dec 2013 20:41:10 +0000</pubDate>
      <guid>https://blog.khmersite.net/p/how-to-extract-xz-file/</guid>
      <description>&lt;p&gt;Today is the first time I ever saw a compressed file in *.xz format. According to this page &lt;a href=&#34;http://ubuntuforums.org/showthread.php?t=1116012&#34;&gt;TIP: extract .xz format&lt;/a&gt;, we can decompress it by running the following command:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;$ unxz sample.xz
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Just make sure you have “xz-utils” package, on Debian system, or something equivalent on other distros installed.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Setting proxy for CPAN</title>
      <link>https://blog.khmersite.net/p/setting-proxy-for-cpan/</link>
      <pubDate>Fri, 15 Nov 2013 12:45:05 +0000</pubDate>
      <guid>https://blog.khmersite.net/p/setting-proxy-for-cpan/</guid>
      <description>&lt;p&gt;To enable CPAN behind proxy:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;# perl -MCPAN -e shell
Terminal does not support AddHistory.

cpan shell -- CPAN exploration and modules installation (v1.9402)
Enter &amp;#39;h&amp;#39; for help.

cpan[1]&amp;gt; o conf init /proxy/

If you&amp;#39;re accessing the net via proxies, you can specify them in the
CPAN configuration or via environment variables. The variable in
the $CPAN::Config takes precedence.

 &amp;lt;ftp_proxy&amp;gt;
Your ftp_proxy? []

 &amp;lt;http_proxy&amp;gt;
Your http_proxy? [webproxy.yourdomain.com:8080]

 &amp;lt;no_proxy&amp;gt;
Your no_proxy? []

If your proxy is an authenticating proxy, you can store your username
permanently. If you do not want that, just press RETURN. You will then
be asked for your username in every future session.

Your proxy user id? []

Please remember to call &amp;#39;o conf commit&amp;#39; to make the config permanent!

cpan[2]&amp;gt; o conf commit
commit: wrote &amp;#39;/usr/share/perl5/CPAN/Config.pm&amp;#39;
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Ref:&lt;/p&gt;</description>
    </item>
    <item>
      <title>Install Google Chrome on Fedora 19</title>
      <link>https://blog.khmersite.net/p/install-google-chrome-on-fedora-19/</link>
      <pubDate>Fri, 15 Nov 2013 10:52:20 +0000</pubDate>
      <guid>https://blog.khmersite.net/p/install-google-chrome-on-fedora-19/</guid>
      <description>&lt;p&gt;Add the following to &lt;code&gt;/etc/yum.repos.d/google-chrome.repo&lt;/code&gt;:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;google-chrome]
name=google-chrome - 64-bit
baseurl=http://dl.google.com/linux/chrome/rpm/stable/x86_64
enabled=1
gpgcheck=1
gpgkey=https://dl-ssl.google.com/linux/linux_signing_key.pub
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Pick a version, stable, beta or unstable and install with the following command:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;# yum install google-chrome-stable
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Ref: &lt;a href=&#34;http://www.if-not-true-then-false.com/2010/install-google-chrome-with-yum-on-fedora-red-hat-rhel/&#34;&gt;http://www.if-not-true-then-false.com/2010/install-google-chrome-with-yum-on-fedora-red-hat-rhel/&lt;/a&gt;&lt;/p&gt;</description>
    </item>
    <item>
      <title>Permanently Disable Search Indexing In Windows 8</title>
      <link>https://blog.khmersite.net/p/permanently-disable-search-indexing-in-windows-8/</link>
      <pubDate>Mon, 04 Nov 2013 10:17:10 +0000</pubDate>
      <guid>https://blog.khmersite.net/p/permanently-disable-search-indexing-in-windows-8/</guid>
      <description>&lt;p&gt;This post is mainly to remind me how to disable the search indexing.&lt;/p&gt;
&lt;p&gt;On the start screen type: services.msc. Once the service dialog windows opened, look for “Windows Search”. Right click on it, and select Properties. In the Startup type drop-down list, select Disabled.&lt;/p&gt;
&lt;p&gt;Full credit goes to this link: &lt;a href=&#34;http://www.addictivetips.com/windows-tips/how-to-permanently-disable-search-indexing-in-windows-8/&#34;&gt;http://www.addictivetips.com/windows-tips/how-to-permanently-disable-search-indexing-in-windows-8/&lt;/a&gt;.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Upgrade existing Perl 5.12 to Perl 5.18 on FreeBSD 9</title>
      <link>https://blog.khmersite.net/p/upgrade-existing-perl-5-12-to-perl-5-18-on-freebsd-9/</link>
      <pubDate>Wed, 30 Oct 2013 12:20:19 +0000</pubDate>
      <guid>https://blog.khmersite.net/p/upgrade-existing-perl-5-12-to-perl-5-18-on-freebsd-9/</guid>
      <description>&lt;p&gt;Recently I’ve been trying to update the perl package on my FreeBSD box to the latest version 5.18 without any success. Here’s a snippet of the error message:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;Creating various symlinks in /usr/bin...
    Symlinking /usr/local/bin/perl5.18.1 to /usr/bin/perl
    Symlinking /usr/local/bin/perl5.18.1 to /usr/bin/perl5
Done.
Installing perl5.18-5.18.1_2...pkg-static: perl5.18-5.18.1_2 conflicts with perl-5.12.5 (installs files into the same place).  Problematic file: /usr/local/bin/a2p
*** [fake-pkg] Error code 70
Stop in /usr/ports/lang/perl5.18.
*** [install] Error code 1

Stop in /usr/ports/lang/perl5.18.

===&amp;gt;&amp;gt;&amp;gt; Installation of perl5.18-5.18.1_2 (lang/perl5.18) failed
===&amp;gt;&amp;gt;&amp;gt; Aborting update

===&amp;gt;&amp;gt;&amp;gt; Killing background jobs
Terminated

===&amp;gt;&amp;gt;&amp;gt; You can restart from the point of failure with this command line:
portmaster lang/perl5.18

===&amp;gt;&amp;gt;&amp;gt; Exiting
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;So I turned to Google to see if other people experienced the same thing as me. According to an answer to a similar question about upgrading perl on &lt;a href=&#34;http://serverfault.com/questions/405605/what-is-the-easiest-way-to-upgrade-my-existing-perl-5-14-to-perl-5-16-on-freebsd&#34;&gt;serverfault.com&lt;/a&gt;, one should read&lt;/p&gt;</description>
    </item>
    <item>
      <title>ZFS on CentOS</title>
      <link>https://blog.khmersite.net/p/zfs-on-centos/</link>
      <pubDate>Tue, 08 Oct 2013 07:55:46 +0000</pubDate>
      <guid>https://blog.khmersite.net/p/zfs-on-centos/</guid>
      <description>&lt;p&gt;First we need to add the ZFS on Linux repository to our system by installing a zfs-release package as shown below:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-console&#34; data-lang=&#34;console&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;$ sudo yum localinstall --nogpgcheck http://archive.zfsonlinux.org/epel/zfs-release-1-3.el6.noarch.rpm
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;$ sudo yum install zfs 
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Once, zfs has been installed, we can create a storage pool. There’re many RAID configuration to choose from, and I’m not going to get into it. However, if you want to learn more, you can read this &lt;a href=&#34;https://pthree.org/2012/12/05/zfs-administration-part-ii-raidz/&#34;&gt;ZFS Administration&lt;/a&gt; article which explains in great detail about ZFS RAID(Z).&lt;/p&gt;</description>
    </item>
    <item>
      <title>Portsnap snapshot corrupt</title>
      <link>https://blog.khmersite.net/p/portsnap-snapshot-corrupt/</link>
      <pubDate>Mon, 07 Oct 2013 08:15:10 +0000</pubDate>
      <guid>https://blog.khmersite.net/p/portsnap-snapshot-corrupt/</guid>
      <description>&lt;p&gt;ថ្ងៃ​នេះខ្ញុំ​​មាន​បញ្ហា​ជាមួយ​ portsnap លើ​ FreeBSD ស៊ើវើ។ ពេល​ខ្ញុំ​រត់​ខំម៉ាន​ portsnap fetch upate មាន​ពត៌មាន​ដូច​នេះ&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;/usr/ports/files/.gz not found — snapshot corrupt.
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;តាម​ប្លក់នេះ របៀប​ជួសជុល​វា មិន​ពិបាកទេ។&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;rm -rf /var/db/portsnap/*
portsnap fetch
portsnap extract
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Source: &lt;a href=&#34;http://neonpulse.net/2008/11/20/portsnap-corrupt-snapshot/&#34;&gt;http://neonpulse.net/2008/11/20/portsnap-corrupt-snapshot/&lt;/a&gt;&lt;/p&gt;</description>
    </item>
    <item>
      <title>E: Internal Error, No file name for libapt-pkg4.12</title>
      <link>https://blog.khmersite.net/p/e-internal-error-no-file-name-for-libapt-pkg4-12/</link>
      <pubDate>Thu, 03 Oct 2013 00:24:34 +0000</pubDate>
      <guid>https://blog.khmersite.net/p/e-internal-error-no-file-name-for-libapt-pkg4-12/</guid>
      <description>&lt;p&gt;When I tried to update an Ubuntu (12.04) machine with the usual apt-get command, this error message came up:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;Do you want to continue [Y/n]? Y
E: Internal Error, No file name for libapt-pkg4.12
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Reading this post (&lt;a href=&#34;http://ubuntuforums.org/showthread.php?t=2045321)&#34;&gt;http://ubuntuforums.org/showthread.php?t=2045321)&lt;/a&gt;, one way to fix it is to download liapt-pkg4.12 and re-install it:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;# apt-get download libapt-pkg4.12/precise-security
# dpkg -i libapt-pkg4.12_0.8.16~exp12ubuntu10.10_amd64.deb
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;This seems did the trick.&lt;/p&gt;</description>
    </item>
    <item>
      <title>បញ្ចូល​ Upstream Version នៃ Node.js ក្នុង Ubuntu 12.04</title>
      <link>https://blog.khmersite.net/p/install-upstream-version-of-node-js-on-ubuntu-12-04/</link>
      <pubDate>Tue, 01 Oct 2013 05:11:15 +0000</pubDate>
      <guid>https://blog.khmersite.net/p/install-upstream-version-of-node-js-on-ubuntu-12-04/</guid>
      <description>&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;$ sudo apt-get install python-software-properties
$ sudo apt-add-repository ppa:chris-lea/node.js
$ sudo apt-get update
$ sudo apt-get install nodejs
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;ឆែក​មើល:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;$ node -v
v0.10.20
&lt;/code&gt;&lt;/pre&gt;</description>
    </item>
    <item>
      <title>Turn color on for git status</title>
      <link>https://blog.khmersite.net/p/turn-color-on-for-git-status/</link>
      <pubDate>Thu, 26 Sep 2013 03:49:33 +0000</pubDate>
      <guid>https://blog.khmersite.net/p/turn-color-on-for-git-status/</guid>
      <description>&lt;p&gt;The following command will update the Git&amp;rsquo;s global configuration to set the &lt;code&gt;color.ui&lt;/code&gt; to &lt;code&gt;true&lt;/code&gt;.&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;$ git config --global color.ui true
&lt;/code&gt;&lt;/pre&gt;&lt;ul&gt;
&lt;li&gt;Ref: &lt;a href=&#34;https://ask.fedoraproject.org/question/10434/f18-why-are-there-no-gnome-terminal-colors-for-git/&#34;&gt;https://ask.fedoraproject.org/question/10434&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;</description>
    </item>
    <item>
      <title>Changing ZFS pool to use disk ID instead of disk assignment</title>
      <link>https://blog.khmersite.net/p/changing-zfs-pool-to-use-disk-id-instead-of-disk-assignment/</link>
      <pubDate>Fri, 20 Sep 2013 06:49:51 +0000</pubDate>
      <guid>https://blog.khmersite.net/p/changing-zfs-pool-to-use-disk-id-instead-of-disk-assignment/</guid>
      <description>&lt;p&gt;This what I have:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-console&#34; data-lang=&#34;console&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;# zpool status
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  pool: tank
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; state: ONLINE
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  scan: none requested
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;config:
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#960050;background-color:#1e0010&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        NAME        STATE     READ WRITE CKSUM
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        tank        ONLINE       0     0     0
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;          raidz1-0  ONLINE       0     0     0
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;            sdb     ONLINE       0     0     0
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;            sdc     ONLINE       0     0     0
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;            sdd     ONLINE       0     0     0
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;To convert the pool to use disk’s ID instead of device files such as /dev/sda, we need to export the storage pool.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Install Python 3 on CentOS 6</title>
      <link>https://blog.khmersite.net/p/install-python-3-on-centos-6/</link>
      <pubDate>Wed, 04 Sep 2013 06:00:26 +0000</pubDate>
      <guid>https://blog.khmersite.net/p/install-python-3-on-centos-6/</guid>
      <description>&lt;p&gt;The latest release of Python 3 is 3.3.2, and there’s no package available on CentOS repo via yum. The following steps explains how to manually get Python 3 onto a CentOS system:&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Install development tools&lt;/strong&gt;&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;# yum groupinstall &amp;#34;Development Tools&amp;#34;

# yum install zlib-devel bzip2-devel openssl-devel \
ncurses-devel sqlite-devel readline-devel tk-devel
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;&lt;strong&gt;Download and install Python&lt;/strong&gt;&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;$ wget http://python.org/ftp/python/3.3.2/Python-3.3.2.tar.bz2
$ tar xjf Python-3.3.2.tar.bz2
$ cd Python-3.3.2
$ ./configure --prefix=/opt/python3
$ make
$ make install&amp;lt;/pre&amp;gt;
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;&lt;strong&gt;Test&lt;/strong&gt;&lt;/p&gt;</description>
    </item>
    <item>
      <title>How to Fix a PuppetDB SSL Error</title>
      <link>https://blog.khmersite.net/p/how-to-fix-puppetdb-ssl-error/</link>
      <pubDate>Thu, 22 Aug 2013 05:34:05 +0000</pubDate>
      <guid>https://blog.khmersite.net/p/how-to-fix-puppetdb-ssl-error/</guid>
      <description>&lt;p&gt;If you don&amp;rsquo;t know what PuppetDB is, this post probably will not be useful to you. But if you want to learn about it, you can visit the official documentation: &lt;a href=&#34;http://docs.puppetlabs.com/puppetdb/latest/index.html&#34;&gt;http://docs.puppetlabs.com/puppetdb/latest/index.html&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;For PuppetDB to work, it needs SSL certificates generated by a Puppet master. In my case, I needed to reconfigure an existing PuppetDB instance to use a new Puppet master that was running on the same server. Here&amp;rsquo;s how I did it:&lt;/p&gt;</description>
    </item>
    <item>
      <title>FreeBSD configure: error: XML::Parser perl module is required for intltool</title>
      <link>https://blog.khmersite.net/p/freebsd-configure-error-xmlparser-perl-module-is-required-for-intltool/</link>
      <pubDate>Wed, 24 Jul 2013 06:13:03 +0000</pubDate>
      <guid>https://blog.khmersite.net/p/freebsd-configure-error-xmlparser-perl-module-is-required-for-intltool/</guid>
      <description>&lt;p&gt;If you get this error message on a FreeBSD host, you may need to reinstall &lt;code&gt;p5-XML-Parser&lt;/code&gt;.&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;# portmaster textproc/p5-XML-Parser
&lt;/code&gt;&lt;/pre&gt;</description>
    </item>
    <item>
      <title>Upgrading from Fedora 18 to 19</title>
      <link>https://blog.khmersite.net/p/upgrading-from-fedora-18-to-19/</link>
      <pubDate>Tue, 02 Jul 2013 16:06:59 +0000</pubDate>
      <guid>https://blog.khmersite.net/p/upgrading-from-fedora-18-to-19/</guid>
      <description>&lt;p&gt;I know Fedora 19 is officially released tomorrow; but if you can’t wait to upgrade your machine to the latest release like me, here is the command to do it:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;$ sudo fedup --network 19
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;One thing I noticed after the upgrade is that, the bottom status bar can’t be found when you hit the system key. The good news is it’s still there; you just need to hit system key + m to have it showed up.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Install crontab on CentOS 6</title>
      <link>https://blog.khmersite.net/p/install-crontab-on-centos-6/</link>
      <pubDate>Mon, 27 May 2013 14:33:26 +0000</pubDate>
      <guid>https://blog.khmersite.net/p/install-crontab-on-centos-6/</guid>
      <description>&lt;p&gt;When you install CentOS 6 using minimal CD, a lot of packages aren’t installed by default; &lt;strong&gt;cron&lt;/strong&gt; included. To install it,&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;# yum install cronie
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;After the installation, you can verify that crond is running:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;# chkconfig --list crond
crond 0:off 1:off 2:on 3:on 4:on 5:on 6:off
&lt;/code&gt;&lt;/pre&gt;</description>
    </item>
    <item>
      <title>Fix puppet-dashboard pending tasks</title>
      <link>https://blog.khmersite.net/p/fix-puppet-dashboard-pending-tasks/</link>
      <pubDate>Tue, 30 Apr 2013 05:43:47 +0000</pubDate>
      <guid>https://blog.khmersite.net/p/fix-puppet-dashboard-pending-tasks/</guid>
      <description>&lt;p&gt;ផាប់ភិត​ដាសបត ឈប់​ដើរ​ ហើយ​ pending tasks មាន​ប្រ​ហែល​ជាង ២០០០។&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;# ps -ef | grep job
www-data  4799     1  0 14:07 ?        00:00:00 delayed_job.0_monitor
www-data  4804     1  0 14:07 ?        00:00:00 delayed_job.1_monitor
root      8300 31461  0 15:22 pts/0    00:00:00 grep job
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;មិន​ដឹង​ថា​ជាមាន​វិធី​ល្អ​ សំរាប់​ជួសជុល​បញ្ហា​នេះទេ ប៉ុន្តែខ្ញុំ​អាច ប្រើវិធីដូចនេះ&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;# cd /usr/share/puppet-dashboard/
# rake RAILS_ENV=production jobs:work
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;អោយវារត់​ យ៉ាងយូរ​ បន្ទាប់​មក puppet-dashboard-worker ក៏ចាប់ផ្តើម​ដើរវិញ&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;# ps -ef | grep job
www-data  4799     1  0 14:07 ?        00:00:00 delayed_job.0_monitor
www-data  4804     1  0 14:07 ?        00:00:00 delayed_job.1_monitor
www-data  5089     1 24 14:15 ?        00:20:43 dashboard/delayed_job.0
www-data  5094     1 24 14:15 ?        00:20:45 dashboard/delayed_job.1
root      8570 31461  0 15:41 pts/0    00:00:00 grep job
&lt;/code&gt;&lt;/pre&gt;</description>
    </item>
    <item>
      <title>vmware: CD/DVD ROM drive is stuck in connecting mode</title>
      <link>https://blog.khmersite.net/p/vmware-cddvd-rom-drive-is-stuck-in-connecting-mode/</link>
      <pubDate>Mon, 11 Feb 2013 03:39:04 +0000</pubDate>
      <guid>https://blog.khmersite.net/p/vmware-cddvd-rom-drive-is-stuck-in-connecting-mode/</guid>
      <description>&lt;p&gt;As the title says, if the CD/DVD device of your VM is stuck in connecting mode, one thing to try is to shutdown the vSphere client, and restarted it.&lt;/p&gt;
&lt;p&gt;I found this solution from &lt;a href=&#34;http://communities.vmware.com/message/1784438&#34;&gt;http://communities.vmware.com/message/1784438&lt;/a&gt;, and it worked for me.&lt;/p&gt;</description>
    </item>
    <item>
      <title>PHP Fatal error: Call to undefined function utf8_decode()</title>
      <link>https://blog.khmersite.net/p/php-fatal-error-call-to-undefined-function-utf8_decode/</link>
      <pubDate>Tue, 25 Dec 2012 03:57:20 +0000</pubDate>
      <guid>https://blog.khmersite.net/p/php-fatal-error-call-to-undefined-function-utf8_decode/</guid>
      <description>&lt;p&gt;This occurs on a FreeBSD server. According to this post[1], I need to install &lt;code&gt;php5-xmlphp5-xml&lt;/code&gt;.&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;# whereis php5-xmlphp5-xml
php5-xml: /usr/ports/textproc/php5-xml
# portmaster textproc/php5-xml
...
# service apache22 restart
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;[1] &lt;a href=&#34;http://hi.baidu.com/ericyangbj/item/8289a32771e4171d09750856&#34;&gt;http://hi.baidu.com/ericyangbj/item/8289a32771e4171d09750856&lt;/a&gt;&lt;/p&gt;</description>
    </item>
    <item>
      <title>FreeBSD: Fatal error: Call to undefined function session_name()</title>
      <link>https://blog.khmersite.net/p/freebsd-fatal-error-call-to-undefined-function-session_name/</link>
      <pubDate>Tue, 25 Dec 2012 00:08:49 +0000</pubDate>
      <guid>https://blog.khmersite.net/p/freebsd-fatal-error-call-to-undefined-function-session_name/</guid>
      <description>&lt;p&gt;I just setup Apache and PHP on FreeBSD 9, configured a vhost, then when I tried to access it, I got the following error:&lt;/p&gt;
&lt;p&gt;&lt;code&gt;Fatal error: Call to undefined function session_name() in /srv/www/sugaku.domain.com/inc/init.php on line 144&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;so apparently, the “session” support is missiong from php5 installation. To fix it, I need to install &lt;code&gt;php5-session&lt;/code&gt; port.&lt;/p&gt;
&lt;p&gt;Let’s do it.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;# whereis php5-session&amp;lt;br /&amp;gt; php5-session: /usr/ports/www/php5-session&amp;lt;br /&amp;gt; portmaster www/php5-session&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;If the installation is successful, then we can restart apache.&lt;/p&gt;</description>
    </item>
    <item>
      <title>CentOS: lsb_release: command not found</title>
      <link>https://blog.khmersite.net/p/centos-lsb_release-command-not-found/</link>
      <pubDate>Sun, 21 Oct 2012 22:53:07 +0000</pubDate>
      <guid>https://blog.khmersite.net/p/centos-lsb_release-command-not-found/</guid>
      <description>&lt;p&gt;First let me declare that I’m new to CentOS. The folowing is a note to self which demonstrates how we search for a package that provides some commands and intall it using yum on CentOS.&lt;/p&gt;
&lt;p&gt;When I ran ‘lsb_release -a’, the following message is returned:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;-bash: lbs_release: command not found
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;To fix it, we need to install the package which provides lsb_release command.&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;# yum provides */lsb_release
...
redhat-lsb-4.0-3.el6.centos.i686 : LSB base libraries support for CentOS
Repo        : base
Matched from:
Filename    : /usr/bin/lsb_release

redhat-lsb-4.0-3.el6.centos.x86_64 : LSB base libraries support for CentOS
Repo        : base
Matched from:
Filename    : /usr/bin/lsb_release

dkms-2.2.0.3-2.el6.noarch : Dynamic Kernel Module Support Framework
Repo        : epel
Matched from:
Filename    : /usr/lib/dkms/lsb_release
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;So, let’s install redhat-lsb package:&lt;/p&gt;</description>
    </item>
    <item>
      <title>Turn on puppet syntax highlight in vim</title>
      <link>https://blog.khmersite.net/p/turn-on-puppet-syntax-highlight-in-vim/</link>
      <pubDate>Fri, 21 Sep 2012 02:01:47 +0000</pubDate>
      <guid>https://blog.khmersite.net/p/turn-on-puppet-syntax-highlight-in-vim/</guid>
      <description>&lt;p&gt;On Debian/Ubuntu:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;$ sudo apt-get install vim-puppet
$ ln -s /usr/share/vim/addons/syntax/puppet.vim ~/.vim/plugin/
&lt;/code&gt;&lt;/pre&gt;</description>
    </item>
    <item>
      <title>Fix missing icons and ugly theme in Evolution on Kubuntu 11.10</title>
      <link>https://blog.khmersite.net/p/fix-missing-icons-and-ugly-theme-in-evolution-on-kubuntu-11-10/</link>
      <pubDate>Tue, 18 Sep 2012 06:43:05 +0000</pubDate>
      <guid>https://blog.khmersite.net/p/fix-missing-icons-and-ugly-theme-in-evolution-on-kubuntu-11-10/</guid>
      <description>&lt;p&gt;This how Evolution looks like on Kubuntu 11.10 (Oneiric).&lt;/p&gt;
&lt;p&gt;&lt;img alt=&#34;Missing icon image&#34; loading=&#34;lazy&#34; src=&#34;https://blog.khmersite.net/wp-content/uploads/2012/09/missing_icons1.png&#34;&gt;&lt;/p&gt;
&lt;p&gt;To fix this, make sure this package is installed: &amp;ldquo;humanity-icon-theme&amp;rdquo;, then create &lt;code&gt;$HOME/.config/gtk-3.0/settings.ini&lt;/code&gt;.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-console&#34; data-lang=&#34;console&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;[Settings]
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;gtk-fallback-icon-theme = Humanity
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Restart Evolution, and it should be fixed.&lt;/p&gt;
&lt;p&gt;&lt;img alt=&#34;missing_icons2&#34; loading=&#34;lazy&#34; src=&#34;https://blog.khmersite.net/wp-content/uploads/2012/09/missing_icons2.png&#34;&gt;&lt;/p&gt;
&lt;p&gt;Credit: &lt;a href=&#34;http://www.kubuntuforums.net/showthread.php?56624-solution-Evolution-in-Kubuntu-11-10&#34;&gt;[solution] Evolution in Kubuntu 11.10&lt;/a&gt;&lt;/p&gt;</description>
    </item>
    <item>
      <title>Unknown Authn provider: ldap</title>
      <link>https://blog.khmersite.net/p/unknown-authn-provider-ldap/</link>
      <pubDate>Wed, 12 Sep 2012 00:11:38 +0000</pubDate>
      <guid>https://blog.khmersite.net/p/unknown-authn-provider-ldap/</guid>
      <description>&lt;p&gt;Unknown Authn provider: ldap&lt;/p&gt;
&lt;p&gt;&lt;code&gt;a2enmod authnz_ldap&amp;lt;br /&amp;gt; apache2ctl restart&lt;/code&gt;&lt;/p&gt;</description>
    </item>
    <item>
      <title>Fix: Xfce 4.10 panel no longer expands</title>
      <link>https://blog.khmersite.net/p/fix-xfce-4-10-panel-no-longer-expands/</link>
      <pubDate>Fri, 24 Aug 2012 01:35:35 +0000</pubDate>
      <guid>https://blog.khmersite.net/p/fix-xfce-4-10-panel-no-longer-expands/</guid>
      <description>&lt;p&gt;After upgrading to Xfce 4.10 from 4.8, I noticed that the clock/notification area no longer pushed to the right edge of the panel.&lt;/p&gt;
&lt;p&gt;&lt;img alt=&#34;xfce_not_expand&#34; loading=&#34;lazy&#34; src=&#34;https://blog.khmersite.net/wp-content/uploads/2012/08/xfce_not_expand.png&#34;&gt;&lt;/p&gt;
&lt;p&gt;This is due to a change in the Window Buttons panel plugin which no longer expands to fill the available space[1].&lt;/p&gt;
&lt;p&gt;To emulate the old behavior, add a transparent separator between the window buttons and the clock/notification area, setting its expand property.&lt;/p&gt;
&lt;p&gt;&lt;img alt=&#34;xfce_not_expand1&#34; loading=&#34;lazy&#34; src=&#34;https://blog.khmersite.net/wp-content/uploads/2012/08/xfce_not_expand1.png&#34;&gt;&lt;/p&gt;
&lt;p&gt;Voilla!&lt;/p&gt;
&lt;p&gt;&lt;img alt=&#34;xfce_not_expand2&#34; loading=&#34;lazy&#34; src=&#34;https://blog.khmersite.net/wp-content/uploads/2012/08/xfce_not_expand2.png&#34;&gt;&lt;/p&gt;
&lt;p&gt;[1] &lt;a href=&#34;https://wiki.archlinux.org/index.php/Xfce&#34;&gt;https://wiki.archlinux.org/index.php/Xfce&lt;/a&gt;&lt;/p&gt;</description>
    </item>
    <item>
      <title>FreeNX: Disable Persistent Session</title>
      <link>https://blog.khmersite.net/p/freenx-disable-persistent-session/</link>
      <pubDate>Wed, 22 Aug 2012 00:42:18 +0000</pubDate>
      <guid>https://blog.khmersite.net/p/freenx-disable-persistent-session/</guid>
      <description>&lt;p&gt;It’s a bit unintuitive to set non-persistent session on FreeNX server. After a few attempts, here is the working settings:&lt;/p&gt;
&lt;p&gt;Edit &lt;code&gt;/usr/NX/etc/node.cfg&lt;/code&gt;:&lt;/p&gt;
&lt;p&gt;&lt;code&gt;ENABLE_PERSISTENT_SESSION=&amp;quot;&amp;quot;&amp;lt;br /&amp;gt; DISABLE_PERSISTENT_SESSION=&amp;quot;all&amp;quot;&lt;/code&gt;&lt;/p&gt;</description>
    </item>
    <item>
      <title>KDE Desktop Shell Scripting Console</title>
      <link>https://blog.khmersite.net/p/kde-desktop-shell-scripting-console/</link>
      <pubDate>Thu, 16 Aug 2012 01:47:03 +0000</pubDate>
      <guid>https://blog.khmersite.net/p/kde-desktop-shell-scripting-console/</guid>
      <description>&lt;p&gt;I keep forgetting how to run Desktop Shell Scripting Console. So here it is, something just to remind myself:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Alt + F2&lt;/li&gt;
&lt;li&gt;Type &lt;code&gt;desktop console&lt;/code&gt; and hit the enter key&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;img alt=&#34;Desktop Shell Scripting Console image&#34; loading=&#34;lazy&#34; src=&#34;https://blog.khmersite.net/wp-content/uploads/2012/08/desktop-shell-scripting-console.png&#34;&gt;&lt;/p&gt;
&lt;p&gt;Wanna learn more what this tool&amp;rsquo;s for? Head to &lt;a href=&#34;http://techbase.kde.org/KDE_System_Administration/PlasmaDesktopScripting#Running_Scripts&#34;&gt;KDE System Administration/PlasmaDesktopScripting&lt;/a&gt;.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Vim backspace delete problem</title>
      <link>https://blog.khmersite.net/p/vim-backspace-delete-problem/</link>
      <pubDate>Tue, 07 Aug 2012 12:21:17 +0000</pubDate>
      <guid>https://blog.khmersite.net/p/vim-backspace-delete-problem/</guid>
      <description>&lt;p&gt;In insert mode, backpace doesn’t delete characters as intended. To fix this issue, add this configuration to the &lt;code&gt;.vimrc&lt;/code&gt; as the following:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;set backspace=indent,eol,start
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Reference:&lt;/p&gt;
&lt;p&gt;&lt;a href=&#34;http://vim.wikia.com/wiki/Backspace_and_delete_problems&#34;&gt;http://vim.wikia.com/wiki/Backspace_and_delete_problems&lt;/a&gt;&lt;/p&gt;</description>
    </item>
    <item>
      <title>FreeBSD: How to check version of installed packages</title>
      <link>https://blog.khmersite.net/p/freebsd-how-to-check-version-of-installed-packages/</link>
      <pubDate>Wed, 01 Aug 2012 22:52:43 +0000</pubDate>
      <guid>https://blog.khmersite.net/p/freebsd-how-to-check-version-of-installed-packages/</guid>
      <description>&lt;p&gt;&lt;code&gt;# pkg_version -v&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;Running pkg_version -v could take a while. If we only want a quick look:&lt;/p&gt;
&lt;p&gt;&lt;code&gt;# pkg_info -xI&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;If we want to see if some packages are out of date:&lt;/p&gt;
&lt;p&gt;&lt;code&gt;# pkg_version -v -X -s&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;And to check all out of date packages:&lt;/p&gt;
&lt;p&gt;&lt;code&gt;# pkg_version -vL &amp;quot;=&amp;quot;&lt;/code&gt;&lt;/p&gt;</description>
    </item>
    <item>
      <title>Installing FreeBSD 9 source</title>
      <link>https://blog.khmersite.net/p/installing-freebsd-9-source/</link>
      <pubDate>Sun, 29 Jul 2012 12:01:21 +0000</pubDate>
      <guid>https://blog.khmersite.net/p/installing-freebsd-9-source/</guid>
      <description>&lt;p&gt;Well, I need FreebSD 9 source to compile &lt;code&gt;fusefs-kmod&lt;/code&gt;, which is required by &lt;code&gt;gvfs&lt;/code&gt;, which’s in turn required by &lt;code&gt;xfce&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;A lot of people recommend to use sysinstall to add the so called userland sources.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;sysinstall -&amp;gt; Configure -&amp;gt; Distribution -&amp;gt; src&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;However, it didn’t work!!&lt;/p&gt;
&lt;p&gt;Thanks to wblock@[1] who pointed out that “sysinstall is mostly dead” and suggested a few ways to get the sources to your system. One of them is:&lt;/p&gt;</description>
    </item>
    <item>
      <title>Change cursor theme in Xfce on Freebsd</title>
      <link>https://blog.khmersite.net/p/change-cursor-theme-in-xfce-on-freebsd/</link>
      <pubDate>Thu, 26 Jul 2012 11:19:29 +0000</pubDate>
      <guid>https://blog.khmersite.net/p/change-cursor-theme-in-xfce-on-freebsd/</guid>
      <description>&lt;ul&gt;
&lt;li&gt;Install the preferred cursor theme. I personally like dmz-cursor-theme.&lt;/li&gt;
&lt;/ul&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-console&#34; data-lang=&#34;console&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;# pkg_add -r cursor-dmz-theme
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;ul&gt;
&lt;li&gt;Then, &lt;strong&gt;Applications Menu -&amp;gt; Settings -&amp;gt; Mouse&lt;/strong&gt;. Click on Theme tab, select the preferred theme and click Close.&lt;/li&gt;
&lt;li&gt;Log out of the current Xfce session, then log back in.&lt;/li&gt;
&lt;/ul&gt;</description>
    </item>
    <item>
      <title>KDE4 System-wide Force Font DPI Setting</title>
      <link>https://blog.khmersite.net/p/kde4-system-wide-force-font-dpi-setting/</link>
      <pubDate>Sun, 22 Jul 2012 01:17:22 +0000</pubDate>
      <guid>https://blog.khmersite.net/p/kde4-system-wide-force-font-dpi-setting/</guid>
      <description>&lt;p&gt;Recently, while setting up a Kubuntu Linux terminal server using freenx, I’ve got an issue with the font display being too small. A quick check in Font settings (Applications -&amp;gt; Settings -&amp;gt; System Settings -&amp;gt; Fonts) showed that the “Force fonts DPI” was set to Disabled.&lt;/p&gt;
&lt;p&gt;To correct this per user, it’s as easy as to select the 96 DPI from the drop down menu, logout and log back in. However, if we want to apply this setting to all users, there’s a bit of more work.&lt;/p&gt;</description>
    </item>
    <item>
      <title>បញ្ចូល C/C&#43;&#43; plugin (or CDT) ក្នុង Eclipse</title>
      <link>https://blog.khmersite.net/p/%E1%9E%94%E1%9E%89%E1%9F%92%E1%9E%85%E1%9E%BC%E1%9E%9B-cc-plugin-or-cdt-%E1%9E%80%E1%9F%92%E1%9E%93%E1%9E%BB%E1%9E%84-eclipse/</link>
      <pubDate>Fri, 20 Jul 2012 00:39:36 +0000</pubDate>
      <guid>https://blog.khmersite.net/p/%E1%9E%94%E1%9E%89%E1%9F%92%E1%9E%85%E1%9E%BC%E1%9E%9B-cc-plugin-or-cdt-%E1%9E%80%E1%9F%92%E1%9E%93%E1%9E%BB%E1%9E%84-eclipse/</guid>
      <description>&lt;p&gt;សំណាង​ល្អ អ៊ូប៊ុនធូ មាន​កញ្ចប់មួយ​ឈ្មោះ eclipse-cdt​ ។&lt;/p&gt;
&lt;p&gt;យើង​អាច​បញ្ចូល​វា​ដោយ ខំម៉ានដូច​នេះ&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-console&#34; data-lang=&#34;console&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;$ sudo apt-get install eclipse-cdt
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;ពេល​បើក​ Eclipse លើកក្រោយ​ ហើយ​បង្កើត project ថ្មី យើងនឹងឃើញ​ស្រដៀងនេះ&lt;/p&gt;
&lt;p&gt;&lt;img alt=&#34;C/C++ project in Eclipse&#34; loading=&#34;lazy&#34; src=&#34;https://blog.khmersite.net/wp-content/uploads/2012/07/eclipse_new_project.png&#34;&gt;&lt;/p&gt;</description>
    </item>
    <item>
      <title>Fix: (K)ubuntu doesn&amp;#8217;t play Audio CD</title>
      <link>https://blog.khmersite.net/p/fix-kubuntu-doesnt-play-audio-cd/</link>
      <pubDate>Wed, 11 Jul 2012 01:49:55 +0000</pubDate>
      <guid>https://blog.khmersite.net/p/fix-kubuntu-doesnt-play-audio-cd/</guid>
      <description>&lt;p&gt;On Kubuntu 11.10, we have KsCD program installed to play audio CD. The problem I’m having is that some machines could play audio cd and some couldn’t. All machines run Kubuntu 11.10.&lt;/p&gt;
&lt;p&gt;To fix this issue, check that &lt;code&gt;/dev/cdrom&lt;/code&gt; is a sym link to &lt;code&gt;/dev/sr0&lt;/code&gt; (credit [1]).&lt;/p&gt;
&lt;p&gt;In my case, machines which couldn&amp;rsquo;t play audio CD don&amp;rsquo;t have &amp;lsquo;/dev/cdrom&amp;rsquo;:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;# ls -l /dev/cd*
ls: cannot access /dev/cd*: No such file or directory
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Let’s create one:&lt;/p&gt;</description>
    </item>
    <item>
      <title>svc: failed to register lockdv1 RPC service (errno 97).</title>
      <link>https://blog.khmersite.net/p/svc-failed-to-register-lockdv1-rpc-service-errno-97/</link>
      <pubDate>Fri, 11 Nov 2011 12:49:56 +0000</pubDate>
      <guid>https://blog.khmersite.net/p/svc-failed-to-register-lockdv1-rpc-service-errno-97/</guid>
      <description>&lt;p&gt;It started with&amp;hellip; when I tried to start &lt;code&gt;nfs-kernel-server&lt;/code&gt;, it just failed.&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;# /etc/init.d/nfs-kernel-server start
Exporting directories for NFS kernel daemon....
Starting NFS kernel daemon: nfsd svcgssd failed!
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;syslogs:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;Nov 11 23:32:04 nasbox kernel: [ 8106.165582] nfsd: last server has exited, flushing export cache
Nov 11 23:32:05 nasbox kernel: [ 8107.240419] svc: failed to register lockdv1 RPC service (errno 97).
Nov 11 23:32:05 nasbox kernel: [ 8107.245528] NFSD: Using /var/lib/nfs/v4recovery as the NFSv4 state recovery directory
Nov 11 23:32:05 nasbox kernel: [ 8107.245566] NFSD: starting 90-second grace period
Nov 11 23:32:05 nasbox rpc.svcgssd[26744]: ERROR: GSS-API: error in gss_acquire_cred(): Unspecified GSS failure. Minor code may provide more information - Key table entry not found
Nov 11 23:32:05 nasbox rpc.svcgssd[26744]: unable to obtain root (machine) credentials
Nov 11 23:32:05 nasbox rpc.svcgssd[26744]: do you have a keytab entry for nfs/@ in /etc/krb5.keytab?
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;If you have DNS server running, make sure you remove the following lines from &lt;code&gt;/etc/hosts&lt;/code&gt;:&lt;/p&gt;</description>
    </item>
    <item>
      <title>Ubuntu 11.10: 32-bit applications do not run 64-bit</title>
      <link>https://blog.khmersite.net/p/ubuntu-11-10-32-bit-applications-do-not-run-64-bit/</link>
      <pubDate>Thu, 27 Oct 2011 11:47:05 +0000</pubDate>
      <guid>https://blog.khmersite.net/p/ubuntu-11-10-32-bit-applications-do-not-run-64-bit/</guid>
      <description>&lt;p&gt;After upgrading from natty (11.04) to oneiric (11.10), some 32-bit applications don’t run anymore. I have ‘ia32-libs’ and ‘libc6-i386’ packages installed. For example, when I run Android adb,&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;$ ./adb
bash: ./adb: No such file or directory
$ file adb
adb: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.8, stripped
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;After googling around, the fix is quite simple: re-install ‘libc6-i386’.&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;$ sudo apt-get install --reinstall libc6-i386
$ ./adb
Android Debug Bridge version 1.0.29
 -d                            - directs command to the only connected USB device
                                 returns an error if more than one USB device is present.
 -e                            - directs command to the only running emulator.
...
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Reference:&lt;/p&gt;</description>
    </item>
    <item>
      <title>How to decompress .tar.Z</title>
      <link>https://blog.khmersite.net/p/how-to-decompress-tar-z/</link>
      <pubDate>Thu, 06 Oct 2011 05:17:52 +0000</pubDate>
      <guid>https://blog.khmersite.net/p/how-to-decompress-tar-z/</guid>
      <description>&lt;p&gt;One way to extract a .tar.Z file:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-console&#34; data-lang=&#34;console&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;$ zcat file.tar.Z | tar xvf -
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;</description>
    </item>
    <item>
      <title>Beautify gitk font on Debian/Ubuntu</title>
      <link>https://blog.khmersite.net/p/beautify-gitk-font-on-debianubuntu/</link>
      <pubDate>Sun, 04 Sep 2011 11:35:11 +0000</pubDate>
      <guid>https://blog.khmersite.net/p/beautify-gitk-font-on-debianubuntu/</guid>
      <description>&lt;p&gt;Install tk8.5, if not yet installed:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;# apt-get install tk8.5
# update-alternatives --config wish

  Selection    Alternative
-----------------------------------------------
          1    /usr/bin/wish8.4
*+        2    /usr/bin/wish-default
          3    /usr/bin/wish8.5&amp;lt;/pre&amp;gt;
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;There are 3 alternatives which provide &lt;code&gt;wish&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;Type in the number that corresponds to &lt;code&gt;tk8.5&lt;/code&gt; (in my case was 3) then hit enter.&lt;/p&gt;
&lt;p&gt;Change fonts in &lt;code&gt;~/.gitk&lt;/code&gt; to &lt;code&gt;DejaVu Sans Mono&lt;/code&gt;.&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;set mainfont {{DejaVu Sans Mono} 9}
set textfont {{DejaVu Sans Mono} 9}
set uifont {{DejaVu Sans Mono} 9 bold}
&lt;/code&gt;&lt;/pre&gt;</description>
    </item>
    <item>
      <title>How to replace default fonts in MIUI rom</title>
      <link>https://blog.khmersite.net/p/how-to-replace-default-fonts-in-miui-rom/</link>
      <pubDate>Sun, 24 Jul 2011 02:35:46 +0000</pubDate>
      <guid>https://blog.khmersite.net/p/how-to-replace-default-fonts-in-miui-rom/</guid>
      <description>&lt;p&gt;MIUI (1.7.22) uses Arial as the default font.  If you hate it as I do, here is how to change it.&lt;/p&gt;
&lt;p&gt;I assume you have &lt;code&gt;adb&lt;/code&gt; working. We are going to replace only 2 fonts - &lt;code&gt;Arial.ttf&lt;/code&gt; and &lt;code&gt;Arial-Bold.ttf&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;First, let’s back up the old fonts just in case thing didn’t go well as we want to. (I learned this the hard way, and keen to avoid it at all cost)&lt;/p&gt;</description>
    </item>
    <item>
      <title>PHP extension &#34;mcrypt&#34; must be loaded.</title>
      <link>https://blog.khmersite.net/p/php-extension-mcrypt-must-be-loaded/</link>
      <pubDate>Sun, 22 May 2011 05:12:54 +0000</pubDate>
      <guid>https://blog.khmersite.net/p/php-extension-mcrypt-must-be-loaded/</guid>
      <description>&lt;p&gt;On Ubuntu or Debian:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;$ sudo apt-cache search php|egrep ^php5-
$ sudo apt-get install php5-mcrypt
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Ref: &lt;a href=&#34;http://serverfault.com/questions/132551/install-php-extensions-on-ubuntu&#34;&gt;Install php extensions on ubuntu&lt;/a&gt;&lt;/p&gt;</description>
    </item>
    <item>
      <title>Kill all processes of a user</title>
      <link>https://blog.khmersite.net/p/kill-all-processes-of-a-user/</link>
      <pubDate>Mon, 09 May 2011 23:58:54 +0000</pubDate>
      <guid>https://blog.khmersite.net/p/kill-all-processes-of-a-user/</guid>
      <description>&lt;p&gt;The following command will kill all processes belong to a single user on Linux.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;pkill -u username&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;Credit: &lt;a href=&#34;http://www.blindhog.net/linux-kill-all-processes-for-a-user/&#34;&gt;Linux – Kill all processes for a user&lt;/a&gt;&lt;/p&gt;</description>
    </item>
    <item>
      <title>[FIXED] bind9 is running bind9 status reports failed!</title>
      <link>https://blog.khmersite.net/p/fixed-bind9-is-running-bind9-status-reports-failed/</link>
      <pubDate>Sun, 19 Dec 2010 00:41:58 +0000</pubDate>
      <guid>https://blog.khmersite.net/p/fixed-bind9-is-running-bind9-status-reports-failed/</guid>
      <description>&lt;p&gt;&lt;code&gt;bind9&lt;/code&gt; runs in a chroot environment on lenny. The service can be started as usual:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;# /etc/init.d/bind9 start
Starting domain name service...: bind9.
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Let’s check bind9 status:&lt;/p&gt;
&lt;p&gt;`&lt;/p&gt;
&lt;h1 id=&#34;etcinitdbind9-status&#34;&gt;/etc/init.d/bind9 status&lt;/h1&gt;
&lt;p&gt;bind9 is not running failed!
`&lt;/p&gt;
&lt;p&gt;Well, the first thing I did was to check the log file, in which I found no error related to named. So I tried another way to check the status:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;# rndc status
version: 9.6-ESV-R3
CPUs found: 1
worker threads: 1
number of zones: 17
debug level: 0
xfers running: 0
xfers deferred: 0
soa queries in progress: 0
query logging is OFF
recursive clients: 0/0/1000
tcp clients: 0/100
server is up and running
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;I was convinced that the DNS service was running. So what went wrong? It must be something in the &lt;code&gt;/etc/init.d/bind9&lt;/code&gt; script that incorrectly reports bind9 status. Opened up this file, I found:&lt;/p&gt;</description>
    </item>
    <item>
      <title>What the heck: three.net.au redirecting to www.policywording.com.au</title>
      <link>https://blog.khmersite.net/p/what-the-heck-three-net-au-redirecting-to-www-policywording-com-au/</link>
      <pubDate>Thu, 09 Dec 2010 13:31:21 +0000</pubDate>
      <guid>https://blog.khmersite.net/p/what-the-heck-three-net-au-redirecting-to-www-policywording-com-au/</guid>
      <description>&lt;p&gt;&lt;strong&gt;3&lt;/strong&gt; is my mobile carrier. It offers an online service which allows its customers to check the current usage from their phones by accessing this URL: three.net.au/my3/gethome.do.&lt;/p&gt;
&lt;p&gt;Usually it works quite well, but not today (and probably some more days to come), it gave me a HTTP ERROR 404.  I thought I should just visit &lt;a href=&#34;http://three.net.au&#34;&gt;http://three.net.au&lt;/a&gt; and find out w-t-h is wrong. Unexpectedly it took me to another site — “callenden group policy wording”. It’s very weird so with some spare time, I decided to do a little investigation.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Banshee freezes when opened</title>
      <link>https://blog.khmersite.net/p/banshee-freezes-when-opene/</link>
      <pubDate>Sun, 28 Nov 2010 11:35:07 +0000</pubDate>
      <guid>https://blog.khmersite.net/p/banshee-freezes-when-opene/</guid>
      <description>&lt;p&gt;This is a self-note.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;$ banshee --disable-dbus&lt;/code&gt;&lt;/p&gt;</description>
    </item>
    <item>
      <title>[Fixed] K3b doesn&amp;#8217;t burn mp3 to CD</title>
      <link>https://blog.khmersite.net/p/fixed-k3b-doesnt-burn-mp3-to-cd/</link>
      <pubDate>Sat, 06 Nov 2010 13:41:03 +0000</pubDate>
      <guid>https://blog.khmersite.net/p/fixed-k3b-doesnt-burn-mp3-to-cd/</guid>
      <description>&lt;p&gt;On Ubuntu 10.10, if you get an error message as the following when trying to create audio CD from mp3:&lt;/p&gt;
&lt;p&gt;&lt;em&gt;“Unable to handle the following files due to an unsupported format:&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;You may manually convert these audio files to wave using another application supporting the audio format and then add the wave files to the K3b project.”&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;Check if you have &lt;strong&gt;&lt;code&gt;libk3b6-extracodecs&lt;/code&gt;&lt;/strong&gt; installed, if not just;&lt;/p&gt;
&lt;p&gt;&lt;code&gt;$ sudo apt-get install libk3b6-extracodecs&lt;/code&gt;&lt;/p&gt;</description>
    </item>
    <item>
      <title>Can&amp;#8217;t locate Net/LDAP.pm</title>
      <link>https://blog.khmersite.net/p/cant-locate-netldap-pm/</link>
      <pubDate>Mon, 25 Oct 2010 03:44:01 +0000</pubDate>
      <guid>https://blog.khmersite.net/p/cant-locate-netldap-pm/</guid>
      <description>&lt;p&gt;On Debian:&lt;/p&gt;
&lt;p&gt;&lt;code&gt;# apt-get install libnet-ldap-perl&lt;/code&gt;&lt;/p&gt;</description>
    </item>
    <item>
      <title>Banshee crashes: The database disk image is malformed</title>
      <link>https://blog.khmersite.net/p/banshee-crashes-the-database-disk-image-is-malformed/</link>
      <pubDate>Tue, 28 Sep 2010 11:46:02 +0000</pubDate>
      <guid>https://blog.khmersite.net/p/banshee-crashes-the-database-disk-image-is-malformed/</guid>
      <description>&lt;p&gt;Banshee just crashed on me with the following error message:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;[Info  20:44:59.949] Running Banshee 1.6.1: [Ubuntu 10.04 LTS (linux-gnu, x86_64) @ 2010-06-18 18:47:49 UTC]
[Info  20:45:01.043] All services are started 0.949921
Exception has been thrown by the target of an invocation.
System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---&amp;gt; Mono.Data.Sqlite.SqliteException: &amp;lt;strong&amp;gt;The database disk image is malformed&amp;lt;/strong&amp;gt;
database disk image is malformed
at Mono.Data.Sqlite.Sqlite3.Reset (Mono.Data.Sqlite.SqliteStatement stmt) [0x00000]
at Mono.Data.Sqlite.Sqlite3.Step (Mono.Data.Sqlite.SqliteStatement stmt) [0x00000]
at Mono.Data.Sqlite.SqliteCommand.ExecuteNonQuery () [0x00000]
at (wrapper remoting-invoke-with-check) Mono.Data.Sqlite.SqliteCommand:ExecuteNonQuery ()
at Hyena.Data.Sqlite.HyenaSqliteCommand.Execute (Hyena.Data.Sqlite.HyenaSqliteConnection hconnection, Mono.Data.Sqlite.SqliteConnection connection) [0x00000]
--- End of inner exception stack trace ---
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;I think this is how it happened. My computer hanged while Banshee was running, and I had to force reboot it.  Hence, the Banshee database file was corrupted. Thanks to &lt;strong&gt;boombox1387&lt;/strong&gt; from Ubuntu forum, this problem can be fixed as the following:&lt;/p&gt;</description>
    </item>
    <item>
      <title>Playing .ass subtitles with mplayer</title>
      <link>https://blog.khmersite.net/p/playing-ass-subtitles-with-mplayer/</link>
      <pubDate>Sun, 29 Aug 2010 11:57:35 +0000</pubDate>
      <guid>https://blog.khmersite.net/p/playing-ass-subtitles-with-mplayer/</guid>
      <description>&lt;p&gt;&lt;code&gt;$ mplayer -ass -sub subtitle.ass  file.avi&lt;/code&gt;&lt;/p&gt;</description>
    </item>
    <item>
      <title>Amarok 2.3.0 and PulseAudio Problem</title>
      <link>https://blog.khmersite.net/p/amarok-2-3-0-and-pulseaudio/</link>
      <pubDate>Mon, 17 May 2010 09:13:32 +0000</pubDate>
      <guid>https://blog.khmersite.net/p/amarok-2-3-0-and-pulseaudio/</guid>
      <description>&lt;p&gt;Ever since I upgraded my Ubuntu desktop from 9.04 to 10.4, I have been having problems with Amarok dropping sound randomly. For example, if Amarok is playing the music and another program requires to use sound, Amarok will become silence.&lt;/p&gt;
&lt;p&gt;One solution to restore sound in Amarok is to kill pulseaudio and restart Amarok. It works, but very annoying.&lt;/p&gt;
&lt;p&gt;Fortunately, installing libxine1-gnome and configure Amarok to use Esound (ESD) instead of PulseAudio fixed the problem.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Change default editor in Debian</title>
      <link>https://blog.khmersite.net/p/change-default-editor-in-debian/</link>
      <pubDate>Mon, 19 Apr 2010 02:29:25 +0000</pubDate>
      <guid>https://blog.khmersite.net/p/change-default-editor-in-debian/</guid>
      <description>&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#75715e&#34;&gt;# update-alternatives --config editor`&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;There are &lt;span style=&#34;color:#ae81ff&#34;&gt;7&lt;/span&gt; alternatives which provide &lt;span style=&#34;color:#ae81ff&#34;&gt;\`&lt;/span&gt;editor&lt;span style=&#34;color:#e6db74&#34;&gt;`&lt;/span&gt;.
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Selection Alternative
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#ae81ff&#34;&gt;1&lt;/span&gt; /bin/ed
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;+ &lt;span style=&#34;color:#ae81ff&#34;&gt;2&lt;/span&gt; /bin/nano
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#ae81ff&#34;&gt;3&lt;/span&gt; /usr/bin/vim.tiny
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;* &lt;span style=&#34;color:#ae81ff&#34;&gt;4&lt;/span&gt; /usr/bin/vim.basic
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#ae81ff&#34;&gt;5&lt;/span&gt; /usr/bin/nedit
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#ae81ff&#34;&gt;6&lt;/span&gt; /usr/bin/emacs21
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#ae81ff&#34;&gt;7&lt;/span&gt; /usr/bin/xemacs21
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Press enter to keep the default&lt;span style=&#34;color:#f92672&#34;&gt;[&lt;/span&gt;*&lt;span style=&#34;color:#f92672&#34;&gt;]&lt;/span&gt;, or type selection number: &lt;span style=&#34;color:#ae81ff&#34;&gt;6&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;</description>
    </item>
    <item>
      <title>Enable sudo insults</title>
      <link>https://blog.khmersite.net/p/enable-sudo-insults/</link>
      <pubDate>Thu, 15 Apr 2010 14:42:50 +0000</pubDate>
      <guid>https://blog.khmersite.net/p/enable-sudo-insults/</guid>
      <description>&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;$ sudo visudo
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Look for line begins with Defaults, and append insults to the end.&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;Defaults        env_reset,insults
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Save it, and clear the sudo session (sudo -K), and try sudo with a wrong password. 🙂&lt;/p&gt;
&lt;p&gt;Source: &lt;a href=&#34;http://www.ubuntu-unleashed.com/2007/09/enable-sudo-insults-for-some-laughs.html&#34;&gt;Enable sudo insults for some laughs&lt;/a&gt;&lt;/p&gt;</description>
    </item>
    <item>
      <title>Enable Japanese input on Debian/Ubuntu</title>
      <link>https://blog.khmersite.net/p/enable-japanese-input-on-debianubuntu/</link>
      <pubDate>Sun, 14 Mar 2010 07:59:34 +0000</pubDate>
      <guid>https://blog.khmersite.net/p/enable-japanese-input-on-debianubuntu/</guid>
      <description>&lt;p&gt;Normally, I would install Scim and Anthy for Japanese input method on Debian. Recently, I found an easier way to achieve the same thing, which is to use IBus instead of Scim.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Install ibus: &lt;code&gt;sudo apt-get install ibus ibus-anthy ibus-gtk&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;From the menu, System -&amp;gt; Preferences -&amp;gt; IBus Preference. IBus Preference should detects that you have run IBus daemon yet, click “Yes” to run it.&lt;/li&gt;
&lt;li&gt;You’ll be asked to edit your &lt;code&gt;~/.bashrc&lt;/code&gt; and add the following 3 lines:&lt;/li&gt;
&lt;/ol&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;export GTK_IM_MODULE=ibus
export XMODIFIERS=@im=ibus
export QT_IM_MODULE=ibus&amp;lt;/pre&amp;gt;
&lt;/code&gt;&lt;/pre&gt;&lt;ol start=&#34;4&#34;&gt;
&lt;li&gt;Click on “Input Method” tab, if you don’t see “Japanese – Anthy” listed under the Input Method list, select “Japanese -&amp;gt; Anthy” from the “Select an input method” drop down list, then click Add.&lt;/li&gt;
&lt;li&gt;You might want to restart X (logout and log back in)&lt;/li&gt;
&lt;li&gt;Open a text editor, and hit Ctrl + Space to toggle the Japanese input method&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Reference: &lt;a href=&#34;http://www.pubbs.net/ubuntu/200911/48640/&#34;&gt;Japanese Input with Karmic?&lt;/a&gt;&lt;/p&gt;</description>
    </item>
    <item>
      <title>How to tell which Linux distro you are running</title>
      <link>https://blog.khmersite.net/p/how-to-tell-which-linux-distro-youre-running/</link>
      <pubDate>Wed, 03 Feb 2010 23:13:26 +0000</pubDate>
      <guid>https://blog.khmersite.net/p/how-to-tell-which-linux-distro-youre-running/</guid>
      <description>&lt;p&gt;&lt;strong&gt;Update&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Thanks to Jayen, there is a better way:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;$ lsb_release -a
No LSB modules are available.
Distributor ID:	Ubuntu
Description:	Ubuntu 9.10
Release:	9.10
Codename:	karmic
&lt;/code&gt;&lt;/pre&gt;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;$ cat /etc/issue
Debian GNU/Linux squeeze/sid n l
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Or&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;$ cat /proc/version
Linux version 2.6.32-trunk-686 (Debian 2.6.32-5) (ben@decadent.org.uk) (gcc version 4.3.4 (Debian 4.3.4-6) ) #1 SMP Sun Jan 10 06:32:16 UTC 2010
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Source: &lt;a href=&#34;http://arun.wordpress.com/2006/06/10/which-linux-distro-are-you-using/&#34;&gt;Which Linux Distro are you using??&lt;/a&gt;&lt;/p&gt;</description>
    </item>
    <item>
      <title>Enable mp3 playback with Amarok on Ubuntu 9.10</title>
      <link>https://blog.khmersite.net/p/enable-mp3-playback-with-amarok-on-ubuntu-9-10/</link>
      <pubDate>Fri, 22 Jan 2010 10:07:13 +0000</pubDate>
      <guid>https://blog.khmersite.net/p/enable-mp3-playback-with-amarok-on-ubuntu-9-10/</guid>
      <description>&lt;p&gt;I just installed Ubuntu 9.10 on my desktop. When I tried to play some mp3 files with Amarok 2.2.0, it didn’t make any sound though it played ogg without a problem.&lt;/p&gt;
&lt;p&gt;Thanks to this &lt;a href=&#34;http://mylinuxnotebook.blogspot.com/2009/05/how-to-play-mp3-files-amarok-ubuntu.html&#34;&gt;post&lt;/a&gt;, mp3 play back can be enabled by installing libxine1-ffmpeg.&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;$ sudo apt-get install libxine1-ffmpeg
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;&lt;img alt=&#34;Screenshot-Amarok&#34; loading=&#34;lazy&#34; src=&#34;https://blog.khmersite.net/wp-content/uploads/2010/01/screenshot-system-of-a-down-chop-suey-amarok.png&#34;&gt;&lt;/p&gt;
&lt;p&gt;Credit: &lt;a href=&#34;http://mylinuxnotebook.blogspot.com/2009/05/how-to-play-mp3-files-amarok-ubuntu.html&#34;&gt;How to Play mp3 files with amarok in Ubuntu Linux 9.04&lt;/a&gt;&lt;/p&gt;</description>
    </item>
    <item>
      <title>Stopping hard drive clicking noise on MSI U100</title>
      <link>https://blog.khmersite.net/p/stopping-hard-drive-clicking-noise-on-msi-u100/</link>
      <pubDate>Sat, 28 Nov 2009 04:14:27 +0000</pubDate>
      <guid>https://blog.khmersite.net/p/stopping-hard-drive-clicking-noise-on-msi-u100/</guid>
      <description>&lt;p&gt;Finally, the OS X has been removed from MSI Wind U100, and completely replaced by Debian (testing).&lt;/p&gt;
&lt;p&gt;Whenever the computer is idle, the hdd makes this weird clicking noise. To stop it, we can use hdparm to turn it off.&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;kenno@tora:~$ sudo hdparm -B 254 /dev/sda&amp;lt;/p&amp;gt;

/dev/sda:
 setting Advanced Power Management level to 0xfe (254)
 APM_level      = 254
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Source: &lt;a href=&#34;http://en.gentoo-wiki.com/wiki/MSI_Wind&#34;&gt;MSI Wind – Gentoo Linux Wiki&lt;/a&gt;&lt;/p&gt;</description>
    </item>
    <item>
      <title>Profile backup - Mozilla FireFox and Thunderbird</title>
      <link>https://blog.khmersite.net/p/profile-backup-mozilla-firefox-and-thunderbird/</link>
      <pubDate>Thu, 13 Aug 2009 07:04:22 +0000</pubDate>
      <guid>https://blog.khmersite.net/p/profile-backup-mozilla-firefox-and-thunderbird/</guid>
      <description>&lt;p&gt;At work, a colleague is struggling to get his PC up and running for a few days now. To add an insult to injury, he also lost some of his Microsoft Outlook back up emails.&lt;/p&gt;
&lt;p&gt;Seeing what happened to him, it&amp;rsquo;s a good reminder that I shall back up my files and emails too.&lt;/p&gt;
&lt;p&gt;I use Mozilla Thunderbird (2.0.0.22), and I found a very nice tool to back up the emails (a.k.a profile). It&amp;rsquo;s called &lt;a href=&#34;http://mozbackup.jasnapaka.com/&#34;&gt;MozBackup&lt;/a&gt;.&lt;/p&gt;</description>
    </item>
    <item>
      <title>SQL: Update with values from another table</title>
      <link>https://blog.khmersite.net/p/sql-update-with-values-from-another-table/</link>
      <pubDate>Thu, 13 Aug 2009 05:37:17 +0000</pubDate>
      <guid>https://blog.khmersite.net/p/sql-update-with-values-from-another-table/</guid>
      <description>&lt;p&gt;&lt;code&gt;UPDATE Log&amp;lt;br /&amp;gt; SET Username = u.Username, Name = u.Name&amp;lt;br /&amp;gt; FROM Users u&amp;lt;br /&amp;gt; Where u.Id = userid&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;Source: &lt;a href=&#34;http://codesnippets.joyent.com/posts/show/1222&#34;&gt;codesnippets.joyent.com&lt;/a&gt;&lt;/p&gt;</description>
    </item>
    <item>
      <title>MS SQL: Reset identity seed</title>
      <link>https://blog.khmersite.net/p/ms-sql-reset-identity-seed/</link>
      <pubDate>Thu, 13 Aug 2009 02:26:23 +0000</pubDate>
      <guid>https://blog.khmersite.net/p/ms-sql-reset-identity-seed/</guid>
      <description>&lt;p&gt;Occasionally, I need to reset the value of the identity column in MS SQL database. I keep forgetting how to do this, and have to search all the time.&lt;/p&gt;
&lt;p&gt;So here is a note to myself:&lt;/p&gt;
&lt;p&gt;&lt;code&gt;DBCC CHECKIDENT (TableName, RESEED, 0)&lt;/code&gt;&lt;/p&gt;</description>
    </item>
    <item>
      <title>Restore Grub Boot Loader</title>
      <link>https://blog.khmersite.net/p/restore-grub-boot-loader/</link>
      <pubDate>Sat, 08 Aug 2009 14:56:24 +0000</pubDate>
      <guid>https://blog.khmersite.net/p/restore-grub-boot-loader/</guid>
      <description>&lt;p&gt;&lt;strong&gt;Warning&lt;/strong&gt;: this guide is only a personal note to remind myself when I have to restore Grub again.&lt;/p&gt;
&lt;p&gt;In my previous post, I had just installed Windows 7 as a dual boot with Debian on my Toshiba laptop. The following describe the steps taken to restore the Grub boot loader so that Debian can be started again.&lt;/p&gt;
&lt;p&gt;I booted the laptop with Ubuntu Live CD, then open a Terminal. To get the partition tables, as a root execute the &lt;strong&gt;fdisk&lt;/strong&gt; command:&lt;/p&gt;</description>
    </item>
    <item>
      <title>Windows 7 64 bit on Toshiba Satellite A200</title>
      <link>https://blog.khmersite.net/p/windows-7-64-bit-on-toshiba-satellite-a200/</link>
      <pubDate>Sat, 08 Aug 2009 07:42:38 +0000</pubDate>
      <guid>https://blog.khmersite.net/p/windows-7-64-bit-on-toshiba-satellite-a200/</guid>
      <description>&lt;p&gt;I just finished installing Windows 7 64-bit Ultimate edtion on my 1+ year old Toshiba laptop. The model is Satellite A200-*****.&lt;/p&gt;
&lt;p&gt;The installation went smoothly, well almost. On the first boot, the graphic card driver, the finger print reader were automatically updated with Windows update. The only two devices which weren’t detected are: unknown device “ACPITOS6205” (bluetooth) and the Texas Instrument 5-in-1 card reader. The 64-bit driver for the bluetooth can be downloaded from: &lt;a href=&#34;http://aps2.toshiba-tro.de/bluetooth/&#34;&gt;http://aps2.toshiba-tro.de/bluetooth/&lt;/a&gt; thanks to this &lt;a href=&#34;http://laptopforums.toshiba.com/t5/Windows-Vista-XP-Win7-RC/Windows-7-what-have-you-installed-it-on-and-what-doesn-t-work/td-p/9860/page/4&#34;&gt;post&lt;/a&gt; at Toshiba Laptop forum.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Linq Read Inserted Id of a Record</title>
      <link>https://blog.khmersite.net/p/linq-read-inserted-id-of-a-record/</link>
      <pubDate>Tue, 04 Aug 2009 05:20:54 +0000</pubDate>
      <guid>https://blog.khmersite.net/p/linq-read-inserted-id-of-a-record/</guid>
      <description>&lt;p&gt;Suppose we have the following code sinppets:&lt;/p&gt;
&lt;p&gt;&lt;code&gt;&amp;lt;br /&amp;gt; private BlogDataContext db = new BlogDataContext ();&amp;lt;br /&amp;gt; ...&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;article.Created = DateTime.UtcNow;&lt;/p&gt;
&lt;p&gt;article.Modified = DateTime.UtcNow;&lt;/p&gt;
&lt;p&gt;db.Articles.InsertOnSubmit(article);&lt;/p&gt;
&lt;p&gt;db.SubmitChanges( );&lt;/p&gt;
&lt;p&gt;The ID of the article is automatically generated. How do we get the Id of the newly inserted record?&lt;/p&gt;
&lt;p&gt;It turns out that the &lt;strong&gt;article&lt;/strong&gt; is updated with the value of &lt;strong&gt;Id&lt;/strong&gt; after the method &lt;strong&gt;SubmitChanges( )&lt;/strong&gt; is invoked. So, we can just get the Id this way:&lt;/p&gt;</description>
    </item>
    <item>
      <title>Convert wav to m4a with GNU/Linux</title>
      <link>https://blog.khmersite.net/p/convert-wav-to-m4a-with-gnulinux/</link>
      <pubDate>Mon, 27 Jul 2009 12:16:52 +0000</pubDate>
      <guid>https://blog.khmersite.net/p/convert-wav-to-m4a-with-gnulinux/</guid>
      <description>&lt;p&gt;There are probably a gazillion ways to do this. I use FAAC, Freeware Advanced Audio Coder, to do this job.&lt;/p&gt;
&lt;p&gt;It works very well:&lt;/p&gt;
&lt;p&gt;&lt;code&gt;&amp;lt;br /&amp;gt; faac originalfile.wav -o outputfile.m4a&amp;lt;br /&amp;gt; &lt;/code&gt;&lt;/p&gt;</description>
    </item>
    <item>
      <title>FIXED: extconf.rb:8:in &#39;require&#39;: no such file to load - mkmf (LoadError)</title>
      <link>https://blog.khmersite.net/p/fixed-extconf-rb8in-require-no-such-file-to-load-mkmf-loaderror/</link>
      <pubDate>Sat, 25 Jul 2009 11:20:28 +0000</pubDate>
      <guid>https://blog.khmersite.net/p/fixed-extconf-rb8in-require-no-such-file-to-load-mkmf-loaderror/</guid>
      <description>&lt;p&gt;While reading Linux Journal Issue 181 today, I stumbled upon a section explaining about running Ruby on Rails on Apache using an Apache module called Phusion Passenger, also known as mod_rails.&lt;/p&gt;
&lt;p&gt;To install Passenger, I followed the instruction provided in the magazine:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;sudo gem install passenger
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Unxpectedly, I got the following error:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;Building native extensions.  This could take a while...
ERROR:  Error installing passenger:
ERROR: Failed to build gem native extension.

/usr/bin/ruby1.8 extconf.rb
extconf.rb:8:in `require&amp;#39;: no such file to load -- mkmf (LoadError)
from extconf.rb:8

Gem files will remain installed in /usr/lib/ruby/gems/1.8/gems/fastthread-1.0.7 for inspection.
Results logged to /usr/lib/ruby/gems/1.8/gems/fastthread-1.0.7/ext/fastthread/gem_make.out
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;What’s happening? What did I do wrong?&lt;/p&gt;</description>
    </item>
    <item>
      <title>Copy hard disks or partitions with dd</title>
      <link>https://blog.khmersite.net/p/copy-hard-disks-or-partitions-using-dd/</link>
      <pubDate>Tue, 14 Jul 2009 04:46:34 +0000</pubDate>
      <guid>https://blog.khmersite.net/p/copy-hard-disks-or-partitions-using-dd/</guid>
      <description>&lt;p&gt;Warning: The following is for personal note only, and is not meant to be a tutorial or guide.&lt;/p&gt;
&lt;p&gt;On Debian server at work, we have &lt;code&gt;/home&lt;/code&gt; mounted to &lt;code&gt;/dev/hda6&lt;/code&gt; partition, and I want to move that to a new hard disk &lt;code&gt;/dev/hdb&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;First, I need to create the new partition on &lt;code&gt;/dev/hdb&lt;/code&gt; using &lt;code&gt;fdisk&lt;/code&gt; with a desired size. Then, use &lt;code&gt;dd&lt;/code&gt; to copy the content from &lt;code&gt;/dev/hda6&lt;/code&gt; to &lt;code&gt;/dev/hdb1&lt;/code&gt;.&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;# dd if=/dev/hda6 of=/dev/hdb1 bs=1024
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;The above command instructs &lt;code&gt;dd&lt;/code&gt; to read the content from &lt;code&gt;/dev/hda6&lt;/code&gt; and writes it to &lt;code&gt;/dev/hdb1&lt;/code&gt;. &lt;code&gt;bs=1024&lt;/code&gt; sets the block size to 1024 bytes.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Pidgin – Old Version of libpurple and &#34;Unknown Protocol&#34;</title>
      <link>https://blog.khmersite.net/p/pidgin-old-version-of-libpurple-and-unknown-protocol/</link>
      <pubDate>Fri, 10 Jul 2009 11:37:10 +0000</pubDate>
      <guid>https://blog.khmersite.net/p/pidgin-old-version-of-libpurple-and-unknown-protocol/</guid>
      <description>&lt;p&gt;I fixed the Pidgin &amp;ldquo;Unknown Protocol&amp;rdquo; problem just five minutes after my previous post. I&amp;rsquo;m going to describe how I found the problem and how I fixed it. If you&amp;rsquo;re interested, keep reading.&lt;/p&gt;
&lt;p&gt;In the previous post, I mentioned that I would completely remove the Pidgin package, including its configuration files:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#75715e&#34;&gt;# apt-get --purge remove pidgin&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;I did that and then re-installed Pidgin, but unfortunately, it didn&amp;rsquo;t fix anything.&lt;/p&gt;
&lt;p&gt;Then I checked the About dialog (&lt;code&gt;Help &amp;gt; About&lt;/code&gt;) and noticed it listed &lt;strong&gt;libpurple 2.5.4&lt;/strong&gt; under &lt;strong&gt;Pidgin 2.5.6&lt;/strong&gt;. This had to be the source of the problem! I remembered that libpurple had been upgraded to 2.5.6, and &lt;a href=&#34;http://en.wikipedia.org/wiki/Aptitude_(program)&#34;&gt;Aptitude&lt;/a&gt; said so. So what could possibly be wrong?&lt;/p&gt;</description>
    </item>
    <item>
      <title>Pidgin – Protocol Unknown (FIXED)</title>
      <link>https://blog.khmersite.net/p/pidgin-protocol-unknown/</link>
      <pubDate>Fri, 10 Jul 2009 10:37:40 +0000</pubDate>
      <guid>https://blog.khmersite.net/p/pidgin-protocol-unknown/</guid>
      <description>&lt;p&gt;&lt;strong&gt;Update&lt;/strong&gt;: The problem has been fixed. Please see &lt;a href=&#34;https://blog.khmersite.net/p/pidgin-old-version-of-libpurple-and-unknown-protocol/&#34;&gt;this post&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;A few weeks ago, Pidgin could not connect to the Yahoo! Messenger server because Yahoo! was changing its protocols. At the time, Pidgin was at version 2.5.5. Then that Yahoo! connection problem was fixed in version 2.5.7 and newer of Pidgin.&lt;/p&gt;
&lt;p&gt;Anyway, Pidgin is acting up again. This time I&amp;rsquo;m not sure what is going on, and it didn&amp;rsquo;t seem other people are experiencing the same problem – &lt;strong&gt;&lt;em&gt;Protocol Unknown&lt;/em&gt;&lt;/strong&gt; for all types of accounts.&lt;/p&gt;</description>
    </item>
    <item>
      <title>PHP: number of days between two dates</title>
      <link>https://blog.khmersite.net/p/php-number-of-days-between-two-dates/</link>
      <pubDate>Sat, 04 Jul 2009 09:17:05 +0000</pubDate>
      <guid>https://blog.khmersite.net/p/php-number-of-days-between-two-dates/</guid>
      <description>&lt;p&gt;It&amp;rsquo;s Saturday, what am I doing in front of the computer? I should be out and enjoy life. ^o^&lt;/p&gt;
&lt;p&gt;A colleague asked to customize a theme for his blog using WordPress. Because I didn&amp;rsquo;t have any good plan this Saturday, learning PHP sound like a logical and useful choice. Well, I bribed myself with a bottle of &lt;a href=&#34;http://en.wikipedia.org/wiki/Tui_(beer)#Tui_Brewery&#34;&gt;Tui&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Then, I found an interesting PHP related post by Chorn Sokun titled &lt;a href=&#34;http://chornsokun.wordpress.com/2009/07/04/php-date-diff&#34;&gt;PHP date diff&lt;/a&gt;. The author was trying to calculate the number days between two give dates. At the end of the post, he asked &amp;ldquo;What would you do instead?&amp;rdquo;&lt;/p&gt;</description>
    </item>
    <item>
      <title>Import photos from iPhone without iPhoto</title>
      <link>https://blog.khmersite.net/p/import-photos-from-iphone-without-iphoto/</link>
      <pubDate>Fri, 03 Jul 2009 00:18:14 +0000</pubDate>
      <guid>https://blog.khmersite.net/p/import-photos-from-iphone-without-iphoto/</guid>
      <description>&lt;p&gt;So how do you transfer your photos from the iPhone 3G to your laptop running OS X if you don’t have iPhoto app? — Easy, just use the buit in app called Image Capture.&lt;/p&gt;
&lt;p&gt;The app can be run from: Finder -&amp;gt; Applications -&amp;gt; Image Capture&lt;/p&gt;
&lt;p&gt;&lt;img alt=&#34;Image Capture Screenshot&#34; loading=&#34;lazy&#34; src=&#34;https://blog.khmersite.net/post/2009/07/imagecapture.png&#34;&gt;&lt;/p&gt;
&lt;p&gt;Now, you can either download some or all photos by clicking on either one of the bottons as shown in the screenshot. Remember that you should have the iPhone connected to your copmuter, otherwise you would see the message saying the no device found or connected.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Remove Universal Access Preference icon from Gnome panel</title>
      <link>https://blog.khmersite.net/p/remove-universal-access-icon-from-gnome-panel/</link>
      <pubDate>Tue, 23 Jun 2009 10:48:35 +0000</pubDate>
      <guid>https://blog.khmersite.net/p/remove-universal-access-icon-from-gnome-panel/</guid>
      <description>&lt;p&gt;One of the advantages of using GNU/Linux operating system is that you hardly have to restart it. I have Debian on my laptop and it’s been running for months, until last night. It crashed and froze. Anyway, that’s not the main point this post was written.&lt;/p&gt;
&lt;p&gt;After restarting, I saw this new icon in the Gnome top panel (the third icon from the right):&lt;/p&gt;
&lt;p&gt;&lt;img alt=&#34;universal_preference&#34; loading=&#34;lazy&#34; src=&#34;https://blog.khmersite.net/wp-content/uploads/2009/06/universal_preference.png&#34;&gt;&lt;/p&gt;
&lt;p&gt;Well, for the start, I don’t know what it is and I don’t think I will have a need for it either. So I wanted to remove it, but right click on this icon would do nothing. Left clicked on it would give me some setting option, but nowhere does it mention how to remove it.&lt;/p&gt;</description>
    </item>
    <item>
      <title>C# Math.Round</title>
      <link>https://blog.khmersite.net/p/csharp-math-round/</link>
      <pubDate>Tue, 23 Jun 2009 01:35:42 +0000</pubDate>
      <guid>https://blog.khmersite.net/p/csharp-math-round/</guid>
      <description>&lt;p&gt;This is just a quick note to remind myself:&lt;/p&gt;
&lt;p&gt;&lt;code&gt;&amp;lt;br /&amp;gt; Math.Round(4.4); //Returns 4.0.&amp;lt;br /&amp;gt; Math.Round(4.5); //Returns 4.0.&amp;lt;br /&amp;gt; Math.Round(4.6); //Returns 5.0.&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;Credit: &lt;a href=&#34;http://msdn.microsoft.com/en-us/library/aa340225(VS.71).aspx&#34; title=&#34;Math.Round Method (Decimal)&#34;&gt;Math.Round Method&lt;/a&gt;&lt;/p&gt;</description>
    </item>
    <item>
      <title>Pidgin 2.5.5 &amp;#8211; cannot connect to Yahoo messenger</title>
      <link>https://blog.khmersite.net/p/pidgin-2-5-5-cannot-connect-to-yahoo-messenger/</link>
      <pubDate>Sat, 20 Jun 2009 15:52:25 +0000</pubDate>
      <guid>https://blog.khmersite.net/p/pidgin-2-5-5-cannot-connect-to-yahoo-messenger/</guid>
      <description>&lt;p&gt;I just noticed the abnormality with Pidgin 2.5.5 (running on Debian) these few days — I couldn’t connect my Yahoo messenger account at all. According to the discussion of Bug #&lt;a href=&#34;https://bugs.launchpad.net/ubuntu/+source/pidgin/+bug/389278&#34;&gt;389278&lt;/a&gt; it appears that Yahoo was trying to change its protocol.&lt;/p&gt;
&lt;p&gt;A quick way to have Pidgin connecting to Yahoo messenger server again is to change the &lt;em&gt;Pager server&lt;/em&gt; setting for the Yahoo account in Pidgin.&lt;/p&gt;
&lt;p&gt;To do this, from Pidgin:&lt;/p&gt;</description>
    </item>
    <item>
      <title>NHibernate.MappingException: Unknown entity class</title>
      <link>https://blog.khmersite.net/p/nhibernate-mappingexception-unknown-entity-class/</link>
      <pubDate>Tue, 26 May 2009 06:11:33 +0000</pubDate>
      <guid>https://blog.khmersite.net/p/nhibernate-mappingexception-unknown-entity-class/</guid>
      <description>&lt;p&gt;If you get MappingException error, there are two things you should check out:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Make sure the name of the *.&lt;strong&gt;hbm.xml&lt;/strong&gt; is spelled correctly — not *.hmb.xml nor *.mbh.xml&lt;/li&gt;
&lt;li&gt;Make sure the Build Action property is set to “Embeded Resource.”&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;I learned this the hard way. First, I wrongly spelled hbm.xml and I had its Buld Action property set to “Content”. The above 2 points fixed the problem.&lt;/p&gt;
&lt;p&gt;Credit: &lt;a href=&#34;http://www.verysimple.com/blog/2007/07/08/nhibernate-unknown-entity-class/&#34;&gt;VerySimple, Inc&lt;/a&gt;&lt;/p&gt;</description>
    </item>
    <item>
      <title>Debian JSON for Ruby</title>
      <link>https://blog.khmersite.net/p/debian-json-for-ruby/</link>
      <pubDate>Sun, 24 May 2009 16:33:06 +0000</pubDate>
      <guid>https://blog.khmersite.net/p/debian-json-for-ruby/</guid>
      <description>&lt;p&gt;I tried to install JSON for Ruby via RubyGem,&lt;/p&gt;
&lt;p&gt;&lt;code&gt;# gem install json&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;and I got the following error message:&lt;/p&gt;
&lt;p&gt;&lt;code&gt;Building native extensions.  This could take a while...&amp;lt;br /&amp;gt; ERROR:  Error installing json:&amp;lt;br /&amp;gt; ERROR: Failed to build gem native extension.&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;&lt;code&gt;&amp;lt;br /&amp;gt; /usr/bin/ruby1.8 extconf.rb install json&amp;lt;br /&amp;gt; extconf.rb:1:in `require&#39;: no such file to load -- mkmf (LoadError)&amp;lt;br /&amp;gt; from extconf.rb:1&amp;lt;br /&amp;gt; &lt;/code&gt; &lt;code&gt;&amp;lt;br /&amp;gt; Gem files will remain installed in /usr/lib/ruby/gems/1.8/gems/json-1.1.6 for inspection.&amp;lt;br /&amp;gt; Results logged to /usr/lib/ruby/gems/1.8/gems/json-1.1.6/ext/json/ext/generator/gem_make.out&amp;lt;br /&amp;gt; &lt;/code&gt;&lt;/p&gt;</description>
    </item>
    <item>
      <title>LoadError: no such file to load &amp;#8212; openssl</title>
      <link>https://blog.khmersite.net/p/loaderror-no-such-file-to-load/</link>
      <pubDate>Sat, 23 May 2009 13:22:15 +0000</pubDate>
      <guid>https://blog.khmersite.net/p/loaderror-no-such-file-to-load/</guid>
      <description>&lt;p&gt;On a Debian system, if the Ruby complains about “LoadError: no such file to load — openssl” try to install this package &lt;strong&gt;libopenssl-ruby&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;code&gt;$ sudo apt-get install libopenssl-ruby&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;Now test if the problem resolved:&lt;/p&gt;
&lt;p&gt;&lt;code&gt;$ irb -rubygems&amp;lt;br /&amp;gt; irb(main):001:0&amp;gt; require &#39;openssl&#39;&amp;lt;br /&amp;gt; =&amp;gt; true&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;Voilla, there is no more load error.&lt;/p&gt;
&lt;p&gt;Credit: &lt;a href=&#34;http://www.ruby-forum.com/topic/90083&#34;&gt;Ruby Forum&lt;/a&gt;&lt;/p&gt;</description>
    </item>
    <item>
      <title>apache2: Could not reliably determine the server’s fully qualified domain name, using 127.0.0.1 for ServerName</title>
      <link>https://blog.khmersite.net/p/apache2-could-not-reliably-determine-the-servers-fully-qualified-domain-name-using-127001-for-servername/</link>
      <pubDate>Tue, 10 Feb 2009 04:57:21 +0000</pubDate>
      <guid>https://blog.khmersite.net/p/apache2-could-not-reliably-determine-the-servers-fully-qualified-domain-name-using-127001-for-servername/</guid>
      <description>&lt;p&gt;Everytime I start apache2 (&lt;code&gt;# apache2ctl start&lt;/code&gt;) this message is dispalyed:&lt;/p&gt;
&lt;p&gt;&lt;code&gt;apache2: Could not reliably determine the server’s fully qualified domain name, using 127.0.0.1 for ServerName&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;Well, the site is still running despite the above notification.&lt;/p&gt;
&lt;p&gt;To fix it, we need to edit the &lt;code&gt;/etc/apache2/httpd.conf&lt;/code&gt; or &lt;code&gt;/etc/apache2.conf&lt;/code&gt; and add the following line:&lt;/p&gt;
&lt;p&gt;&lt;code&gt;ServerName nameofserver&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;Now, restart the apache server (&lt;code&gt;# apache2ctrl restart&lt;/code&gt;) and should no loger see the previous message.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Relocate the URL of SVN Repository</title>
      <link>https://blog.khmersite.net/p/relocate-the-url-of-svn-repository/</link>
      <pubDate>Fri, 06 Feb 2009 04:23:19 +0000</pubDate>
      <guid>https://blog.khmersite.net/p/relocate-the-url-of-svn-repository/</guid>
      <description>&lt;p&gt;Recently, SVN has been installed on a local Debian box at work. This could have been done a bit earlier &lt;em&gt;in my opinion&lt;/em&gt;, but well it’s better be a little late than never.&lt;/p&gt;
&lt;p&gt;The SVN server is accessed via a LAN ip: 192.168.0.126. Because we didn’t setup static IP on the router, the IP of the server keeps changing from time to time. Here’s how one can change or relocate to the new URL.&lt;/p&gt;</description>
    </item>
    <item>
      <title>HOWTO add user to sudoers list in Debian/Ubuntu</title>
      <link>https://blog.khmersite.net/p/howto-add-user-to-sudoers-list-in-debianubuntu/</link>
      <pubDate>Tue, 27 Jan 2009 01:26:48 +0000</pubDate>
      <guid>https://blog.khmersite.net/p/howto-add-user-to-sudoers-list-in-debianubuntu/</guid>
      <description>&lt;p&gt;You need to have root access to do that. So the first step to become root with the following command:&lt;/p&gt;
&lt;p&gt;&lt;code&gt;ken@debian:~$ su&amp;lt;br /&amp;gt; Password:&amp;lt;br /&amp;gt; debian:/home/ken# visudo&amp;lt;br /&amp;gt; &lt;/code&gt;&lt;/p&gt;
&lt;p&gt;Now you can add a username to the list. For example:&lt;/p&gt;
&lt;p&gt;&lt;code&gt;&amp;lt;br /&amp;gt; ken ALL=(ALL) ALL&amp;lt;br /&amp;gt; &lt;/code&gt;&lt;/p&gt;
&lt;p&gt;Save the file to complete the process.&lt;/p&gt;
&lt;p&gt;Credit: &lt;a href=&#34;http://ubuntuforums.org/showthread.php?t=139243&#34;&gt;Ubuntu Forum&lt;/a&gt;&lt;/p&gt;</description>
    </item>
    <item>
      <title>Backup &amp;#038; Restore MS SQL 2000 Database</title>
      <link>https://blog.khmersite.net/p/backup-restore-ms-sql-2000-database/</link>
      <pubDate>Thu, 15 Jan 2009 00:21:50 +0000</pubDate>
      <guid>https://blog.khmersite.net/p/backup-restore-ms-sql-2000-database/</guid>
      <description>&lt;p&gt;This is a &lt;del&gt;short&lt;/del&gt; note I used at work to back up and restore the a MS SQL 2000 database.&lt;/p&gt;
&lt;p&gt;I have a database with the name &lt;strong&gt;abcengine&lt;/strong&gt; running on a local SQL Server. I need to back up this datbase to a file, send it over to a remote SQL Server to restore it.&lt;/p&gt;
&lt;p&gt;There are two ways, which I’ve known, to back up a database. One of them is to use the &lt;em&gt;Enterprise Manager&lt;/em&gt; to virsually back up, and another way is to use the &lt;em&gt;Query Analyzer&lt;/em&gt;, writing the T-SQL code and run it.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Python MySQLdb package for Debian</title>
      <link>https://blog.khmersite.net/p/pythonmysqldb-package-for-debian/</link>
      <pubDate>Sun, 09 Nov 2008 14:40:10 +0000</pubDate>
      <guid>https://blog.khmersite.net/p/pythonmysqldb-package-for-debian/</guid>
      <description>&lt;p&gt;I try to use MySQLdb module with my Python code for the first time. This is what I see:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;import MySQLdb
Traceback (most recent call last):
File &amp;#34;&amp;#34;, line 1, in
ImportError: No module named MySQLdb
your code here
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;For Debian, the package for MySQLdb module is &lt;strong&gt;python-mysqldb&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;# apt-get install python-mysqldb&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;Now, let&amp;rsquo;s verify if MySQLdb module has been correctly installed:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;&amp;gt;&amp;gt;&amp;gt; import MySQLdb
&amp;gt;&amp;gt;&amp;gt;
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;No more import error message, which means you can start using MySQldb module now.&lt;/p&gt;</description>
    </item>
    <item>
      <title>IIS7 - Cannot read configuration file due to insufficient permissions</title>
      <link>https://blog.khmersite.net/p/iis7-cannot-read-configuration-file-due-to-insufficient-permissions/</link>
      <pubDate>Thu, 23 Oct 2008 00:52:20 +0000</pubDate>
      <guid>https://blog.khmersite.net/p/iis7-cannot-read-configuration-file-due-to-insufficient-permissions/</guid>
      <description>&lt;p&gt;The last time I intensively used IIS (Internet Information Services) was back in the year 2000 when I hosted a ASP site on the local Windows 2000 server. Since then, Apache has become my only friend in the web server world.&lt;/p&gt;
&lt;p&gt;Fast forward to present day with the current job where Microsoft technology is heavily based on, it’s time for me to get back on track with “almost-everything” Microsoft.&lt;/p&gt;
&lt;p&gt;Today, I tried to set up an Asp.net site on my local machine with IIS7, and I got the following error:&lt;/p&gt;</description>
    </item>
    <item>
      <title>Deleted folder keeps reappearing</title>
      <link>https://blog.khmersite.net/p/deleted-folder-keeps-reappearing/</link>
      <pubDate>Fri, 11 Jul 2008 13:51:37 +0000</pubDate>
      <guid>https://blog.khmersite.net/p/deleted-folder-keeps-reappearing/</guid>
      <description>&lt;p&gt;A while back, I let my brother using my laptop while he was waiting for his to arried from online order. My laptop has dual boot: Windows Vista Home Premium and Debian. Of course, my bro would only use Vista. He created a folder with his name on the desktop for whatever purpose it was. Let’s called it: &lt;strong&gt;Evil&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;When the laptop was returned to me, I wanted to get rid that &lt;strong&gt;Evil&lt;/strong&gt;. No matter how many times I tried delete it, it kept coming back. I turned to Google for solution hoping someone on the Interweb experienced the same thing, but it wasn’t helpful either.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Visual Studio Shortcuts</title>
      <link>https://blog.khmersite.net/p/visual-studio-shortcuts/</link>
      <pubDate>Tue, 17 Jun 2008 06:19:24 +0000</pubDate>
      <guid>https://blog.khmersite.net/p/visual-studio-shortcuts/</guid>
      <description>&lt;p&gt;This is an ongoing list of shortcuts used in Visual Studio 2005.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Go To Definition: Ctrl + F12&lt;/li&gt;
&lt;li&gt;Go to line number: Ctrl + G&lt;/li&gt;
&lt;li&gt;To comment a block of code: Ctrl + E + C&lt;/li&gt;
&lt;li&gt;To uncomment a block of code: Ctrl + E + U&lt;/li&gt;
&lt;/ul&gt;</description>
    </item>
    <item>
      <title>SQL Setup error on Vista: SQL Server Setup Failed to compile MOF</title>
      <link>https://blog.khmersite.net/p/sql-setup-error-on-vista-sql-server-setup-failed-to-compile-mof/</link>
      <pubDate>Tue, 13 May 2008 06:38:20 +0000</pubDate>
      <guid>https://blog.khmersite.net/p/sql-setup-error-on-vista-sql-server-setup-failed-to-compile-mof/</guid>
      <description>&lt;p&gt;I was attempting to install MS SQL Server 2005 Express edition without success on a computer run Windows Vista Business. There was an error message mentioned “…failed to compile the Managed Object Format (MOF)…” I’ve tried about five times with various solutions; still it didn’t fix the problem.&lt;/p&gt;
&lt;p&gt;As always, I found a working solution when I was about to give up on this installation. The problem was that the WMI repository was corrupted. There are two ways to fix this: one is to reinstall the WMI, and alternatively you can &lt;em&gt;repair&lt;/em&gt; it instead.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Eterm doesn&amp;#8217;t display “ or ”</title>
      <link>https://blog.khmersite.net/p/eterm-doesnt-display-or/</link>
      <pubDate>Thu, 08 May 2008 01:27:23 +0000</pubDate>
      <guid>https://blog.khmersite.net/p/eterm-doesnt-display-or/</guid>
      <description>&lt;p&gt;&lt;strong&gt;Eterm&lt;/strong&gt; doesn’t display the fancy “ or ” on my Debian. It is not a big problem, but it’s very annoying when it doesn’t properly display these symbols used in some programs such as &lt;strong&gt;aptitude&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;I wanted to fix it, but didn’t realize it there was a fix. After two years or using it, I tried to find the solution again, and I found it. Just add the this code to the &lt;code&gt;.profile&lt;/code&gt; in your home directory.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Enable mod_userdir for Apache2 on Debian</title>
      <link>https://blog.khmersite.net/p/enable-mod_userdir-for-apache2-on-debian/</link>
      <pubDate>Tue, 22 Apr 2008 13:36:48 +0000</pubDate>
      <guid>https://blog.khmersite.net/p/enable-mod_userdir-for-apache2-on-debian/</guid>
      <description>&lt;p&gt;By default Apache2 doesn’t enable mod_userdir, a module to enable all users in your Linux system to host web pages. On Debian, it’s very to enable this mod, and probably with other modules as well. There is no need to edit the config file manually.&lt;/p&gt;
&lt;p&gt;There are two tools offered by Debian to assist you with enabling and disabling the modules in Apache2: a2enmod and a2dismod. As the name inferred, a2enmod enables the modules, while the a2dismod does the opposite.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Debian enable/disable services</title>
      <link>https://blog.khmersite.net/p/debian-enabledisable-services/</link>
      <pubDate>Wed, 02 Apr 2008 14:11:05 +0000</pubDate>
      <guid>https://blog.khmersite.net/p/debian-enabledisable-services/</guid>
      <description>&lt;p&gt;Install &lt;code&gt;&amp;lt;b&amp;gt;rcconf&amp;lt;/b&amp;gt;&lt;/code&gt; if you don’t have it yet. &lt;code&gt;&amp;lt;b&amp;gt;rcconf&amp;lt;/b&amp;gt;&lt;/code&gt; is Debian’s runlevel configuration tool. It allows you to enable or disable the services from starting up automatically. Recently, I got annoyed by &lt;code&gt;&amp;lt;b&amp;gt;postgresql&amp;lt;/b&amp;gt;&lt;/code&gt; starting up at boot time, so this tool did the trick.&lt;/p&gt;
&lt;p&gt;Source: &lt;a href=&#34;http://kenno.wordpress.com/wp-admin/Debian%20or%20Ubuntu%20Linux%20runlevel%20configuration%20tool%20to%20start%20service&#34;&gt;http://www.cyberciti.biz/faq/howto-runlevel-configuration-tool-to-start-service/&lt;/a&gt;&lt;/p&gt;</description>
    </item>
    <item>
      <title>Vista Doesn&#39;t Recognize USB Drive</title>
      <link>https://blog.khmersite.net/p/vista-doesnt-recognize-usb-drive/</link>
      <pubDate>Sat, 26 Jan 2008 16:18:04 +0000</pubDate>
      <guid>https://blog.khmersite.net/p/vista-doesnt-recognize-usb-drive/</guid>
      <description>&lt;p&gt;Recently my brother&amp;rsquo;s laptop which runs Windows Vista home premium no longer recognizes any USB drive. Every time a USB drive is connected to the laptop, it asks to install the drivers for that device. A while back at my part-time work place, a customer returned a laptop because it stopped recognizing the USB thumb drives.&lt;/p&gt;
&lt;p&gt;The good news is I found the solution (from the Internet) on how to fix this problem. The file &lt;strong&gt;INFCACHE.1&lt;/strong&gt; in &lt;strong&gt;C:\windows\inf&lt;/strong&gt; could be corrupted which is the main cause of the problem.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Fixed: /usr/lib/libdb-4.5.so: no version information available</title>
      <link>https://blog.khmersite.net/p/fix-usrliblibdb-45so-no-version-information-available/</link>
      <pubDate>Mon, 22 Oct 2007 15:15:59 +0000</pubDate>
      <guid>https://blog.khmersite.net/p/fix-usrliblibdb-45so-no-version-information-available/</guid>
      <description>&lt;p&gt;After installing XEmacs, and ran it in terminal-mode, I got this error:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;$ xemacs -nw
xemacs: /usr/lib/libdb-4.5.so: no version information available (required by xemacs)
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;The XEmacs works fine despite producing that error message. However, I want to get rid of it. Who or what do you turn to when you have problem with computer in general? Google search is your friend.&lt;/p&gt;
&lt;p&gt;Here is the possible cause of the above problem. XEmacs require the newer version of lbdb-4.5 than the one installed on my Debian Lenny. At the time of this writing, the version of libdb4.5 on Lenny is &lt;a href=&#34;http://packages.debian.org/lenny/libdb4.5/i386/download&#34; title=&#34;libdb45 lenny&#34;&gt;4.5.20-1.&lt;/a&gt; To fix this problem, you need to download the Sid version (&lt;a href=&#34;http://packages.debian.org/sid/libdb4.5/i386/download&#34; title=&#34;libdb45&#34;&gt;4.5.20-9&lt;/a&gt;) and install it manually:&lt;/p&gt;</description>
    </item>
    <item>
      <title>Start emacs in terminal-mode</title>
      <link>https://blog.khmersite.net/p/start-emacs-in-terminal-mode/</link>
      <pubDate>Mon, 22 Oct 2007 12:04:38 +0000</pubDate>
      <guid>https://blog.khmersite.net/p/start-emacs-in-terminal-mode/</guid>
      <description>&lt;p&gt;The first text-editor in Linux I ever used was &lt;a href=&#34;http://en.wikipedia.org/wiki/Pico_%28text_editor%29&#34;&gt;&lt;strong&gt;pico&lt;/strong&gt;&lt;/a&gt;. Then I was introduced to &lt;a href=&#34;http://en.wikipedia.org/wiki/Emacs&#34;&gt;&lt;strong&gt;emacs&lt;/strong&gt;&lt;/a&gt; and remained using for awhile. Nowadays, &lt;a href=&#34;http://en.wikipedia.org/wiki/vi&#34;&gt;&lt;strong&gt;vi(m)&lt;/strong&gt;&lt;/a&gt; is my favorite and default text editor of choice. Anyway, the main point of this post is to how to start emacs in terminal-mode instead of graphical mode.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;    $ &amp;lt;strong&amp;gt;emacs -nw&amp;lt;/strong&amp;gt;&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;That’s it. &lt;strong&gt;-nw&lt;/strong&gt; actually does the trick.&lt;/p&gt;
&lt;p&gt;Reference: &lt;a href=&#34;http://www.hst.aau.dk/net/LaTeX_writing/Emacs_and_editors/Start_Emacs/&#34;&gt;How to get started…&lt;/a&gt;&lt;/p&gt;</description>
    </item>
    <item>
      <title>htop - an interactive process viewer for Linux</title>
      <link>https://blog.khmersite.net/p/htop-an-interactive-process-viewer-for-linux/</link>
      <pubDate>Sun, 21 Oct 2007 14:54:10 +0000</pubDate>
      <guid>https://blog.khmersite.net/p/htop-an-interactive-process-viewer-for-linux/</guid>
      <description>&lt;p&gt;Just browsed around through Linux blogs and I came across an interesting tool “&lt;a href=&#34;http://htop.sourceforge.net/&#34;&gt;htop&lt;/a&gt;” posted at &lt;a href=&#34;http://linux.wordpress.com/2007/10/21/htop-an-interactive-process-viewer-for-linux/&#34;&gt;Linux and Open Source Blog&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;What is &lt;strong&gt;htop&lt;/strong&gt;? It&amp;rsquo;s an interactive process viewer for Linux. It&amp;rsquo;s very similar to &lt;strong&gt;top&lt;/strong&gt;, however &lt;strong&gt;htop&lt;/strong&gt; enables you to scroll the list vertically or horizontally; as well as supporting mouse operation.&lt;/p&gt;
&lt;p&gt;&lt;img alt=&#34;htop screenshot&#34; loading=&#34;lazy&#34; src=&#34;https://blog.khmersite.net/wp-content/uploads/2007/10/screenshot-eterm-094.png&#34;&gt;&lt;/p&gt;
&lt;p&gt;To install &lt;strong&gt;htop&lt;/strong&gt; on Debian/Ubuntu distros, run this command:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-console&#34; data-lang=&#34;console&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;$ sudo apt-get install htop
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;For openSUSE 10.2, you probably can install it with Yast, but I like &lt;strong&gt;smart&lt;/strong&gt;:&lt;/p&gt;</description>
    </item>
    <item>
      <title>Restore MySQL config file</title>
      <link>https://blog.khmersite.net/p/restore-mysql-config-file/</link>
      <pubDate>Mon, 01 Oct 2007 15:49:40 +0000</pubDate>
      <guid>https://blog.khmersite.net/p/restore-mysql-config-file/</guid>
      <description>&lt;p&gt;I have installed &lt;strong&gt;mysql-server&lt;/strong&gt; on my laptop running Debian back in awhile. For that reason, I forgot the root password. Just recently, I need to use MySQL server for one of my assignments. So, I was playing around in &lt;code&gt;/etc/mysql/&lt;/code&gt; directory hoping that I could get rid of the server and then reinstall it. The commands &lt;code&gt;apt-get remove &amp;lt;strong&amp;gt;mysql-server&amp;lt;/strong&amp;gt;&lt;/code&gt; didn’t seem to remove files/directories related to MySQL. Then, I decided to delete the &lt;code&gt;/etc/mysql/&lt;/code&gt; manually.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Install OpenOffice Khmer Spell Checker on Debian</title>
      <link>https://blog.khmersite.net/p/install-openoffice-khmer-spell-checker/</link>
      <pubDate>Fri, 07 Sep 2007 02:52:26 +0000</pubDate>
      <guid>https://blog.khmersite.net/p/install-openoffice-khmer-spell-checker/</guid>
      <description>&lt;p&gt;Finally, the amazing team from KhmerOS has realeased the Khmer Spell Checker (KSC) for OpenOffice. Here is the instruction for installing KSC on Debian (Lenny) system.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Download the package from: &lt;a href=&#34;http://sourceforge.net/project/showfiles.php?group_id=133361&amp;amp;package_id=244774&#34;&gt;http://sourceforge.net/project/showfiles.php?group_id=133361&amp;amp;package_id=244774&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Unzip it:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-console&#34; data-lang=&#34;console&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;$ unzip Khmer_Spellchecker_v1.0.zip
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Change to that directory:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-console&#34; data-lang=&#34;console&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;$ cd Khmer Spellchecker v1.0/
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Become the super user:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-console&#34; data-lang=&#34;console&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;$ su
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Password: (enter your root password)
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Copy two files: km_KH.aff km_KH.dic to OOo’s dict directory:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-console&#34; data-lang=&#34;console&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;# cp km_* /usr/lib/openoffice/share/dict/ooo
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;The above directory could be slighty different from one system to another.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Resume broken download with Wget</title>
      <link>https://blog.khmersite.net/p/resume-broken-download-with-wget/</link>
      <pubDate>Wed, 05 Sep 2007 14:24:16 +0000</pubDate>
      <guid>https://blog.khmersite.net/p/resume-broken-download-with-wget/</guid>
      <description>&lt;p&gt;&lt;code&gt;    $ wget &amp;lt;strong&amp;gt;-c&amp;lt;/strong&amp;gt; http://www.example.com/files.iso&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;The &lt;strong&gt;-c&lt;/strong&gt;(ontinuous) option allows Wget to resume a partial download.&lt;/p&gt;
&lt;p&gt;Source:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;http://lifehacker.com/software/top/geek-to-live--mastering-wget-161202.php&#34;&gt;Geek to Live: Mastering Wget&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;http://www.cyberciti.biz/tips/wget-resume-broken-download.html&#34;&gt;Wget resume broken download&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;</description>
    </item>
    <item>
      <title>Tomcat 6 on Debian Lenny</title>
      <link>https://blog.khmersite.net/p/tomcat-6-on-debian-lenny/</link>
      <pubDate>Tue, 14 Aug 2007 08:39:36 +0000</pubDate>
      <guid>https://blog.khmersite.net/p/tomcat-6-on-debian-lenny/</guid>
      <description>&lt;p&gt;I need to install Tomcat 6 for a school assignment. I thought the installation process was easy as counting 123, but it turned out to be a few hours long of head scratching. Well, the first start is to setup a few environment variables as required by Tomcat:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;CATALINA_BASE=/home/kenno/bin/apache-tomcat-6.0.13
CATALINA_HOME=/home/kenno/bin/apache-tomcat-6.0.13
export CATALINA_HOME;
export CATALINA_BASE# JAVA_HOME and Path to java, javac
JAVA_HOME=/usr/lib/j2sdk1.6-sun/bin
export JAVA_HOME;
export PATH=${JAVA_HOME}/bin:${PATH}:.
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;It can be stored in a &lt;code&gt;setEnv.sh&lt;/code&gt; file, and run with &lt;code&gt;source setEnv.sh&lt;/code&gt; to load those variables.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Bash Command Shortcuts</title>
      <link>https://blog.khmersite.net/p/bash-command-shortcuts/</link>
      <pubDate>Wed, 04 Jul 2007 08:24:44 +0000</pubDate>
      <guid>https://blog.khmersite.net/p/bash-command-shortcuts/</guid>
      <description>&lt;p&gt;How many times do you find yourself using the arrow keys to move to the beginning or end of the command line in a bash terminal? Do you use backspace to delete every single character to clear what you&amp;rsquo;ve typed? If you answered &amp;ldquo;yes&amp;rdquo; to either of these questions, continue reading.&lt;/p&gt;
&lt;p&gt;I have been doing this a lot myself because I couldn&amp;rsquo;t remember the shortcut keys for these tasks. So, I decided to write them here for future reference. While you can easily find more thorough information on the web, here are some useful shortcuts.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Installing Pidgin on openSUSE 10.2</title>
      <link>https://blog.khmersite.net/p/installing-pidgin-on-opensuse-102/</link>
      <pubDate>Sun, 10 Jun 2007 15:51:16 +0000</pubDate>
      <guid>https://blog.khmersite.net/p/installing-pidgin-on-opensuse-102/</guid>
      <description>&lt;p&gt;If you’ve been using Gaim in the past, you probably know that it is no longer available now. The name of the program has been permanently changed to &lt;a href=&#34;http://pidgin.im&#34;&gt;Pidgin&lt;/a&gt;. Even though Pidgin has been released for awhile, I’ve been still running Gaim Beta 2 until tonight. Well, not that I don’t want to install Pidgin, I just didn’t know how to do it. I tried to search for Pidgin openSUSE binary package in Google in the past for a few times without any success.&lt;/p&gt;</description>
    </item>
    <item>
      <title>How to kill defunct process</title>
      <link>https://blog.khmersite.net/p/how-to-kill-defunct-process/</link>
      <pubDate>Wed, 04 Apr 2007 00:15:14 +0000</pubDate>
      <guid>https://blog.khmersite.net/p/how-to-kill-defunct-process/</guid>
      <description>&lt;p&gt;Defunct processes are corrupted processes that can no longer communicate between the parent and child one. Sometimes, they become “zombies” and remain in your system until you reboot your machine. You can try to apply “kill -9” command, but most of the time you’ll be out of luck.&lt;/p&gt;
&lt;p&gt;In order to kill theses defunct processes, you have two choices:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Reboot your computer&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Continue reading…&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;First, let’s find out if the system contains defunct process:&lt;/p&gt;</description>
    </item>
    <item>
      <title>Airport Extreme and Fedora Core 6</title>
      <link>https://blog.khmersite.net/p/airport-extreme-and-fedora-core-6/</link>
      <pubDate>Fri, 09 Mar 2007 12:17:56 +0000</pubDate>
      <guid>https://blog.khmersite.net/p/airport-extreme-and-fedora-core-6/</guid>
      <description>&lt;p&gt;Ever since Fedora Core 6 was installed on my PowerBook, I can only access the Internet via ethernet port. It is a not a big problem at home, however if I want to access my university&amp;rsquo;s network or the Internet from there, the Wireless access is the only way. There is &lt;em&gt;almost&lt;/em&gt; no where on campus or in the lab that I could hook the ethernet cable in. So everytime I want to access the network there, I have to boot into Mac OS X.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Enable Right-click &amp;#038; Middle-click with Fedora Core 6</title>
      <link>https://blog.khmersite.net/p/enable-right-click-middle-click-with-fedora-core-6/</link>
      <pubDate>Sat, 03 Mar 2007 14:53:46 +0000</pubDate>
      <guid>https://blog.khmersite.net/p/enable-right-click-middle-click-with-fedora-core-6/</guid>
      <description>&lt;p&gt;The title should have been “How to enable right-click and middle click of PowerBook G4’s one-button-mouse in Fedora Core 6”. Since I’m not very keen in selecting a good title, I hope the one I wrote above made sense.&lt;/p&gt;
&lt;p&gt;My Apple PowerBook G4 comes with just one button mouse. It’s not a problem when using it in OS X because I can simply emulate the right click by holding “fn” key while clicking. Recently, I just installed Fedora Core 6 as dual boot on this laptop; and one button mouse really gave me a big headache. I’ve beent trying to look for a good solution to fix this, but I didn’t get much luck. There were a few links on some blogs reporting that they had successfully solving this mouse problem by using something called “synaptic” driver, but that didn’t work for me either. The temporary solution was to use the USB mouse.&lt;/p&gt;</description>
    </item>
    <item>
      <title>មេរៀនទី២៖ បីជំហានដើម្បីបង្កើតយ៉ាវា</title>
      <link>https://blog.khmersite.net/p/lesson-2-java-in-khmer/</link>
      <pubDate>Mon, 19 Feb 2007 11:36:19 +0000</pubDate>
      <guid>https://blog.khmersite.net/p/lesson-2-java-in-khmer/</guid>
      <description>&lt;p&gt;នៅក្នុងមេរៀនមុន យើងបានឃើញឧទាហរណ៍កម្មវិធីតូចមួយ សរសេរជាមួយយ៉ាវា។ យើងបានបញ្ចប់មេរៀន ដោយចោលសំនួរថា “ហេតុអ្វីក៏យើងជ្រើសបំបែកកម្មវិធីដ៏តូចនោះជាពីរឯកសារ?” តាមពិតទៅ វាពុំមានជាអ្វីសំខាន់ ណាស់ណាទេ វាគ្រាន់តែជាការគិតថា បើធ្វើយ៉ាងនោះ វាមានផ្តល់ភាពងាយស្រូល ក្នុងការពិនិត្យ​កូតដើម។&lt;/p&gt;
&lt;p&gt;យ៉ាវាកូតដើម (source code) តែងតែមាន ចុងកន្ទុយ (extension) .java ហើយឈ្មោះរបស់ឯកសារនោះ គួរចាប់ផ្តើមដោយអក្សរធំ ដោយ convention។ ចំនុចសំខាន់មួយទៀត​ដែលគួរគាត់ចំណាំគឺ ឈ្មោះរបស់ឯកសារត្រួវតែដូចនឹងឈ្មោះរបស់ class ។ បើសិនឃ្លាចុងក្រោយនេះ​មិនមានន័យចំពោះអ្នក សូមកុំទាន់បារម្ភ អ្វីៗនឹងបានច្បាស់លាស់ក្នុងពេលអនាគត។&lt;/p&gt;
&lt;p&gt;ជាសង្ខេប ដើម្បីបង្កើតកម្មវីធិយ៉ាវា យើងត្រូវធ្វើតាម ៣ ដំណាក់កាល៖&lt;/p&gt;
&lt;p&gt;១) សរសេរកូតដើម (source code)&lt;/p&gt;
&lt;p&gt;២) កំផាយកូតដើម&lt;/p&gt;
&lt;p&gt;៣) បញ្ជាកូដដែលបានកំផាយរួចហើយ (Execute or run the compiled program)&lt;/p&gt;
&lt;p&gt;&lt;img alt=&#34;Figure\u00a01&#34; loading=&#34;lazy&#34; src=&#34;https://blog.khmersite.net/wp-content/uploads/2007/02/figure1.png&#34;&gt;&lt;/p&gt;</description>
    </item>
    <item>
      <title>មេរៀនទី១៖ យ៉ាវា ភាសាកុំព្យូទ័រសំរាប់សរសេរកម្មវីធី</title>
      <link>https://blog.khmersite.net/p/lesson-1-java-programming-language-in-khmer/</link>
      <pubDate>Sat, 17 Feb 2007 14:35:27 +0000</pubDate>
      <guid>https://blog.khmersite.net/p/lesson-1-java-programming-language-in-khmer/</guid>
      <description>&lt;p&gt;នៅក្នុងមេរៀនដំបូងនេះ យើងសន្មតថាលោកអ្នកបានបញ្ចូលយ៉ាវាកំផាយលើរទៅក្នុងមាស៊ីនកុំព្យូទ័រ&lt;/p&gt;
&lt;p&gt;រួចហើយ។ ដូច្នេះ យើងអាចចាប់ផ្តើមសរសេរកម្មវិធីដំបូងបំផុត ដែលជាកម្មវីធីដ៏ល្បីល្បាញជាងគេគឺ “Hello World”។&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-console&#34; data-lang=&#34;console&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;public class MyApplication {
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;   public static void main(String[ ] args) {
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;      HelloWorldProgram p = new HelloWorldProgram();
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;      p.start();
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;   }
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;}
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;សរសេរកូតដូចខាងលើ ហើយផ្ទុកវាជាឯកសារឈ្មោះ &lt;code&gt;MyApplication.java&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;បន្ទាប់មក សូមសរសេរកូចដូចខាងក្រោមនេះ ហើយផ្ទុកវាជាឯកសារមួយទៀតឈ្មោះ &lt;code&gt;HelloWorldProgram.java&lt;/code&gt;&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-console&#34; data-lang=&#34;console&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;public class HelloWorldProgram {
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;   public void start() {
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;      System.out.println(&amp;#34;Hello World&amp;#34;);
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;   }
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;}
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;យើងកំផាយ (compile) ឯកសារទាំងពីរនោះដោយវាយពាក្យបញ្ជា៖&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-console&#34; data-lang=&#34;console&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;$ javac HelloWorldProgram.java
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;$ javac MyApplication.java
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;យើងអាចរត់ (run) កម្មវីធីដោយ៖&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-console&#34; data-lang=&#34;console&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;$ java MyApplication
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;បើសិនជាអ្នកមានចម្ងល់ថា​ ហេតុអ្វីក៏យើងចាំបាច់បំបែកកម្មវិធីដ៏តូចនេះជាពីរចំនែក?&lt;/p&gt;</description>
    </item>
    <item>
      <title>Compiling C# Souce Code as a Dynamic Link Library</title>
      <link>https://blog.khmersite.net/p/compiling-c-souce-code-as-a-dynamic-link-library/</link>
      <pubDate>Fri, 16 Feb 2007 13:50:27 +0000</pubDate>
      <guid>https://blog.khmersite.net/p/compiling-c-souce-code-as-a-dynamic-link-library/</guid>
      <description>&lt;p&gt;The following is the command to compile &lt;em&gt;dllsource.cs&lt;/em&gt; as a dynamic link library instead of the executable file:&lt;/p&gt;
&lt;p&gt;&lt;code&gt;$ mcs /target:library dllsource.cs&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;We can also specify a different name of the binary with the &lt;strong&gt;/out&lt;/strong&gt; option. For example:&lt;/p&gt;
&lt;p&gt;&lt;code&gt;$ mcs /target:library /out:mylibrary.dll dllsource.cs&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;Finally, if we want to compile a souce which depends on a dll file, we need to use the &lt;strong&gt;/reference&lt;/strong&gt; option.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;$ mcs example.cs /reference:mylibrary.dll&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;Note: &lt;strong&gt;mcs&lt;/strong&gt; is the mono compiler. If you use Microsoft C# compiler, just replace &lt;strong&gt;mcs&lt;/strong&gt; with &lt;strong&gt;csc&lt;/strong&gt;.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Sum of elements in list in Prolog</title>
      <link>https://blog.khmersite.net/p/sum-of-elements-in-list-in-prolog/</link>
      <pubDate>Sun, 04 Feb 2007 13:06:30 +0000</pubDate>
      <guid>https://blog.khmersite.net/p/sum-of-elements-in-list-in-prolog/</guid>
      <description>&lt;p&gt;Recently I noticed that my prolog skill is becoming rusty for not putting it work for very long.
For this reason, I’m going to randomly write some prolog snippets here and there.
Let’s started with one predicate called “sum_list” which calculate the value of all elements in a list.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-prolog&#34; data-lang=&#34;prolog&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#75715e&#34;&gt;% The sum of all elements in list in prolog&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#75715e&#34;&gt;% empty list&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#a6e22e&#34;&gt;list_sum&lt;/span&gt;([], &lt;span style=&#34;color:#ae81ff&#34;&gt;0&lt;/span&gt;).
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#a6e22e&#34;&gt;list_sum&lt;/span&gt;([Head | Tail], TotalSum) :-
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        &lt;span style=&#34;color:#a6e22e&#34;&gt;list_sum&lt;/span&gt;(Tail, Sum1),
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        TotalSum &lt;span style=&#34;color:#f92672&#34;&gt;is&lt;/span&gt; Head &lt;span style=&#34;color:#f92672&#34;&gt;+&lt;/span&gt; Sum1.
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;To run/test the above code, save it to a file called: &lt;code&gt;list_sum.pl&lt;/code&gt;, fire-up your prolog interpreter and load it. In my case, I use swi-prolog. Here is the sample output:&lt;/p&gt;</description>
    </item>
    <item>
      <title>ចងក្រង RPM ពី Source RPMs</title>
      <link>https://blog.khmersite.net/p/how-to-create-rpm-package-from-source-rpms/</link>
      <pubDate>Tue, 19 Dec 2006 09:37:18 +0000</pubDate>
      <guid>https://blog.khmersite.net/p/how-to-create-rpm-package-from-source-rpms/</guid>
      <description>&lt;p&gt;ជាធម្មតា ពេលខ្ញុំបញ្ចូល កញ្ចប់ថ្មីៗក្នុងអូផិនស៊ូស៊ី បើសិនជាមិនអាចរក binary rpm បានទេ ខ្ញុំតែងតែចងក្រង (compile) កញ្ចប់ទាំងនោះពីកូដប្រភពដើម។ កូដប្រភពដើម អាចត្រូវបានខ្ចប់ជា &lt;code&gt;tar.gz&lt;/code&gt; ឬ &lt;code&gt;.src.rpm&lt;/code&gt;។ ក្នុងករណីទីមួយ យើងគ្រាន់តែពន្លា កូដប្រភពដើម រួចបញ្ជា &lt;code&gt;./configure&lt;/code&gt;, &lt;code&gt;make&lt;/code&gt; និង &lt;code&gt;make install&lt;/code&gt; ជាធម្មតា។ ពេលនេះ ខ្ញុំសូមលើកយក វិធីចងក្រងកម្មវិធី ជាមួយនឹង កូដប្រភពដើម ខ្ចប់ជា &lt;code&gt;.src.rpm&lt;/code&gt;។&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-console&#34; data-lang=&#34;console&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;$ rpmbuild -clean -rebuild packagename.src.rpm
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;ក្រោយពីបាន វាយពាក្យបញ្ជាខាងលើហើយ កញ្ចប់ binary RPM នឹងត្រូវបានបង្កើតក្នុង subdirectory នៃ ថត &lt;code&gt;/usr/src/packages/RPMS/&lt;/code&gt;។ សូមពិនិត្យមើល ក្នុងថតដែលមានឈ្មោះ ចាប់ផ្តើមដោយអក្សរ &lt;code&gt;i\***&lt;/code&gt; ឧទាហរណ៍ &lt;code&gt;i386&lt;/code&gt; ជាករណីរបស់ម៉ាស៊ីនខ្ញុំ។&lt;/p&gt;</description>
    </item>
    <item>
      <title>Enable Khmer Unicode support on Firefox</title>
      <link>https://blog.khmersite.net/p/enable-khmer-unicode-support-on-firefox/</link>
      <pubDate>Wed, 13 Dec 2006 16:04:44 +0000</pubDate>
      <guid>https://blog.khmersite.net/p/enable-khmer-unicode-support-on-firefox/</guid>
      <description>&lt;p&gt;With fresh installation of SuSE Linux 10.1 or openSUSE 10.2, Firefox does not display Khmer Unicode font properly. However, there is a very easy fix, all you have to do is to add the “MOZ_ENABLE_PANGO=1” to your .profile.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Go to your home directory, then edit the .profile file. I use vi (vi .profile)&lt;/li&gt;
&lt;li&gt;Scroll down to the last line of the file and add: export MOZ_ENABLE_PANGO=1&lt;/li&gt;
&lt;li&gt;Save the .profile file, in my case I do (ESC, SHIFT+Z+Z). Restart the Firefox.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Voilla! It&amp;rsquo;s done and the Firefox should display Khmer Unicode font nicely and correctly now.&lt;/p&gt;</description>
    </item>
    <item>
      <title>ស្ថាបនា និង ដំឡើង បានស៊ី លើ​ ស៊ូសាលីណាក់ ១០.១</title>
      <link>https://blog.khmersite.net/p/how-to-build-banshee-on-opensuse/</link>
      <pubDate>Wed, 06 Dec 2006 13:53:37 +0000</pubDate>
      <guid>https://blog.khmersite.net/p/how-to-build-banshee-on-opensuse/</guid>
      <description>&lt;p&gt;ដោយ &lt;a href=&#34;http://www.novell.com/coolsolutions/author/3726.html&#34;&gt;Magnus Hoglund&lt;/a&gt;&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;ប្រសិនបើលោកអ្នកបានដំឡើង កំណែចាស់របស់បានស៊ី សូមចាប់ផ្តើមដោយលុបវាជាមុនសិន។&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;ដំឡើងកញ្ចប់ទាំងនេះ (ដោយប្រើ &lt;code&gt;Yast&lt;/code&gt;)៖&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;mono-develop&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;monodoc-core&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;sqlite-devel&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;libmusicbrainz-devel&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;gstreamer010-devel&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;libgnomeui-devel&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;gnome-desktop-devel&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;nautilus-cd-burner-devel&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;ol start=&#34;3&#34;&gt;
&lt;li&gt;យកកំណែថ្មីបង្អស់របស់ បានស៊ី ពី &lt;a href=&#34;http://banshee-project.org&#34;&gt;http://banshee-project.org&lt;/a&gt;។ ក្នុងសាច់រឿងនេះ កំណែចុងក្រោយគឺ ០.១១.២។ ទាញយកឯកសារ៖&lt;/li&gt;
&lt;/ol&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;code&gt;banshee-0.11.2.tar.gz&lt;/code&gt;
&lt;code&gt;banshee-offical-plugins-0.11.2.tar.gz&lt;/code&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;ol start=&#34;4&#34;&gt;
&lt;li&gt;ស្រាយ បានស៊ី (banshee-0.11.2.tar.gz) ទៅថតបណ្តោះអាសន្នមួយ។&lt;/li&gt;
&lt;/ol&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;code&gt;$ tar xzvf banshee-0.11.2.tar.gz&lt;/code&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;ol start=&#34;5&#34;&gt;
&lt;li&gt;បើកស្ថានីយ៍មួយ ក្នុងថតនេះ ហើយរត់៖&lt;/li&gt;
&lt;/ol&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;code&gt;$ ./configure&lt;/code&gt;&lt;br&gt;
&lt;code&gt;$ make&lt;/code&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;ol start=&#34;6&#34;&gt;
&lt;li&gt;ប្តូរទៅជាឫស (su) រួចរត់៖&lt;/li&gt;
&lt;/ol&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;code&gt;$ make install&lt;/code&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;ol start=&#34;7&#34;&gt;
&lt;li&gt;ចេញទៅជាអ្នកប្រើធម្មតា និង ចាប់ផ្តើម បានស៊ី&lt;/li&gt;
&lt;/ol&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;code&gt;$ /usr/local/bin/banshee &amp;amp;&lt;/code&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;ol start=&#34;8&#34;&gt;
&lt;li&gt;ការដំឡើង plugins របស់ បានស៊ី អាចធ្វើបានដោយវិធីដូចគ្នា។ ក្នុងករណីរបស់ខ្ញុំ ខ្ញុំបានស្រាយ &lt;code&gt;banshee-offical-plugins-0.11.2.tar.gz&lt;/code&gt; និងរត់ ពាក្យបញ្ជាដូចខាងលើ (មានន័យថា៖ &lt;code&gt;./configure; make; make install&lt;/code&gt;)នេះជាការស្រេច សូមរីករាយសប្បាយជាមួយបានស៊ី!&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;img alt=&#34;Banshee 0.11.2 Screenshot&#34; loading=&#34;lazy&#34; src=&#34;https://blog.khmersite.net/wp-content/uploads/2006/12/315681706_ebdf37eeb6.jpg&#34;&gt;&lt;/p&gt;</description>
    </item>
    <item>
      <title>Play Midi file on Linux</title>
      <link>https://blog.khmersite.net/p/play-midi-file-on-linux/</link>
      <pubDate>Fri, 17 Nov 2006 10:20:29 +0000</pubDate>
      <guid>https://blog.khmersite.net/p/play-midi-file-on-linux/</guid>
      <description>&lt;p&gt;If you want to play midi file on Linux, SuSE for example, you need the midi player. Amarok or some other players such as Banshee couldn&amp;rsquo;t play midi at all. I am not sure why, however, I found a command-line application called &lt;strong&gt;Timidity&lt;/strong&gt;. It can be downloaded from &lt;a href=&#34;http://download.opensuse.org/distribution/SL-10.1/inst-source/suse/i586/timidity-2.13.2-21.i586.rpm&#34;&gt;http://download.opensuse.org/distribution/SL-10.1/inst-source/suse/i586/timidity-2.13.2-21.i586.rpm&lt;/a&gt;. Once installed, you can play it by issuing this command &lt;code&gt;timidity file_name.midi&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;Here is an example running timidity to play what4.midi:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;kenno@localhost:~/&amp;gt; timidity what4.mid
Requested buffer size 32768, fragment size 8192
  
ALSA pcm &amp;amp;#8216;default&amp;amp;#8217; set buffer size 32768, period size 8192 bytes
  
Playing what4.mid
  
MIDI file: what4.mid
  
Format: 1 Tracks: 5 Divisions: 480
  
Sequence:
Track name: Track 1
Track name: Guitar 2
Track name: Track 3
Track name: Percussion
Playing time: ~26 seconds
Notes cut: 0
Notes lost totally: 0
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Enjoy the midi tune!&lt;/p&gt;</description>
    </item>
    <item>
      <title>F-Spot Crashed on SuSE 10.1</title>
      <link>https://blog.khmersite.net/p/f-spot-crashed-on-suse-101/</link>
      <pubDate>Fri, 17 Nov 2006 04:09:06 +0000</pubDate>
      <guid>https://blog.khmersite.net/p/f-spot-crashed-on-suse-101/</guid>
      <description>&lt;p&gt;Ever since this SuSE 10.1 installed, I could never once run F-Spot. I couldn’t remember what is the version of F-Spot that originally comes with SuSE 10.1 CDs, but even that one didn’t work. So, I upgraded it to 0.1.1 (the latest version at the time of writing is 0.2.2), but the same problem still remained. This is how it looks like when I run the program:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;kenno@localhost:~&amp;gt; f-spot
Starting new FSpot server
XXXXX
System.ArgumentNullException: Argument cannot be null.
Parameter name: s
in  System.Int32:Parse (System.String s)
in  MetaItem:get_ValueAsInt ()
in  FSpot.Database.Updater:Run (.Db database)
in  Db:Init (System.String path, Boolean create_if_missing)
in  FSpot.Core:.ctor ()
in  FSpot.Driver:Main (System.String[] args)
XXXXX
Starting new FSpot server
Starting new FSpot server
Starting new FSpot server
Starting new FSpot server
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;On KDE desktop environment, there is also a very good native photo management application called &lt;strong&gt;digiKam&lt;/strong&gt; which I have been using to organize my photos. As most of my times have been spent on school related work, getting the F-Spot running on my Linux box has been a avery low priority. Having said that, I never forgot about it.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Format Hard Disk with ext3</title>
      <link>https://blog.khmersite.net/p/format-hard-disk-with-ext3/</link>
      <pubDate>Tue, 07 Nov 2006 07:07:01 +0000</pubDate>
      <guid>https://blog.khmersite.net/p/format-hard-disk-with-ext3/</guid>
      <description>&lt;p&gt;ដោយសារខ្ញុំបានប្រើប្រាស់ប្រព័ន្ធប្រត្តិប័ត្រការ Windows ជាយូលង់ណាស់មកហើយនោះ partitions នៃ hard disks ភាគច្រើនជា ntfs។ ថ្ងៃនេះខ្ញុំចង់បំលែង ntfs partition មួយមកជាលីណាក់ ext3 partition វិញដោយសារ hard drive ក្នុងលីណាក់ស្ទើពេញហើយ។​ តើយើង format partition ជាមួយលីណាក់ដោយរបៀបណា? គិតៗទៅ ខ្ញុំមិនដែលបានធ្វើពីមុនទេ។&lt;/p&gt;
&lt;p&gt;ដំបូងខ្ញុំខំរកកម្មវិធី ដែលមកជាមួយ ខេឌីអ៊ី (KDE) តែរកមិនឃើញមានអាណាមួយសំរាប់ហ្វមមាត (format) សោះ។​ ប្រហែលជាមាន​ tools ឬកម្មវិធីខ្លះដែលអាចហ្វមមាត ដើរលើខេឌីអ៊ី ហើយខ្ញុំមិនបានបញ្ចូលវា ដូច្នេះបើលោកអ្នកដឹងឈ្មោះកម្មវិធីទាំងនោះ សូមមេត្តាប្រាប់ផង។ យ៉ាងណាមិញ​ ខ្ញុំបាន​សំរេចចិត្តប្រើ command-line ដើម្បីហ្វមមាតវា។​ ខ្ញុំស្ទើភ្លេចប្រាប់ថា ក្នុងប្រព័ន្ធលីណាក់ វាមានប្រភេទ partitions ជាច្រើន ដូចជា៖ Reiserfs (the default one that SuSE 10.1 uses), ext3, zfx,… ។ល។ ខ្ញុំជ្រើសយក​ ext3 ក្រោយពីបានធ្វើការស្រាវជ្រាវបន្តេចបន្ទួច ហើយចំពោះភាពខុសគ្នានៃប្រភេទ partitions ទាំងនោះ ខ្ញុំពុំអាចដឹងច្បាស់ទេ។&lt;/p&gt;
&lt;p&gt;អូខេ ដោយពុំចាំបាច់និយាយច្រើនពេក នេះគឺរបៀបដែលខ្ញុំបានប្រើ៖&lt;/p&gt;</description>
    </item>
    <item>
      <title>ការបង្កើត zip file ជាមួយលីណាក់/យូនិច</title>
      <link>https://blog.khmersite.net/p/how-to-create-zip-file-on-linux/</link>
      <pubDate>Sun, 05 Nov 2006 17:16:17 +0000</pubDate>
      <guid>https://blog.khmersite.net/p/how-to-create-zip-file-on-linux/</guid>
      <description>&lt;p&gt;តាំងពីបានប្រើលីណាក់មក ខ្ញុំពុំសូវដែលបានបង្រួមឯកសារជាមួយ zipទេ ភាកច្រើនខ្ញុំបង្កើត gzip។​​ ហេតុអ្វី? គិតថា gzip វាស្រួលបង្កើតជាងនិងដោយសារតំរួវការនៅសាលាផងនោះ។ ប៉ុន្តែយើងក៏មិនអាចជៀសវាង មិនប្រើ zip​សោះដែរ។ ឧទាហរណ៍ ថ្ងៃនេះ មិត្តរបស់ខ្ញុំម្នាក់សួរខ្ញុំពីរបៀបបង្រួមឯកសារទៅជា zip ខ្ញុំស្រាប់តែស្រឡាំងកាំងតែម្តង។ ខ្ញុំសាកធ្វើដូចនេះ៖&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;$ ls
dir1
&lt;/code&gt;&lt;/pre&gt;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;$ zip file1.zip dir1
adding: dir1/ (stored 0%)
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;មើលទៅហាក់ដូចជាដំណើរការ តែតាមពិត ឯកសារដែលនៅក្នុង dir1 អត់បានបញ្ចូលក្នុង file1.zip ទេ។ ដូចស័ព្ទដង អោយតែមានការងើងឆ្ងល់អ្វីមួយនោះ ខ្ញុំតែងតែសាកស្វែងរកជាមួយគូកឹល។ នេះគឺជាការបញ្ជាសំរាប់បង្រួម​ឯកសារដែលត្រឹមត្រូវ៖&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;$ zip -r file1.zip dir1
adding: dir1/ (stored 0%)
adding: dir1/myimage.jpg (stored 0%)
&lt;/code&gt;&lt;/pre&gt;&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;http://linux.about.com/od/commands/l/blcmdl1_zip.htm&#34;&gt;ប្រភពដើម&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;</description>
    </item>
    <item>
      <title>លេងឌីវីឌីជាមួយស៊ូសេ១០.១</title>
      <link>https://blog.khmersite.net/p/how-to-play-encrypted-dvd-on-opensuse/</link>
      <pubDate>Fri, 03 Nov 2006 10:31:56 +0000</pubDate>
      <guid>https://blog.khmersite.net/p/how-to-play-encrypted-dvd-on-opensuse/</guid>
      <description>&lt;p&gt;អត្ថបទខ្លីនេះនិយាយអំពី ការចាក់លេងឌីវីឌីដែលមាន encryption ដាក់បង្កប់ក្នុងឌីវីឌី ដើម្បីការពារយើង កុំអោយលួចចំលងទុក។ ចំពោះឌីវីឌីភាកច្រើននៅស្រុកខ្មែរ ទាំងឌីវីឌីដើមដូចជាឌីវីឌីខារ៉ាអូខេហាក់បីដូចជាពុំមាន encryption ទេ។&lt;/p&gt;
&lt;p&gt;ប៉ុន្តែបើលោកអ្នកទិញឌីវីឌីរឿងអាគាំងដើមវិញ ៩៩% ពិតជាមានបង្កប់ encryption ជាមិនខាន។ ឧទាហរណ៍ ថ្ងៃនេះខ្ញុំបានខ្ចីរឿងគំនូជីវចលជប៉ុន ពីមិត្តម្នាក់មានចំនងជើង ខ្មោចក្នុងសំបកសែល (Ghost in the Shell)&lt;/p&gt;
&lt;p&gt;ហើយ បានសាកចាក់ជាមួយ កាហ្វេន​ (Kaffeine)​ លើលីណាក់ស៊ូសសេ១០.១ ប៉ុន្តែ ជាការសោកស្តាយ វាពុំអាចចាក់បានឡើយ។&lt;/p&gt;
&lt;p&gt;ក្រោយពីបានរុករកចំលើយជាមួយគូកឹលមក ទើបដឹងថាបញ្ហាដើមគឺមកពី ស៊ូសេអត់មាន &lt;a href=&#34;http://en.wikipedia.org/wiki/Libdvdcss&#34;&gt;libdvdcss&lt;/a&gt; ដែលជាបណ្ណាល័យ ចាំបាច់សំរាប់ ពន្លា encryption វិញ។&lt;/p&gt;
&lt;p&gt;ដូច្នេះបើយើងចង់លេង ឌីវីឌីទាំងនោះបាន យើងត្រូវបញ្ចុល libdvdcss ដែលអាចទាញយកបានពី &lt;a href=&#34;http://download.videolan.org/pub/libdvdcss/1.2.9/rpm/libdvdcss2-1.2.9-1.i386.rpm&#34;&gt;នេះ&lt;/a&gt; ។ អាចបញ្ចូល ជាមួយនឹង ការបញ្ជានេះ៖&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;$ su -
password [enter root password]

# rpm -ivh libdvdcss2-1.9-i386.rpm
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;សូមសាកល្បងចាក់ឌីវីឌីម្តងទៀតមើល តើលោកអ្នកមានបញ្ហាទៀតទេ?&lt;/p&gt;</description>
    </item>
    <item>
      <title>Playback DVD on SuSE 10.1</title>
      <link>https://blog.khmersite.net/p/playback-dvd-on-suse-101/</link>
      <pubDate>Fri, 03 Nov 2006 10:03:55 +0000</pubDate>
      <guid>https://blog.khmersite.net/p/playback-dvd-on-suse-101/</guid>
      <description>&lt;p&gt;In general, almost all DVDs you purchase or rent from the store have encryption embedded them to protect you from copying them. It sounds like a good idea to prevent the piracy. To play back those DVDs, we need the player that could decrypt the encryption back. It’s not problem to play them on Windows operating system, but it is with most Linux operating system such as SuSE 10.1, Debian, etc.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Kernel upgrading breaks my SuSE box</title>
      <link>https://blog.khmersite.net/p/upgrading-linux-kernel-break-my-suse/</link>
      <pubDate>Thu, 02 Nov 2006 07:20:47 +0000</pubDate>
      <guid>https://blog.khmersite.net/p/upgrading-linux-kernel-break-my-suse/</guid>
      <description>&lt;p&gt;The other day, my SuSE 10.1 notifies that there were updates available including bug fixes and new kernel. I thought it might be convenient if I just click on select all, and update button. So, I did that and went out to school. When I came back home, the update was nicely done. There was no indication to ask me to restart the computer (as most other OSes do), but I thought it’d be good restart it anyway.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Firefox 2.0 rpm សំរាប់ស៊ូសេ១០.១</title>
      <link>https://blog.khmersite.net/p/firefox-20-rpm-for-suse-10-1/</link>
      <pubDate>Tue, 31 Oct 2006 15:10:18 +0000</pubDate>
      <guid>https://blog.khmersite.net/p/firefox-20-rpm-for-suse-10-1/</guid>
      <description>&lt;p&gt;ទោះបីជាFirefox 2.0បានបញ្ចេញប៉ុន្មានថ្ងៃមកហើយក៏ដោយ មិនមានអ្នកណាធ្វើកញ្ចប់ RPM​ សំរាប់ស៊ូសេលីណាក់ទេ។&lt;/p&gt;
&lt;p&gt;ថ្ងៃនេះសំណាងល្អ ខ្ញុំបានទៅលេងទំព័រវ៉ិបនេះដែលនិយាយពីលីណាក់និងអូផិនសស់ ក៏ប្រទះឃើញដំណឹងទាក់ទងនឹង កញ្ចប់RPM&lt;/p&gt;
&lt;p&gt;នៃFirefox 2.0សំរាប់ស៊ូសេ។&lt;/p&gt;
&lt;p&gt;បើកុំព្យួទ័ររបស់អ្នកដើស៊ូសេលីណាក់ ហើយចង់បានFirefox 2.0 ដែរនោះ អ្នកអាចទៅទាញយកវាបានពី៖&lt;/p&gt;
&lt;p&gt;&lt;a href=&#34;http://ftp4.gwdg.de/pub/linux/suse/opensuse/repositories/mozilla/SUSE_Linux_10.1/i586/&#34;&gt;SUSE 10.1 (i586) (១)&lt;/a&gt; | &lt;a href=&#34;http://software.opensuse.org/download/mozilla/SLE_10/i586/&#34;&gt;SLED 10 (i586) (២)&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Firefox 2.0​ក៏ត្រូវការ dependencies ពីរដែរ៖​​ mozilla-nss និង mozilla-nsrp។ អ្នកអាចទាញយកពួកវាពីរបណ្តាញខាងលើ។&lt;/p&gt;
&lt;p&gt;ខ្ញុំទើបតែបានupdateរបស់ខ្ញុំថ្មីៗនេះ ហើយមានការពេញចិត្តជាមួយកំណែប្រែ២​ នេះយ៉ាងខ្លាំង។ ខាងក្រោមនេះជារូប screenshot&lt;/p&gt;
&lt;p&gt;Firefox 2.0 ដើរលើស៊ូសេ១០.១៖&lt;/p&gt;
&lt;p&gt;&lt;img loading=&#34;lazy&#34; src=&#34;https://blog.khmersite.net/post/2006/10/284678889_a76de5264b_o.png&#34;&gt;&lt;/p&gt;
&lt;p&gt;(១) បណ្តាញសំរាប់ Open SuSE&lt;/p&gt;
&lt;p&gt;(២)​ បណ្តាញសំរាប់ SuSE Linux Enterprise Desktop (paid version)&lt;/p&gt;
&lt;p&gt;ប្រភពព៍តមាន៖ &lt;a href=&#34;http://linux.wordpress.com/&#34;&gt;Linux and Open Source Blog&lt;/a&gt;&lt;/p&gt;</description>
    </item>
    <item>
      <title>Disable sshd in SuSE 10.1</title>
      <link>https://blog.khmersite.net/p/disable-sshd-in-suse-101/</link>
      <pubDate>Thu, 17 Aug 2006 10:53:48 +0000</pubDate>
      <guid>https://blog.khmersite.net/p/disable-sshd-in-suse-101/</guid>
      <description>&lt;p&gt;With the latest release of Open SuSE, version 10.1 at the time of writing, the ssh daemon (sshd) is turned on by default. Some sources on the web suggested that it doesn’t do any harms to have it on since it won’t be able to access from outside your LAN if the firewall is turned on. However, I think if you don’t need to use it, there is no point to leave it on.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Upgrade Amarok to 1.4.1</title>
      <link>https://blog.khmersite.net/p/upgrade-amarok-to-141/</link>
      <pubDate>Sun, 13 Aug 2006 08:54:25 +0000</pubDate>
      <guid>https://blog.khmersite.net/p/upgrade-amarok-to-141/</guid>
      <description>&lt;p&gt;I’ve been using SuSE 10.1 for just about a month. The previous linux distro I used was Debian, so the &lt;em&gt;rpm&lt;/em&gt; package concept is pretty new to me. I’ve heard of it before, but never got to use or play with it. With Debian, we have a very easy way to install or upgrade packages: &lt;em&gt;apt-get&lt;/em&gt;, of course.&lt;/p&gt;
&lt;p&gt;Anyway, I just upgraded the Amarok 1.3.8 to version 1.4.1. It wasn’t easy initially as I tried to upgrade each package of dependency separately. Fortunately, I found a good site that explains how to do this step by step. The following is the summary:&lt;/p&gt;</description>
    </item>
    <item>
      <title>Vim Tip: Insert Time-Stamp</title>
      <link>https://blog.khmersite.net/p/vim-tip-insert-time-stamp/</link>
      <pubDate>Thu, 03 Aug 2006 15:13:33 +0000</pubDate>
      <guid>https://blog.khmersite.net/p/vim-tip-insert-time-stamp/</guid>
      <description>&lt;p&gt;To insert time-stamp in a file, you can exit from edit mode and type:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;:r! date&lt;/p&gt;
&lt;/blockquote&gt;</description>
    </item>
    <item>
      <title>Apache 2 Config File</title>
      <link>https://blog.khmersite.net/p/apache-2-config-file/</link>
      <pubDate>Sat, 15 Jul 2006 14:42:46 +0000</pubDate>
      <guid>https://blog.khmersite.net/p/apache-2-config-file/</guid>
      <description>&lt;p&gt;I’ve been using Apache httpd on and off on my PowerBook for various purposes including school assignments. The httpd version that comes with the PowerBook by default is 1.3.33 and I need to use the version 2.*. So, I installed the Apache 2 via Fink.&lt;/p&gt;
&lt;p&gt;After having successfully installed Apache 2, we need to make some changes to the config file (usually, it is the httpd.conf file.) Guess what? I totally forgot where that file resides. The only thing I could remember is that we can find that information out very easily by giving the -v option to the httpd. So, I tried it and this is what I got:&lt;/p&gt;</description>
    </item>
    <item>
      <title>UrlGenerator</title>
      <link>https://blog.khmersite.net/p/urlgenerator/</link>
      <pubDate>Sat, 01 Jul 2006 11:58:21 +0000</pubDate>
      <guid>https://blog.khmersite.net/p/urlgenerator/</guid>
      <description>&lt;p&gt;I’ve been very bored, doing nothing interesting, and at the same time my programming skill is no longer as polished as before. I was kinda panic, and then I realize that if I don’t wanna lose the skill, I better continue coding. A while back, I wrote a code that generate the batch-link of website addresses. Example, I wanna grab all the images at a website from: &lt;code&gt;http://www.example.com/image01.jpg&lt;/code&gt; to &lt;code&gt;http://www.example.com/image10.jpg&lt;/code&gt;. In a simple way, we can just copy and paste, then change the number from 01 to 10. But what if you have to change the number from 001 to 100? Well, it’s gonna be tiresome. But, not if I use the program I wrote- UrlGenerator. It was a console program, written in Java. It doesn’t loo nice (as the matter of fact, it doesn’t have a &lt;em&gt;look&lt;/em&gt;).&lt;/p&gt;</description>
    </item>
    <item>
      <title>VS 2005 project is not rebuilt despite changes in source code</title>
      <link>https://blog.khmersite.net/p/vs-2005-project-is-not-rebuilt-despite-changes-in-source-code/</link>
      <pubDate>Tue, 27 Jun 2006 02:52:17 +0000</pubDate>
      <guid>https://blog.khmersite.net/p/vs-2005-project-is-not-rebuilt-despite-changes-in-source-code/</guid>
      <description>&lt;p&gt;Having fixed a problem with Visual Studio (VS) 2005 the other day, there is still another problem. The project does not recompiled/rebuilt automatically after the souce codes of some files have been changed. Usually, if we make changes to the souce code, those files will be recompiled if we press Ctrl+F5 or F5.&lt;/p&gt;
&lt;p&gt;At first I thought this could be the new behavior/feature in VS 2005. But after discussing with a buddy of mine who’s currently using VS 2005 for his assignment, he told me that VS 2005 should rebuild the code automatically.&lt;/p&gt;</description>
    </item>
    <item>
      <title>&#34;The Binding Handle Is Invalid&#34; error in Visual Studio 2005</title>
      <link>https://blog.khmersite.net/p/the-binding-handle-is-invalid-error-in-visual-studio-2005/</link>
      <pubDate>Sun, 25 Jun 2006 13:35:15 +0000</pubDate>
      <guid>https://blog.khmersite.net/p/the-binding-handle-is-invalid-error-in-visual-studio-2005/</guid>
      <description>&lt;p&gt;Tonight is the first time I began to code a small program in C# again since my graduation in April &amp;lsquo;06. It&amp;rsquo;s just because I was away from Windows PC, and it&amp;rsquo;s not easy do a GUI application with Mono on Mac. So it&amp;rsquo;s not that I hate C# or anything. Anyway, I just installed Visual Studio .Net 2005 Profession edition (non-commercial use) on my home PC, and I encountered a never-seen-before (to me at least) error straight away when I tried to debug/build the program. Well, google search pointed me to a solution to this problem.&lt;/p&gt;</description>
    </item>
    <item>
      <title>My Linux Phone: e680i</title>
      <link>https://blog.khmersite.net/p/my-linux-phone-e680i/</link>
      <pubDate>Sat, 17 Jun 2006 14:03:29 +0000</pubDate>
      <guid>https://blog.khmersite.net/p/my-linux-phone-e680i/</guid>
      <description>&lt;p&gt;After waiting about four or five months, I finally could get a hold of my new phone. The phone was purchased in Cambodia as a gift from my brothers. I would like to thank three of them who had put some efforts in making my wishes come true. In addition, a big thank also goes to my girlfriend for delivering the phone to me.&lt;/p&gt;
&lt;p&gt;In fact, e360i phone is a pretty old model. It was manufactured by Motorola as one of their first mobile phones running Linux as the operating system. About a year a half ago, Ed, a friend of mine from New Zealand, introduced me to his phone.  He urged that I should get one, as well as convinced me that this phone was way better than my Nokia ones. Guess what? I should have believed him, this phone is awesome, entertaining, functioning and butt-kicking. So, Ed, thank you a lot too dude, if you happen to read this post. I appreciate also that you spent time teaching me all the nice tip and trick about e680i.&lt;/p&gt;</description>
    </item>
    <item>
      <title>VMware Installation &amp;#8211; A Small Solution to a Huge On Going Problem</title>
      <link>https://blog.khmersite.net/p/vmware-installation-a-small-solution-to-a-huge-on-going-problem/</link>
      <pubDate>Tue, 06 Jun 2006 17:40:59 +0000</pubDate>
      <guid>https://blog.khmersite.net/p/vmware-installation-a-small-solution-to-a-huge-on-going-problem/</guid>
      <description>&lt;p&gt;VMware is a piece of art of software which allows you to run guest operating stystems (OS) on top of the main OS you&amp;rsquo;re using. For example in my case, I run SuSE 10.0 on Windows XP via VMware. Anyway, despite having the name as cool as it sounds, installing the VMware on my machine is a pain in the rear.&lt;/p&gt;
&lt;p&gt;This could explain why I so stated as above. The installation of VMware always gives the blue-screen-of-death on the Windows XP SP2 on the final step. Initially, I thought that some services running on my machine may cause the problem, so I disabled most of them. In addition, I also shutdown Zone Alarm, and all the running programs. Nothing helped at all. I remember, the last time I wanted to run VMware so bad, that I decided to reinstall the Windows XP.&lt;/p&gt;</description>
    </item>
    <item>
      <title>LBreakout2 for Mac OS X</title>
      <link>https://blog.khmersite.net/p/lbreakout2-another-game-compiled/</link>
      <pubDate>Fri, 21 Apr 2006 01:54:58 +0000</pubDate>
      <guid>https://blog.khmersite.net/p/lbreakout2-another-game-compiled/</guid>
      <description>&lt;p&gt;&lt;strong&gt;LBreakout2&lt;/strong&gt; is another multi-platform game written by the same programmer as &lt;strong&gt;LBreakout&lt;/strong&gt;. The new features of the games include more than 50 levels, level editor and networking, which enables user to play on-line by connecting to LBreakout2 server. I haven&amp;rsquo;t tried that yet though. You can find more info at the &lt;a href=&#34;http://lgames.sourceforge.net/index.php?project=LBreakout2&#34; title=&#34;Linux Games&#34;&gt;LBreakout2&lt;/a&gt; homepage.&lt;/p&gt;
&lt;p&gt;Let&amp;rsquo;s check out the screen-shot:&lt;/p&gt;
&lt;p&gt;&lt;img alt=&#34;LBreakout2 Screenshot&#34; loading=&#34;lazy&#34; src=&#34;https://blog.khmersite.net/wp-content/uploads/2006/04/lbreakout2.png&#34;&gt;&lt;/p&gt;
&lt;p&gt;A tip to compile this game for Mac OS X is to configure the source with the &lt;strong&gt;nls disable&lt;/strong&gt;. I&amp;rsquo;m not very sure what &lt;strong&gt;nls&lt;/strong&gt; is either if you ask me what it is. Anyway, if you wanna compile it for your Mac OS X, you need to get/do the following:&lt;/p&gt;</description>
    </item>
    <item>
      <title>Compiling libpng for Mac OS X</title>
      <link>https://blog.khmersite.net/p/compiling-libpng-for-mac-os-x/</link>
      <pubDate>Thu, 20 Apr 2006 01:12:16 +0000</pubDate>
      <guid>https://blog.khmersite.net/p/compiling-libpng-for-mac-os-x/</guid>
      <description>&lt;p&gt;I thought Mac OS X comes with &lt;code&gt;libpng&lt;/code&gt; pre-installed. It&amp;rsquo;s pretty clear that I was wrong after I failed to compile a game that uses libpng. The good thing about OS X is that, you can just use fink to easily install Unix/Linux binaries. However, the weird thing is, the game configuration still complains that libpng could not be found.&lt;/p&gt;
&lt;p&gt;So I decided to install libpng from the source code. For those out there who may face the same problem, you could try as what I describe below.&lt;/p&gt;</description>
    </item>
    <item>
      <title>LBreakOut</title>
      <link>https://blog.khmersite.net/p/lbreakout/</link>
      <pubDate>Wed, 19 Apr 2006 06:15:04 +0000</pubDate>
      <guid>https://blog.khmersite.net/p/lbreakout/</guid>
      <description>&lt;p&gt;I&amp;rsquo;m pretty bored today, and I wanna take a break from learning Python. So, I decided to compile an open source game, LBreakOut (L is for Linux), for my PowerBook.&lt;/p&gt;
&lt;p&gt;In order to compile this game, you need obviously the source code of the game where you can get it from &lt;a href=&#34;http://lgames.sourceforge.net/download.php?project=LBreakout&amp;amp;url=SOURCEFORGE/lgames/lbreakout-010315.tar.gz&#34;&gt;here&lt;/a&gt;. Additionally, you need the SDL library, where you can get it from &lt;a href=&#34;http://www.libsdl.org&#34;&gt;http://www.libsdl.org&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Here is the screen-shot of game running on my PowerBook:&lt;/p&gt;</description>
    </item>
    <item>
      <title>How to Decompress .tar.bz2 File</title>
      <link>https://blog.khmersite.net/p/how-to-decompress-tarbz2-file/</link>
      <pubDate>Tue, 18 Apr 2006 12:26:16 +0000</pubDate>
      <guid>https://blog.khmersite.net/p/how-to-decompress-tarbz2-file/</guid>
      <description>&lt;p&gt;Normally, I would &lt;code&gt;bunzip&lt;/code&gt; the file first, then untar it next. But I found something after googling for a shortcut: it can all be done with just one &lt;strong&gt;&lt;code&gt;tar&lt;/code&gt;&lt;/strong&gt; command.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-console&#34; data-lang=&#34;console&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;$ tar -xjvf example.tar.bz2
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Notice that, we use &lt;strong&gt;j&lt;/strong&gt; flag to decompress bzip2 file and &lt;strong&gt;z&lt;/strong&gt; flag for gzip file. 🙂&lt;/p&gt;</description>
    </item>
    <item>
      <title>Temperature Conversion v0.2</title>
      <link>https://blog.khmersite.net/p/temperature-conversion-v02/</link>
      <pubDate>Thu, 13 Apr 2006 13:41:17 +0000</pubDate>
      <guid>https://blog.khmersite.net/p/temperature-conversion-v02/</guid>
      <description>&lt;p&gt;I just learned how to implement basic command-line argument with Python. Hence, I would like to incoporate this feature in the previous &lt;a href=&#34;http://kenno.wordpress.com/2006/04/06/temperature-conversion/&#34; title=&#34;Temperature Conversion v0.1&#34;&gt;Temperature Conversion&lt;/a&gt; program.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-python&#34; data-lang=&#34;python&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#75715e&#34;&gt;# convertc2f.py&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#75715e&#34;&gt;# Version: 0.2&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#75715e&#34;&gt;# A program to convert Celsius temps to Fahrenheit&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#75715e&#34;&gt;# Date: 4/13/06&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#75715e&#34;&gt;# by: S. San (Kenno)`&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#f92672&#34;&gt;import&lt;/span&gt; sys
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;if&lt;/span&gt; (len(sys&lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt;argv) &lt;span style=&#34;color:#f92672&#34;&gt;==&lt;/span&gt; &lt;span style=&#34;color:#ae81ff&#34;&gt;2&lt;/span&gt;):
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    celsius &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; int(sys&lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt;argv[&lt;span style=&#34;color:#ae81ff&#34;&gt;1&lt;/span&gt;])
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;else&lt;/span&gt;:
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    celsius &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; int(input(&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;What is the Celsius temperature? &amp;#34;&lt;/span&gt;))
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; 
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;fahrenheit &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; &lt;span style=&#34;color:#ae81ff&#34;&gt;9.0&lt;/span&gt; &lt;span style=&#34;color:#f92672&#34;&gt;/&lt;/span&gt; &lt;span style=&#34;color:#ae81ff&#34;&gt;5.0&lt;/span&gt; &lt;span style=&#34;color:#f92672&#34;&gt;*&lt;/span&gt; celsius &lt;span style=&#34;color:#f92672&#34;&gt;+&lt;/span&gt; &lt;span style=&#34;color:#ae81ff&#34;&gt;32&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;print(&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;The temparature is&amp;#34;&lt;/span&gt;, fahrenheit, &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;degrees Fahrenheit.&amp;#34;&lt;/span&gt;)
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Example with the command line argument:&lt;/p&gt;</description>
    </item>
    <item>
      <title>Using Java 5 on Mac OS X Tiger</title>
      <link>https://blog.khmersite.net/p/using-java-5-on-mac-os-x-tiger/</link>
      <pubDate>Fri, 07 Apr 2006 04:11:38 +0000</pubDate>
      <guid>https://blog.khmersite.net/p/using-java-5-on-mac-os-x-tiger/</guid>
      <description>&lt;p&gt;Mac OS X Tiger still uses the J2SE 1.4 as default Java virtual machine and compiler. If you need to upgrade to JDK 5, you have to download it from &lt;a href=&#34;http://www.apple.com/support/downloads/java2se50release3.html&#34;&gt;Apple&lt;/a&gt; download site.&lt;/p&gt;
&lt;p&gt;After you install it, you need to change a symlink to point to the JDK 5:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;code&gt;$ cd /System/Library/Frameworks/JavaVM.framework/Versions/&amp;lt;br /&amp;gt; $ sudo mv Current Current.old&amp;lt;br /&amp;gt; $ ln -s 1.5 Current&amp;lt;br /&amp;gt; $ mv CurrentJDK CurrentJDK.old&amp;lt;br /&amp;gt; $ ln -s 1.5 CurrentJDK&lt;/code&gt;&lt;/p&gt;</description>
    </item>
    <item>
      <title>Temperature Conversion</title>
      <link>https://blog.khmersite.net/p/temperature-conversion/</link>
      <pubDate>Thu, 06 Apr 2006 05:16:32 +0000</pubDate>
      <guid>https://blog.khmersite.net/p/temperature-conversion/</guid>
      <description>&lt;p&gt;If you get used to read the temperature in Fahrenheit scale like me, you may be confusing to see the temperature in Celsius scale given in weather forcasting on Australian or New Zealand televisions.&lt;/p&gt;
&lt;p&gt;So today, I&amp;rsquo;m gonna share a small Python program which can be used to convert the temperature scale from Fahrenheit to Celsius. As my Python programming skill is very limited at the moment, the program is going to perform very basic function.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Hello World &amp;#8211; Python</title>
      <link>https://blog.khmersite.net/p/hello-world-python/</link>
      <pubDate>Wed, 05 Apr 2006 04:58:59 +0000</pubDate>
      <guid>https://blog.khmersite.net/p/hello-world-python/</guid>
      <description>&lt;p&gt;I&amp;rsquo;ve been hearing a lot about &amp;ldquo;Python&amp;rdquo;, so I decided to pick up a book &amp;ldquo;Python Programming for Absolute Beginner&amp;rdquo; by Michael Dawson. Today, I&amp;rsquo;m going to share with you how to write classic &amp;ldquo;Hello World&amp;rdquo; program in Python.&lt;/p&gt;
&lt;p&gt;Fire your favorite text editor program, in my case I use vim.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;code&gt;kenno$ vim helloworld.py&lt;/code&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Then type the following code:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;code&gt;# Hello World&amp;lt;br /&amp;gt; print &amp;quot;Hello World!&amp;quot;&lt;/code&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Save it, and execute it with the following command:&lt;/p&gt;</description>
    </item>
    <item>
      <title>How to Decompress a bzip2 File</title>
      <link>https://blog.khmersite.net/p/how-to-decompress-a-bzip2-file/</link>
      <pubDate>Tue, 04 Apr 2006 05:19:53 +0000</pubDate>
      <guid>https://blog.khmersite.net/p/how-to-decompress-a-bzip2-file/</guid>
      <description>&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-console&#34; data-lang=&#34;console&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;bunzip -v exampleFile.bz2
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;or&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-console&#34; data-lang=&#34;console&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;bzip2 -dv exampleFile.bz2
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;ul&gt;
&lt;li&gt;&lt;code&gt;bzip2 -h&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;man bzip2&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;http://www.bzip.org/&#34;&gt;bzip2 homepage&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;</description>
    </item>
    <item>
      <title>Hello world!</title>
      <link>https://blog.khmersite.net/p/hello-world-2/</link>
      <pubDate>Thu, 16 Mar 2006 11:26:09 +0000</pubDate>
      <guid>https://blog.khmersite.net/p/hello-world-2/</guid>
      <description>&lt;p&gt;I’m not too sure what to do with this blog yet. I’ll see if I should move my old blog from Blogspot to here, or just using both concurrently. Anyway, only time can tell. As for now I’m gonna try to explore the features of WordPress since I’m pretty new to this blog system.&lt;/p&gt;
&lt;p&gt;However, if you wanna check out my old blog, here it is: &lt;a href=&#34;http://ekenno.blogspot.com&#34; title=&#34;Just Shoot It&#34;&gt;Just Shoot It&lt;/a&gt;.&lt;/p&gt;</description>
    </item>
  </channel>
</rss>
