This Week I Learned - 2017 Week 34

Last week post or the old archive stuff.


Having a working and non-disrupting battle station have finally let me able to concentrate on my personal stuff. There are a lot of things to clean up and de-clutter but one thing at a time. At least I can sync up the productivity at both work and home.


Lots of re-learning of ConTeXt, after so many years away from it. The number one rule in using ConTeXt, you must append a comma (,) in a list of items. Not sure why, but I was burned several times where the intended results were not obtained regardless numerous times of trials and errors.

This will not work.
\setuphead[subject][
    textstyle=cap,
    header=empty,
    alternative=middle,
    style=bold
]

This will work.
\setuphead[subject][
    textstyle=cap,
    header=empty,
    alternative=middle,
    style=bold,
]

Undo certain Git commit. Two steps involved. First is to reset or remove the particular commit and push the changes to remote origin. Second, pull from the remote origin and reset the index.
$ git reset 7f6d03 --hard
$ git push origin -f

$ git fetch origin
$ git reset 7f6d03 --hard

Finally, found the effective way of managing your dotfiles and the full write-up describes the details on how to set it up, either new or existing Git repository. Good example where the lack of understanding of Git undermines the effective usage of managing your dotfiles. There is no need for external programs to manage your symlink and updates. Just plain old Git. The hassle and complexity of managing your development environment setups (I've tried a few ways) is not worth the time and efforts.


People, this is how you design a login or registration form.



Installed, uninstalled, and reinstalled the Vim package. Somehow the path to Vim binary have been messed up. However, update the Bash's hash table of full path names of executable files seems to solve it.
$ vim
-bash: /usr/local/bin/vim: No such file or directory

$ which -a vim
/usr/bin/vim

$ hash -r

Somehow my Vim installation does not support Python plugins. Some googling here and there revealed that I have multiple implementation of Vim installed in the system. The default selected Vim binary does not support Python plugins. The only way is to update the alternative.
$ sudo update-alternatives --config vi
There are 3 choices for the alternative vi (providing /usr/bin/vi).

  Selection    Path               Priority   Status
------------------------------------------------------------
* 0            /usr/bin/vim.gtk3   50        auto mode
  1            /usr/bin/nvi        20        manual mode
  2            /usr/bin/vim.gtk3   50        manual mode
  3            /usr/bin/vim.nox    40        manual mode

Press  to keep the current choice[*], or type selection number: 3
update-alternatives: using /usr/bin/vim.nox to provide /usr/bin/vi (vi) in manual mode

$ sudo update-alternatives --config vim
There are 2 choices for the alternative vim (providing /usr/bin/vim).

  Selection    Path               Priority   Status
------------------------------------------------------------
  0            /usr/bin/vim.gtk3   50        auto mode
  1            /usr/bin/vim.gtk3   50        manual mode
* 2            /usr/bin/vim.nox    40        manual mode

Press  to keep the current choice[*], or type selection number: 2


People start hating their jobs at age 35? (via HN) The best possible reason is that they become very aware of mortality and realize time move at a relatively faster pace.


How the RPi::WiringPi distribution is tested. You have to be amazed by the effort the author is putting in ensuring the quality of the libraries. Probably one the most meticulous developer I've seen online. The hardware setup is shown in the screenshot.


Don't like any ready-build electronic prototyping platforms? You can try Shrimp parts kits. I love the minimalist approach of gathering different electronic components and build something up. Good alternative to Arduino. The step-by-step guidance, for example, to blink an LED, is a good introduction for any beginner (yours truly) who want to pick up some electronic.

No comments:

Post a Comment