PySpark takeOrdered example

Sort by keys (ascending): Sort by keys (descending): Sort by values (ascending): Sort by values (descending): Credit: http://stackoverflow.com/questions/30787635/takeordered-descending-pyspark

June 24, 2015 · 1 min · 18 words · kenno

YUM what provides this file, huh?

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. 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 installation page is: Unfortunately, the process failed with ./configure with the complain about missing readline library....

June 24, 2015 · 1 min · 136 words · kenno

Install PostgreSQL server on Raspberry Pi from FreeBSD port

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

June 18, 2015 · 2 min · 426 words · kenno

Disable puppet-lint class inheriting from params class

I normally use Vim to edit Puppet modules and manifests codes. However, recently I just found out about Atom 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. As mentioned earlier, Atom provides syntax highlighting for various programming languages; well except Puppet....

June 18, 2015 · 1 min · 179 words · kenno

ការបញ្ចូល git ក្នុង Raspberry Pi ដើរ​ FreeBSD 11

ដោយ​សារ​ពុំមាន​ កញ្ចប់បាយនារី (binary package) នៃ​​ git យើង​​ត្រូវ​បញ្ចូល​ git​ពីសោះ​ខូត ដូច​ខាងក្រោម៖ # cd /usr/ports/devel/git # make install clean សង្ឃឹម​ថា​ថ្ងៃ​ក្រោយ​ឆាប់ៗ កញ្ចប់​បាយនារី នឹង​បាន​បង្កើត​ឡើង​ ព្រោះខំផាយ​ពី សោះខូត​យើត​ណាស់ ជាពិសេស​ពេល​ខំផាយ​វា​លើ​ រ៉ាស់​ប៊ែរី​ផាយ។

May 29, 2015 · 1 min · 23 words · kenno

របៀបលុបណូត​ចេញ​ពី Puppet master

នៅ​កន្លែង​ធ្វើ​ការ​ ខ្ញុំ​ប្រើ​ Puppet ដើម្បី​គ្រប់​គ្រង​ ម៉ាស៊ីន​ជា​ច្រើន។ ជួនកាល​ខ្ញុំ​ត្រូ​វការលុប​ម៉ាស៊ីន​ចេញ ពី Puppet master ដោយ​សារ​ម៉ាស៊ីន​នោះ​លែង​ត្រូវ​ការហើយ។ នេះ​ជា​ជំហាន​ដែល​ត្រូវ​ធ្វើ៖ ១. លុបមាស៊ីន​ ឬ ណូត​នោះ​ពី puppet dashboard ២. លុប certificate របស់ម៉ាស៊ីននោះ​ចេញពី puppet master ដោយវាយ ខំម៉ាន # puppet cert clean node123.example.com ៣. ដោយសារ​ខ្ញុំ​ប្រើ PuppetDB ខ្ញុំ​ត្រូវ​លុប​ ណូត​នោះ ចេញ​ពី PuppetDB ដែរ # puppet node deactivate node123.example.com ខ្ញុំ​សរសេរ អត្ថបទ​នេះ ដើម្បី​រំលឹក​ខ្លួន​ឯង​ពេល​ខ្ញុំ​ត្រូវ​ការ​ធ្វើ​វា​ម្តង​ទៀត។ បើ​សិន​ជា​លោកអ្នក​ មាន​សំណូម​ពរ​ ឬ​សំណួរ​ទាក់ទង​នឹង​ ការប្រើប្រាស់ Puppet អាចសួរ​ខ្ញុំ​បាន៕

May 22, 2015 · 1 min · 52 words · kenno

R-tip: List installed R packages

April 29, 2015 · 0 min · 0 words · kenno

Fixing “Starting version 219” bug in Kubuntu 15.04 Beta

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 page which fixed the problem. Here’s a recap on how to do it. When you see the above message, hit Ctrl + Alt + F2 Run sudo systemctl enable sddm....

March 27, 2015 · 1 min · 94 words · kenno

Installing Code Composer Studio 6 on Ubuntu 14.10 (64-bit)

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. 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. Issue 1: After the installation, when I ran the ccs, it produces some warning and error messages then quit....

March 3, 2015 · 1 min · 190 words · kenno

Mounting qcow2 VM disk images

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 past, I was lucky to be able to fix it. 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....

February 19, 2015 · 1 min · 106 words · kenno