Tài liệu Viettel Data Center và Cloud Infrastructure (DCCI) Summit Light 2023

Tài liệu hội thảo ngày 22/06/2023 tại HCM

[Ubuntu] Add or remove a systemctl (systemd) service

An example to add or remove a service on system with systemd

[Python] Search value in list of dictionary benchmark

This is a test how fast we can search value in a very large list of dict by various way

[Python] Graceful stop FFMPEG recording process on Windows

Problem

When we want to stop ffmpeg stream recording on Windows programmatically, these sollution will not work:

# asume p is the subprocess.Popen command call ffmpeg
os.kill(p.pid, signal.CTRL_C_EVENT)  # parent process get kill too, recording file is not playable
# or 
p.terminate()  # not good, recording file is not playable
# or
p.send_signal(signal.CTRL_C_EVENT) # parent process get kill too, recording file is not playable

[Learning] Should I define methods on values or pointers?

Stack Overflow: https://stackoverflow.com/questions/25382073/defining-golang-struct-function-using-pointer-or-not

Can someone explain to me why appending to an array works when you do this:

func (s *Sample) Append(name string) {
    d := &Stuff{
        name: name,
    }
    s.data = append(s.data, d)
}

But not when you do this:

func (s Sample) Append(name string) {
    d := &Stuff{
        name: name,
    }
    s.data = append(s.data, d)
}

Is there any reason at all why you would want to use the second example.

[Learning] Odoo super call dependency test

A test logs how Odoo process modules dependency with different install order

Test source code: https://github.com/NothingCtrl/odoo_super_dep_test

[BugFix] Python return incorrect MimeType for Js file under Windows 10

For unkown reason, python webserver return MimeType text/plain for all .js file when running under Windows 10