This Week I Learned - 2016 Week 25

Last week post or the whole series.

Space random generator. (HN post) Interesting result of applying Procedural Generation to generate random 3D spaceship using Blender. The fun thing about procedural generation is that we never know the outcome of the generation and sometimes there are random surprises. Example of the generation is shown below.

I'm in the midst of building a GNU/Linux 3D workstation and based on the Blender's optimum system requirements and supported platforms. Interestingly, the XEON E5-2670 setup, while impressive, seems a bit overboard. Main issues will likely be the graphic card driver support for GNU/Linux.

Similar to Python, indentation in Makefile, if use incorrectly, can't cause  can cause command not found error or sometimes, wrong ifdep usage. While we're on Makefile, recursive Makefile is doable.

Three shirts, four pairs of trousers (via HN). Living with the bare essentials. Somehow, unknown to us, hoading has become a part of us. Sometimes "throwing" away all the unnecessary stuff helps to reset, reboot, and rewind our unhealthy relationship with our physical or digital stuff. Awareness is the key here, otherwise subconsciously we will tends to buy or get more stuff, especially if you have hobbies of collecting stuff, worst if it's an expensive hobbies. Declutter is a long lonely process as you're constantly fighting with yourself whether to keep or to let go of the stuff. First rule, if you're not using anything for a year, get rid of it, regardless your sentiments.

How to Skivvy Roll. The most efficient packing system when travelling.

Another homelab using AMD Athlon 5350 compare to this. Interestingly, the case used here was an 2U rack.

This Week I Learned - 2016 Week 24

Last week write-up or you might want to read the whole series.

Typosquatting programming language package managers. Mostly likely inspired by the Npm's left-pad incident.

Print debugging on steroid in PHP? Try Kint.

Due to the decommission of CPU processor by big Internet companies, the used market was flooded with Xeon E5-2670. Hence, there are many who tried to build a powerful Dual-Xeon machine. While the processor is roughly around USD 70 and highly soughtable, the motherboard is very costly. It's reasonable that everyone want to assembly the most powerful machine with minimum cost. However, judging by the TDP, it recommended to build smaller and more economical home lab. Again, it still depends on what the main purpose you want to build your own home lab.

tl;dr: Maintenance code: 3008.

Have an Unifi account with the Huawei EC6108V8 media player? Want to make the most of this tiny device? The essential configuration and setup steps are in post #10, #14, #32 (enable you to login to Play Store), #69, #90, #98, #102, #103, #178 (if #32 doesn't work), #190, #208 (similar to #178), #218 (maintenance code), #252, #263, #278 (similar to #178 and #208), #287, #291, #311, #319, #359, #377 (like #178), #387 (device specification), and #414.

This Week I Learned - 2016 Week 23

Last week write-up or you might want to read the whole series.

Calculate the power supply needed for your Power Supply Unit (PSU). It seems that my HP Proliant ML110 G6's PSU of 300 watt seems sufficient enough. Maybe the issue is with the power socket or adapter? Next step, install different operating system to test it out. Or maybe I should proceed on building a HTPC instead? But find the required parts is quite an frustrating process. I've never realize that quite a lot of product, for example, casing is not available in MY.

AMD Athlon 5350 Kabini Quad-Core 2.05 GHz is my favourite CPU processor (or APU to be exact) right now besides the XEON X-series. This is a very unique processor that sits between 5150 and 5370 but that supports virtualization extension (AMD-V). Hence, this processor is suitable for building your own homelab which fully utilizes the quad-cores for virtualization. Furthermore, the power consumption is 25 Watt TDP. However, the motherboard choices for AM1l is quite limited but so far only Asus AM1l-A seems to support ECC Ram or not?

One good example of using this processor is building a pfSense firewall. Why one want to build and setup a homelab? Well, if you want to be a full stack engineer or just having some fun building a machine.

As it's very hard to find a single 5350 in MY. The next best option to go for A4 5000, which have similar features to Athlon 5350 but lower clock speed. The only available APU option right now here is BioStar A68N 5000. While having higher TDP, it's still a preferable choice when compare to Celeron J1800 or J1900 for its AES encryption support and less painful VMWare's ESXi installation.

How to teach yourself programming. Learning a new programming language is never hard, you just have to use it on daily basis and experienced the whole eco-system.

Something more about Perl. The official Perl's Docker image is up (via Reddit). So right now, we can have an isolated Perl environment for customization and development. So many things I want to try out, for examples, Moo (Minimalist Object Orientation), DNSMadeEasy Webservices API, and try to figure out how to define and use constant properly in Perl.

While we're on Docker, it seems the default Docker installation in my Ubuntu 16.04 cannot be executed by non-root user. To enable this,
$ sudo groupadd docker
$ sudo gpasswd -a ${USER} docker
$ sudo systemctl restart docker
$ sudo systemctl status docker
$ newgrp docker # no need to logout and login again
$ docker version

Chromiun OS for Single Board Computers (SOCs). Is time to use back the shelved Raspberry Pi 2.

This Week I Learned - 2016 Week 22

Write-up for last week or you might want to read the whole series.

As the HP Proliant server keeps restarting for no particular reasons  and I can't seem to pinpoint the exact reason, is either the PSU or the motherboard. I've a hunch this is caused by the motherboard. As this is a server, the motherboard is very particular and monitor different kinds of thresholds. For example, if the heat sink fan and case fan are not running, the machine won't boot. Maybe is time for me to switch to different motherboard, a desktop-based motherboard.

As I learned in the past with this machine, finding replacement parts was a bit tricky. Looking for a replacement motherboard seems a bit hard these days, especially I want to reuse the Intel Xeon X3430 CPU (Lynnfield). As the X34xx processor supports only LGA 1156 processor socket, which has been phased out and not available in the market these days. I've three choices. First, buy a used LGA 1156 motherboard or source it from TaoBao. Second, install Windows Server to it and see any issues. Third, buy a used LGA 1156 motherboard.

Inspiring online. So much creativity these days using web to express yourself.

I have created 50 games in 2014. (HN discussion) Well, I've none in my entire development life until now and will continue to be so. Anyone can develop a game but the subtle details are what separating a boring normal games to something more exciting and enticing. Presentation by Jan Willem Nijman, Martin Jonasson and Petri Purho demonstrate this superbly.

Not a gamer but I've realize that I never actually install Steam before. Tried to install it, as usual, there is always some hiccup and workaround here and there. Command below should be good enough to go through the workaround. It has been a while since I last play any games, still nothing fancy here, nothing much to explore. Nevertheless, Steam enabled the GNU/Linux have a platform for gaming, good for creating awareness of its existences.
$ find $HOME/.steam/root/ubuntu12_32/steam-runtime/*/usr/lib/ -name "" \
-exec mv "{}" "{}.bak" \; -print

Post-installation Notes on Ubuntu 16.04 LTS Xenial Xerus

Ubuntu 16.04 LTS Xenial Xerus was released few weeks back and its time to either upgrade or fresh installation. I've done both for different machine, my lappy and desktop. Since my recent switch to SSD hard disk and a new graphic card, these are my notes on the post-installation. After so many years of using Ubuntu, yet you still need to manually tweak it to get the basic essential features to work correctly.

Installation against the SSD is freaking fast, the whole installation finished merely in just less than five minutes. I didn't time the installation process but it was blazing fast compare to all my previous installation. If you're still using HDD, switch to SSD, now! Is like the connection speed from upgrading from dial-up to fiber optic.

Update and Upgrade Packages
The new apt command is very welcoming and finally we have progress bar during package installation. Before that, switch to your fastest mirror. No offence to those who helps to mirror MY repository, but MY mirrors speed are rather inconsistent compare to SG mirrors.
$ sudo sed -i 's/my/sg/g' /etc/apt/sources.list
$ sudo apt update
$ sudo apt full-upgrade

Replace Unity with Gnome
Yes, finally Unity's launcher can be moved to the bottom of the screen but is too little, too late for anyone to care about that. GNOME provides a better integrated desktop user experience. Pick GDM3 as your login manager, log off from current desktop sesison, switch to GNOME desktop, and re-login.
$ sudo apt install ubuntu-gnome-desktop

Dual-Screen Undetected Screen Resolution
Till today, Ubuntu still cannot get the screen resolution right for my second monitor. Again, we've to tweak it through xrandr.
$ xrandr -q
$ cvt 1280 1024

Add the resulting shell script '.xprofile' to resize and re-position the dual screen monitors as follows. As I'm a left-handed mouse user, hence my screen setup is also spanning from left to right.
xrandr --newmode "1280x1024_60.00"  109.00  1280 1368 1496 1712  1024 1027 1034 1063 \
    -hsync +vsync

xrandr --addmode DVI-0 1280x1024_60.00

xrandr --output VGA-0 --primary --mode 1280x1024 --pos 1280x0 --rotate normal \
    --output DVI-0 --mode 1280x1024_60.00 --pos 0x0 --rotate normal \
    --output HTMI-0 --off

Conventionally, to execute the command before the starting of X user session for GDM, you should put these commands in '.xprofile' as GDM will load the setting from '/etc/gdm3/Xsession'.

Google Chrome can't play YouTube's videos.
Beginning 16.04, there is no more proprietary ATI graphic driver or fglrx and this may cause some issues if hardware acceleration through graphic cards like games or video playing. The error message obtained when starting Google Chrome from the console as shown below.
Not implemented reached in virtual 
void cc::VideoLayerImpl::AppendQuads(cc::RenderPass *, cc::AppendQuadsData *)

The workaround is to disable hardware acceleration under 'advanced settings`. Mostly likely this will be fixed in upcoming patches.