Updating Kinetis Design Studio on Linux

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. $ sudo /opt/Freescale/KDS_3.0.0/eclipse/kinetis-design-studio Then to update it, just click on Help -> Check for Updates from the menu.

July 28, 2015 · 1 min · 49 words · kenno

PF firewall rule for DNS server

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’t even the best practice. Here’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. ...

July 9, 2015 · 1 min · 131 words · kenno

Remove a file/directory starting with dash/hyphen

I just noticed that in the /root directory, there exists a directory with its name starting with a dash: -p in my FreeBSD box. 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 As much as I wanted to get rid of it, I was curious to find out what’s inside that directory. ...

July 7, 2015 · 1 min · 212 words · kenno

ISC Dhcpd Duplicate UID Lease

Someone asked this question in one of his blog posts: 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 Yes, I’m seeing something like that now in the my dhdcp logs. Here is the actual message: 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 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 ...

June 25, 2015 · 1 min · 198 words · kenno

PySpark takeOrdered example

Sort by keys (ascending): RDD.takeOrdered(5, key = lambda x: x[0]) Sort by keys (descending): RDD.takeOrdered(5, key = lambda x: -x[0]) Sort by values (ascending): RDD.takeOrdered(5, key = lambda x: x[1]) Sort by values (descending): RDD.takeOrdered(5, key = lambda x: -x[1]) Credit: http://stackoverflow.com/questions/30787635/takeordered-descending-pyspark

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