Flexible Hours Boost Productivity

MaxxSports.tv is a strong believer of flexible hours. As a matter of fact, we all work on flexible hours.

  1. saved commute time adds to work hours
  2. work the hours that are most productive
  3. personal needs are accommodated
  4. trusted from management is invaluable



Restore OS from bare metal

My computer failed last week and restoring C drive, the OS partition, cannot boot my Windows 10. What need to be backed up so that Windows can boot up as long as the hardware is good? Here is a list of items I came up with:

  1. The BIOS setup: for UEFI, the boot file location, e.g EFI/ubuntu/grubx64.efi
  2. The GPT header and partition table
  3. The EFI partition: holding grub2 boot loader and kernel
  4. The OS partition: C drive for Windows, and root partition for Linux.

Tools used: CD burned from http://www.system-rescue-cd.org, run PartImage, which create image by calling PING 4.7.3

Pixel format: RGB YUV and Bayer

The three have been confusing to me due to terminology. To be more accurate, I use rgb24 yuv420p and bayer_rggb8 instead, which can be found in the output of “ffmpeg -pix_fmts”

  1. rgb24: one byte for each RGB component, and therefore three bytes per pixel.
  2. yuv420p: one byte luma for each pixel, and two bytes chrominance is shared by four pixels. therefore, one and half bytes for each pixel.
  3. bayer_rggb8: only one byte per pixel. In another word, only one of the RGB color is saved for each pixel.

Their strength:

  1. rgb24: the most straightforward.
  2. yuv420p: 1. save memory space  2. in different color space of YCbCr, therefore gives a different perspective of the colors
  3. bayer_rggb8: save memory space, and it’s in the same color space as rgb24.

Camera sensors use bayer_rggb8 instead of rgb24 in order to lower the cost. For each pixel, it would need three sensors to capture all three RGB components.

Connecting to a server behind the firewall

Some of our servers are behind the stadium’s firewalls, and we don’t have control over those firewalls. Our AWS servers, accessible by ssh on the internet, needs to connect to our physical servers behind the stadium’s firewall. I found the quickest way with minimum system-wide impact is to use so-called “ssh remote forwarding”.

If we call the host behind firewall HF, and the host in AWS HA, there are two steps to let HA connect to HF’s port 80. 1. HF runs ssh to connect to HA. 2. HA connects to HF by connecting to HA’s local port.

Here are the commands:

  1. on HF: ssh -R 8083:localhost:80 HA   , which forwards HA:8083 to HF:80
  2. on HA: browser to: http://localhost:8083 , which actually connects to HF:80.
  3. Optional.:GatewayPorts is needed only if other machines need to connect to HF through HA

“remote” means remote to sshd. In another words, sshd and the forwarding destination is not on the same local network.