How to convert character encoding in text files

Here is how to convert text files from one character encoding to another in GNU/Linux:

#eg1
iconv -f ASCII -t UTF-8//IGNORE file.txt -o output.txt

#eg 2
iconv -f ISO-8859-1 -t UTF-8//TRANSLIT file.txt output.txt

The -f parameter denotes “from” and -t parameter denotes “to” character set.
//IGNORE means the “iconv” will ignore any characters that are not available in the target character set.

While “//TRANSLIT” means the converter will attempt to substitute characters that are not available in the target character set to the closest characters available, failing that, “???” will be replaced in its place.

Most GNU/Linux distribution have iconv preinstalled, if not, please consult your distribution documentation.

COVID-19 and Movement Control Order in Malaysia

The government of Malaysia instituted Movement Control Order (MCO) in Malaysia which restricts all residents to their homes to control COVID-19 spreads.

Today is the beginning of the MCO in Malaysia. The dangers of having COVID-19 viral influenza should not be understated as there are deaths from infections and there are also lasting effects from the damage done by the viral infection.

Hoping that this will pass soon.

No time to read lengthy articles? TLDR Chrome extension will digest that for you

Ever encountered long winded article which makes you feel like you do not want to read?

Enter TLDR; Chrome extension, a browser extension made by Recognant which can summarize any article for you.  The extension works well with English language article, but upon my inspection, it can also works well for Malay language article.

A must have extension  for those who just want to browse through articles at a glance.

Digitalocean upgraded their Droplets hosting Offering

Good news for those looking for VPS hosting solution. Digitalocean has upgraded their droplet offering by increasing the diskpace and RAM at the same price point.

Here are the new Droplets package from Digitalocean:

The most interesting plan is Flexible droplets where you can resize the droplets at any time choosing between with RAM or vCPU at the same price point.

Benefit for existing customer:

Existing customer can enjoy the new price point by clicking “Resize” option to get the new offering from Digitalocean

Benefit for new customers:

New customer will enjoy USD10 giveaway when signing up with Digitalocean. Remember that Digitalocean charges by hour, so you can test drive their VPS in a few days and can decide whether you want to continue or not with their service without any penalty

How to convert Microsoft Office *.docx files to PDF using Linux in command-line

Here’s how to convert Microsoft Office *.docx files to PDF using Linux in Command Line.
This trick can also be used together with other documents files supported by LibreOffice

First make sure you’ve installed the latest version of LibreOffice for use in command line environment.
Assuming the user is ‘example’ and the filename to convert is ‘doc.pdf’.

libreoffice --headless -convert-to pdf --outdir /home/example/ /home/example/doc.docx

The conversion can also be adapted to PHP or Python using their respective shell_exec or subprocess directive.