Showing posts with label homelab. Show all posts
Showing posts with label homelab. Show all posts

This Week I Learned - 2017 Week 33

Last week post or the old ramblings.


The Vox POP is probably the most entertaining and educational YouTube channel right now. I wish they produce more and frequently.




Mommy, Why is There a Server in the House? Suitable for those who are active in /r/homelab.


Refurbished my battle station and upgraded my Fedora 25 to 26. Nothing special about this release and I was expecting something significant or may be I miss out something?
$ sudo dnf upgrade --refresh
$ sudo dnf install dnf-plugin-system-upgrade
$ sudo dnf system-upgrade download --releasever=26
$ sudo dnf system-upgrade reboot


Gigabyte MA10-ST0 powered by Intel® Atom C3958 SoC. A 16-core Atom (C3958 SoC) server board which can be a good server-based motherboard for virtualization or NAS. Think ESXi, FreeNAS, or Proxmox. I was thinking of buying and setting one up for data hoarding.


Does programmer needs office? Definitely. I still fail to understand why corporation still craze over open office floor plan. It's very hard to concentrate without any distraction. People walking by and talking non-stop. Collaboration doesn't means physical communication, it can be done through any messaging app. Private office does works. The funny thing is, I miss cubicle. At least you can really concentrate and work in the zone.


Unknown electronic parts? Get it from Octopart. Buying chips and checking availability? Find Chips.


Speaker broke down and I need to get a new pair of cheap bookshelf speaker. Initially was searching for a pair for good bookshelf speaker like Pioneer SP-BS22-LR, but unfortunately, this model have been either phased out or you have to purchase whole Hi-Fi set. Meanwhile, no local distributor is importing Micca PB42x. I read good review on Swan HiVi D1010-IV or Swan Hivi D1080-IV, might as well allocates budget to purchase this instead. Luckily we can still find it from the local supplier and the price still acceptable, within MYR 450-plus. All this discussion about cheap and good quality speaker is useless if you can't can't hear audio quality? Otherwise, you're just wasting money without any actual benefits.

When you have a pair of speakers, to get the best out of your 2.1 setup. The next purchases will a Digital Analog Conveter (DAC), which convert binary bits (zero or one) to analogue signal and a amp. If you have a DAC, you can skip buying a sound card. Popular DAC is Behringer UCA202 or UCA222 and for amp, Lepai 2020A+SMSL SA50Diagram below illustrates this setup.



Slow MySQL performance in Docker instance? Use TMPFS, where you put the whole database into the RAM. The approach for MySQL docker instance seems easy enough to setup and there have been many documented results.


Why are we trying hard to optimize the MySQL Docker instance? One of the main issue is that big database restoration may kill the MySQL daemon due to either large volume of records. Which begs the question, how many rows? This is determined by server parameter of `max_allowed_packet` or adjust the server according to these parameters.
- bulk_insert_buffer_size = 256M
- innodb_log_buffer_size = 64M
- innodb_log_file_size = 1G
- max_allowed_packet = 1G

While we're on MySQL, it seems we can delete records from two tables in one DELETE statement. The key thing here is the columns from both tables need to be specified.
DELETE a.*, b.*
FROM table1 a
LEFT JOIN table2 b
ON a.id = b.id
WHERE a.id = 1


It has been a while that I talked about Perl. Getting unique array list. Sigh, every single damn time I've encountered this I was wondering why this is not built into the core language itself?


GNOME is 20 years. It has been so long since I first tried it. I'm getting old. After Ubuntu switching to GNOME as default desktop environment, I felt that GNOME have finally won the GNU/Linux desktop war against KDE after so many fricking years.


No space life in Docker Machine in Windows? Maybe you can recreate another `default` Docker Machine following these settings. Assumed you're using VirtualBox.
$ docker-machine create
--driver virtualbox
--virtualbox-memory 8096
--virtualbox-disk-size 40000

This Week I Learned - 2016 Week 37

Last week post or the whole series.

As we're moving to the end of the third quarter of the year, more things pop up for me to follow up. Interestingly but not surprisingly, life is as monotonous as ever. Yes, it can be routinely, but that probably the only way, through sheer discipline, to follow through your plans.

The components for setting up my homelab using AMD 5350 have been bought and set up accordingly. The only remaining tasks is to install the necessary OS and configuration. More writeups on this in coming future.

As usual, something I learned this week.

Looking into Makefile, specifically GNU MakeExtracting parameters from target? Yes, is doable but it's not pretty. See code below. If your target is not an actual physical file, make it a '.PHONY' target instead. Otherwise you will encounter "No rule to make target" error. Next, we will need to 'eval' when extracting the assigning the parameters passed, otherwise the 'PARAMS' assignment will be executed as command.
.PHONY: action

action:
    $(eval PARAMS := $(filter-out [email protected],$(MAKECMDGOALS)))
    @echo $(PARAMS)

Interestingly, there are four ways for variable assignment in Make. The 'Set If Absent' way of variable declaration and initialization is quite handly. Funny though, Perl, which is known for its brevity, does not have such language construct.
# Lazy Set. Value is expanded and set when used.
FOOBAR = x

# Immediate Set. Value is set when declared.
FOOBAR := x

# Set If Absent
FOOBAR ?= x

# Append
FOOBAR += x

Write it down, make it happens. Never underestimate the power of writing. Sometimes, the pen is mightier than the sword.

'git commit --allow-empty'. My goodness! I'm not aware of this option exists in Git. How many times I've adjusted a space just to create and make an empty dummy commit. While we on Git, if you seems to "misuse" it somehow, there are many ways to recover back.

Web development is a layer of layer of layer of abstraction hacks? I firmly believe. It's messy, plagues with multiple choices, and feels like wild wild west. HN user, meredydd mentioned that modern web application today consists of five programming languages and three frameworks. Interestingly, I never realize there are so many choices. Maybe future Javascript, ES2016 can reduce that paradox of choices by standardizing on using the same language for frontend and backend, as in isomorphic Javascript? But that also raises another interesting question. Is web development a constant rewrite of existing application to newer technologies?

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.