User Tools

Site Tools


Apache log process using GoAccess

sudo zcat /var/log/apache2/access-advstats.*.gz | sudo goaccess /var/log/apache2/access-advstats.log -o report.html --log-format=COMBINED
2019/03/04 09:41 · johnny · 0 Comments · 0 Linkbacks


Replace $abc$ with $`abc`$:



Replace 4. 5 with 4.5



$1. $2
2018/11/03 23:48 · johnny · 0 Comments · 0 Linkbacks

Let's encrypt SSL

Install SSL for Godaddy web hosting through cpanel.

  1. Install certbot on your local machine:
    chmod a+x certbot-auto
  2. Generate SSL Certificate
    ./certbot-auto certonly --manual
  3. Install on Godaddy
    1. Open fullchain.pem and copy the top half of the file (only the first certificate).
    2. Log in to your GoDaddy cPanel. In the Security section, click SSL/TLS. Under Certificates (CRT), click “Generate, view, upload, or delete SSL certificates.”
    3. Paste the first half of the certificate under “Upload a New Certificate”, where it says, “Paste the certificate into the following text box:” Type a description and click “Save Certificate.”
    4. Under “Install and Manage SSL for your site (HTTPS),” click “Manage SSL sites.”
    5. Under “Install an SSL Website,” select your first domain. Click “Autofill by Domain” and the certificate should populate in the first box. (All 3 boxes may be automatically populated.)
    6. Open privkey.pem and copy the content to the private key field
    7. If the “Certificate Authority Bundle” is not filled in, copy the second half of the fullchain.pem file to the field.
  1. Click “Install Certificate.”
2018/02/22 09:59 · johnny · 0 Comments · 0 Linkbacks

Control R figure output format

To control the site wide option, use

nano Rhome/etc/

The home path (Rhome) can be found using

R.home(component = "home")

On Ubuntu, it is often /usr/lib/R.

In the, input


will change the default output to svg instead of pdf.

2016/11/07 14:25 · johnny · 0 Comments · 0 Linkbacks

Batch Convert YouTube DASH m4a audio (youtube-dl) to m4a (AAC DL)

The YouTube DASH audio might not be played by some audio players. If you have multiple files with such format, you can convert them using the following command on Windows.

 FOR %i IN (*) DO  C:\Users\Downloads\ffmpeg-20160725-fb91850-win64-static\ffmpeg-20160725-fb91850-win64-static\bin\ffmpeg -i "%i" -vn -acodec copy "new\%i"

Note that you need to download ffmpeg first from here: Remember where you save the ffmpeg file (the directory to it).

Then open the command line window and navigate to the folder with the files to convert. From there issue the above command. Note that the converted files will be saved into the folder “new”.

2016/07/30 16:05 · johnny · 0 Comments · 0 Linkbacks

Older entries >>

Blog History

Note. Everything on this blog only reflects my personal view which may or may not be true and is not related to any organization or institute.

Page Tools