08 September 2025

How to Transform or Say Convert Different Format of Files Such as .md, .rst, .html, .docx, .pdf, etc.?

Install 'pandoc' software

How to install pandoc?

$ sudo apt update
$ sudo apt install pandoc

 

How to use pandoc?

$ tldr pandoc 

How to Install and Use Prettier on Ubuntu?

# npm install -g prettier
 
How to make html and css and javaScript files
prettier?
 
$ prettier --write --tab-width 4 test.html 

01 September 2025

It always asks for Recovery Key when I boot to Windows, after I set up dual boot (Windows + Ubuntu)

1. To boot into Windows 

Press F12 to enter boot menu. Choose Windows.

 

2. To boot into Ubuntu

(1) Do NOT press F12. Simply wait, and choose 'Ubuntu'. 

Explanation: To boot into Windows, use Windows Boot Manager; to boot into Ubuntu, use GRUB. 

(2) Press F12 to enter boot menu. Choose Ubuntu.

How to extract texts from an image on ubuntu?

To extract English texts - 
$ sudo apt install tesseract-ocr
$ tesseract your_image_name.png extracted_text.txt 

 

To extract Simplified Chinese texts -

$ sudo apt install tesseract-ocr tesseract-ocr-chi-sim

$ tesseract your_image.tiff output_text.txt -l chi_sim

 

To extract Traditional Chinese texts -

$ sudo apt install tesseract-ocr tesseract-ocr-chi-tra

$ tesseract your_image.tiff output_text.txt -l chi_tra

 

To extract multiple languages, e.g. English and Simplified Chinese, and Traditional Chinese texts -

$ tesseract your_image.tiff output_text.txt -l eng+chi_sim+chi_tra