Upgrade WordPress in Command Line with 3 simple steps

One of the best way to upgrade your WordPress version in command line with only 3 simple steps.

  1. Download the compressed file from https://wordpress.org/download/ and unzip it.

cd /var/www/html

wget https://wordpress.org/latest.tar.gz
tar -xzvf latest.tar.gz

  1. Copy and overwrite the core files

cp -avr /tmp/wordpress/* .

rm -rf wordpress latest.tar.gz

  1. Open and login your WordPress site to upgrade the core.


Certbot adding a domain | nginx | Ubuntu

First, install your certbot

apt-get install -y certbot

For Ubuntu, make sure you install the tool

apt-get install -y python-certbot-nginx

To add a domain

certbot –nginx -d yourdomainname.com -d www.yourdomainname.com

To revoke a domain

certbot –revoke –cert-path /etc/letsencrypt/live/MyDomain/fullchain.pem

Listing of certificates

certbot certificates

To test the renew

certbot renew –dry-run

To renew

certbot renew

Useful Public DNS Server



China – Clean, No unwanted Ads

China – Protection from Trojans, For Banks, Privacy

China – School, Children, Kids, No Sex Sites

China Telecom in GuangDong

Screen Terminal Commands in Mac OS

To list all USB Serial Ports:

$ ls /dev/tty.*

To Screen on the Serial Port:

$ screen /dev/tty.usbserial-XXXX [baudrate]
$ screen /dev/tty.usbserial-A101Y8E2 115200

To exit from screen:

Hold [Ctrl+a] and press [d]

To list all screen sessions:

$ screen -ls
There is a screen on:
[session id].ttys001.Your-Machine (Detached)
1 Socket in /var/folders/xxxx

To resume from a screen:

$ screen -r
$ screen -r [session id]
$ screen -R

To kill / exit from a session:

$ screen -S [session id] -X quit

Hope it helps you.


Perfect Kodi Installation Configuration Fusion Exodus Cthlo Azdrama OpenSubtitles PVR IPTV

Kodi® (formerly known as XBMC™) is an award-winning free and open source (GPL) software media center for playing videos, music, pictures, games, and more. Kodi runs on Linux, OS X, Windows, iOS, and Android, featuring a 10-foot user interface for use with televisions and remote controls. It allows users to play and view most videos, music, podcasts, and other digital media files from local and network storage media and the internet.

Here are the steps to install perfect Kodi with all configurations you need.

Download and install

Almost all platforms supported.

Link: https://kodi.tv/download/

Before adding anything, we need to allow Kodi to install Add-ons from Unknown sources.

Go to Settings > System > Add-ons > Unknown Source (Checked)

Adding Exodus Videos Add-on

One of the best add-ons for Kodi: Exodus

Adding Fusion via File Manager > Add Source > “http://fusion.tvaddons.ag” > Name it as “Fusion”

Go to Add-ons / Add-on Browser > Install from zip file > Fusion > kodi-repo > English > repository.exodus-1.0.1.zip

Same location Add-ons / Add-on Browser > Install from repository > Exodus Repository > Video add-ons > Exodus > Install

Adding Chtlo Azdrama Videos Add-on

One of the best add-ons to watch HK Dramas, China Dramas, Taiwan Dramas, Korean Dramas, Japanese Dramas, Anime Plus TV.

Adding Cthlo via File Manager > Add Source > “https://cthlo.github.io/cthlo-kodi-repo/zips/” > Name it as “Cthlo”

Go to Add-ons / Add-on Browser > Install from zip file > Cthlo > repository.cthlo-kodi-repo > repository.cthlo-kodi-repo-1.0.0.zip

Same location Add-ons / Add-on Browser > Install from repository > cthlo-kodi-repo > Video add-ons > Icdrama & azdrama.net > Install

Set up OpenSubtitles as Default subtitles

Go to Add-ons / Add-on Browser > Install from repository > Kodi Add-on Repository > Subtitles > OpenSubtitles.org > Install

Now we need to configure an account for it.

Click on OpenSubtitles.org > Configure > Enter your username and password > Ok

If you do not have an account yet, you may register one free here: http://www.opensubtitles.org/en/newuser

Optional: You may change default language at Settings > Player > Language (Multiple selection)

Optional: You may set automatically load Subtitles by installing Add-ons > Services > AutoSubs Add-on.

Set up PVR for IPTV

Go to Add-ons / Add-on Browser > My Add-ons > PVR Clients > PVR IPTV Simple Client > Enable

Configure > M3U Playlist URL > “http://pastebin.com/raw/fiMEf4Ab” > OK

You need to Reboot the Kodi to reload M3U Playlist.

That’s all for the installation and configuration.

Hope you enjoy your Kodi with the perfect installation.


Remove SSL certificate passphrase

A lot of people ask how they can remove the passphrase requirements from a private key so that Apache can be (re)started without the need to re-enter the key’s passphrase.

Security warning

Once you remove the requirement for the passphrase, the certificate can be easily copied and used elsewhere, thus raising the risk of it being abused. If you must remove the passphrase then you must take adequate protection in the storage of the file. Ensure that the permissions are set to only allow access to those who need it.

Now that you have been warned about the risks, we can continue onto the options

1) httpd has a directive you can use, SSLPassPhraseDialog.
2) You can use OpenSSL to remove the passphrase from the certificate completely.

An example usage of SSLPassPhraseDialog :

SSLPassPhraseDialog exec:/path/to/script

N.B. 'SSLPassPhraseDialog' can only be used in the main server config, and must be outside of any <Directory> or <Location> blocks.

Inside an example perl script:

echo "put the passphrase here"

After saving the passphrase script, set the file executable

chmod +x /path/to/passphrase-script

How to strip a key with OpenSSL

With OpenSSL you can actually remove the passphrase from the SSL key completely. This will avoid Apache asking you to enter the passphrase every time it is started. To do this go to the command line and type

/path/to/openssl rsa -in /path/to/originalkeywithpass.key -out /path/to/newkeywithnopass.key

with the file names and paths appropriate for your environment.

Inverting direction of mouse scroll wheel

Is there a way to make a mouse scroll wheel invert its direction? I’d like to scroll upwards and have that action scroll downwards and vice-versa. There is no setting on the Mouse control panel that makes this possible.

Any pointers to a hack or a particular mouse model that has such a setting would be appreciated. I am using Windows 7.

Here is the solution.

There is a registry setting named FlipFlopWheel that does this!

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\HID\VID_???\VID_???\Device Parameters.

There might be multiple mouse entries. The default value for FlipFlopWheel should already be 0. Change it to 1 to invert scrolling. Reboot or replug mouse for changes to take effect.

To get the VID_??? number you have two options:

  1. Go to the mouse control panel, click the Hardware tab, then click Properties.
    Now in the HID-compliant mouse Properties window click the Details tab and select the Device Instance Path property. The registry path is in there. You only have to unplug and plug back in your mouse for this to take effect.
  2. Run this in PowerShell (from Start » All Programs » Accessories » Windows PowerShell):
    # View registry settings
    Get-ItemProperty HKLM:\SYSTEM\CurrentControlSet\Enum\HID\*\*\Device` Parameters FlipFlopWheel -EA 0
    # Change registry settings
    # Reverse mouse wheel scroll FlipFlopWheel = 1 
    # Normal mouse wheel scroll FlipFlopWheel = 0 
    Get-ItemProperty HKLM:\SYSTEM\CurrentControlSet\Enum\HID\*\*\Device` Parameters FlipFlopWheel -EA 0 | ForEach-Object { Set-ItemProperty $_.PSPath FlipFlopWheel 1 }

    The command for normal (non-inverted) scrolling has the 0 and 1 swapped:

    # Restore default scroll direction
    Get-ItemProperty HKLM:\SYSTEM\CurrentControlSet\Enum\HID\*\*\Device` Parameters FlipFlopWheel -EA 1 | ForEach-Object { Set-ItemProperty $_.PSPath FlipFlopWheel 0 }

You should get your direction of mouse scroll wheel in your preferable direction now 🙂

[Solved] Instance Status Checks – Failed – AWS EC2 Ubuntu Redhat

1) Stop the Instance (Problem Instance)
2) Detach the Volume (Problem Volume)
3) Fire up another Instance (New Instance)
4) Attach the Problem Volume to the New Instance
5) Start the New Instance
6) Mount the Problem Volume to /ebs
sudo mount /dev/xvdf1 /ebs -t ext4
7) Edit /ebs/etc/fstab
8) Unmount the Problem Volume
sudo umount /ebs
9) Detach the Problem Volume from the New Instance
10) Stop the New Instance
11) Detach the Problem Volume from the New Instance
12) Attach the Problem Volume back to the Problem Instance
Device Name: /dev/sda1
13) Start the Problem Instance

Hope you have your instance rebooted 🙂