All posts by admin

How to increase your Wi-Fi connection speed


You have a slow Wi-Fi connection speed.

You want to increase your Wi-Fi connection speed.


Execute below command on Windows:

netsh wlan show interface
  • If your Signal is less than 20% then try to increase your Wi-Fi signal strength by moving your device closer to your Wi-Fi router.
  • If you cannot change your device and Wi-Fi router location then try connecting your Wi-Fi router to another Wi-Fi router (Wi-Fi extender) that acts as a new access point using LAN cable.
  • If you cannot use a LAN cable then try connecting your router to a Wi-Fi repeater that is closer to your device.
  • If your Radio type is 802.11n then try to upgrade both your device and router to support 802.11ac.
  • Try to upgrade your Wi-Fi router to support 5 GHz band.
  • Try to upgrade your Wi-Fi router to support MU-MIMO (which stands for Multi-User, Muliple Input, Multiple Output).
  • Compare Receive rate (Mbps) and Transmit rate (Mbps) before and after making a change.
  • Use Speedtest to compare your Wi-Fi connection speed before and after making a change.

How to add multiple IPs to an Amazon EC2 virtual machine


You have a Server 2008 R2 machine on Amazon EC2.

You want to secure multiple domains using different  SSL/TLS certificates.

Server 2008 R2 does not support Server Name Indication (SNI). Therefore you need to add multiple IPs to the machine to use different SSL/TLS certificates.

  1. Create an EC2 virtual machine.
  2. Create an EC2 network interface.
  3. Assign the network interface to the machine using the Attach feature in the Network Interfaces tab.
  4. Create multiple private IPs for the network interface using Manage IP Addresses feature.
  5. Allocate multiple elastic IPs in the Elastic IPs tab.
  6. Assign an elastic IP to a private IP of the network interface using the Associate Address feature in the Elastic IPs tab.
  7. Login Windows.
  8. View the network configuration using below command.
ipconfig /all

9. Manually configure the network adapter (Local Area Connection Network) using the information in the 8th step.

10. Add the private IPs in the 4th step to the machine in the Advanced TCP/IP Settings screen.

11. Restart the machine.

If you get any issue then try limit the number of private IPs of a network interface to 4 (including the default private IP)

How to move a WordPress instance from one server to another Linux server


You want to move a WordPress instance from one server to another to consolidate your websites to reduce cost.


Install and use below Duplicator plugin to achieve your goal.

User guide:

If everything goes well for you then congratulation!

Otherwise, please review below possible problems and corresponding solutions.

Problem 1:

You don’t have a website on the new server.

Solution 1:

1. Create a new virtual host in the /etc/httpd/conf/httpd.conf

<VirtualHost *:80>
DocumentRoot "/var/www/"

2. Set 775 permission for /var/www/

3. Restart httpd service

sudo systemctl restart httpd

Problem 2:

You are using Amazon Linux 2 server.

You are logged in as ec2-user.

You use WinSCP to upload files and edit configuration files.

You cannot modify /etc/httpd/conf/httpd.conf and /etc/php.ini.

Solution 2:

1 View permission settings for the file

ls -ld /etc/httpd/conf/httpd.conf

The result indicates that the file owner is root user and root group, not ec2-user.

2. View groups of a user

groups ec2-user

The result indicates that the ec2-user does not belong to root group.

3. Add a user to root group

sudo usermod -a -G root ec2-user

4. Grant Read-Write permission against a file to root group

sudo chmod g+rwx /etc/httpd/conf/httpd.conf
sudo chmod g+rwx /etc/php.ini

5. Logout and login to the server again.

Problem 3:

You are using Amazon Linux 2 server. The ZipArchive feature is missing.

Solution 3:

1. Execute below commands:

sudo amazon-linux-extras install php7.2
sudo yum install php-pear php-devel gcc libzip-devel zlib-devel
sudo pecl install zip-1.13.5 # we must specify a slightly older version due due to compatibility

2. Add “” to /etc/php.ini

3. Restart the server

sudo reboot

Problem 4:

You don’t have a WordPress database on the new Linux server.

Solution 4:

Execute below MySQL commands:

CREATE USER 'username'@'localhost' IDENTIFIED BY 'password';
CREATE DATABASE `wp_database`;
GRANT ALL PRIVILEGES ON `wp_database`.* TO "username"@"localhost";

Problem 5:

An database error occurs while restoring a website.

Solution 5:

1. Execute below commands to remove the website:

sudo chown -R ec2-user:apache /var/www/
sudo chmod 2775 /var/www/ && find /var/www/ -type d -exec sudo chmod 2775 {} \;
find /var/www/ -type f -exec sudo chmod 0664 {} \;
rm -r /var/www/

2. Upload the Duplicator files again, and restore the website again.

Problem 6:

No write access against /var/www/ is available for Duplicator.

Solution 6:

1. Execute below commands:

sudo chown -R ec2-user:apache /var/www/
sudo chmod 2775 /var/www/ && find /var/www/ -type d -exec sudo chmod 2775 {} \;
find /var/www/ -type f -exec sudo chmod 0664 {} \;

2. Run again.

How to connect and upload files to a remote machine using OpenVPN and SSH on macOS


You have a server inside a network. You are granted OpenVPN and SSH access to the server. You have a MacBook. You want to upload files to the server. You want to execute a process on the server (e.g. training a machine learning model).


  • Request a certificate and an Open VPN configuration file (an .ovpn file) from your network administrator.
  • Install Tunnelblick
  • Drag the Open VPN configuration file to the Tunnelblick Configurations tab.
  • Click the Connect button.
  • On macOS, open Terminal and execute below command
ssh root@ -p 7081

where is the machine IP and 7081 is the SSH port

How to completely uninstall Python on Mac OS?


You have an issue with a Python version (e.g. the 3.7 version) and want to install another version (e.g. the 3.6 version). In order to install a fresh version you need to uninstall the current version first.


Assume that the current version is 3.7. Replace 3.7 with another version that you installed.

Follow these 3 steps below.

1. Remove the third-party Python 3.7 framework

sudo rm -rf /Library/Frameworks/Python.framework/Versions/3.7

2. Remove the Python 3.7 applications directory

sudo rm -rf "/Applications/Python 3.7"

3. Remove the symbolic links, in /usr/local/bin, that point to this Python version. Ensure that the links exit using below command.

ls -l /usr/local/bin | grep '../Library/Frameworks/Python.framework/Versions/3.7'

and then run the following command to remove all the links:

cd /usr/local/bin/
ls -l /usr/local/bin | grep '../Library/Frameworks/Python.framework/Versions/3.7' | awk '{print $9}' | tr -d @ | xargs rm


Installing a new version:

  1. Download a version from, double click the file and follow the instructions.
  2. Verify installation: python3 –version
  3. Install Homebrew from
  4. Install virtualenv
  5. pip3 install virtualenv
    pip3 install virtualenvwrapper

5.  Create and activate a virtual environment

cd /Users/admin/Downloads/training_model/model 
python3 -m virtualenv /Users/admin/Downloads/training_model/model
source bin/activate

How to Fix the Dell Laptop “Hard Drive Not Installed” issue


Suddenly, when turning your Dell laptop on you get the error message “Hard drive Not installed” and cannot boot into Windows.

  1. Power your laptop and quickly press F2 key to enter BIOS.
  2. Expand System Configuration node.
  3. Click SATA Operation.
  4. Select AHCI option.
  5. Click Apply button.
  6. Click Exit button.
  7. If the problem still persists then restore BIOS settings to Default BIOS settings and try the procedure again.


Setting File Permissions for WordPress on IIS


  • You have a WordPress instance in Windows with IIS.
  • You upload a file. Its thumbnail is not shown in Media Library.
  • You change the file permission. Its thumbnail now is shown correctly in Media Library.
  • You upload another file and have to change the file permission manually again.
  • How can we make WordPress automatically set the correct permission for new uploaded files?


  1. Ensure that the the Identity of Application pool that the website is running under is ApplicationPoolIdentity.
  2. Execute below commands as Administrator
icacls "C:\inetpub\wwwroot\" /grant "IUSR":(OI)(CI)F /T
icacls "C:\inetpub\wwwroot\" /grant "IIS_IUSRS":(OI)(CI)F /T

3. Open IIS Manager, click on your website, click Authentication, click Anonymous Authentication (which should be the only one enabled), click Edit, select Application pool identity if it is not selected, click OK.

How to change a WordPress website’s domain name?
  • Open the wp-config.php file.
  • Add two lines to the file, right before /* That’s all, stop editing! Happy blogging. */:
  • Bulk edit the posts content if needed.

How to Count The Number of Source Lines of Code using Windows Command


  • You have a source code folder and want to know the number of source lines of code.


  1. Right click Start icon, click on Command Prompt (Admin) or Windows Powershell (Admin)
  2. Assume that the source code folder location is C:\Users\admin\Downloads\test, type below commands and press Enter
cd C:\Users\admin\Downloads\test

3. Assume that the source code file extension is .py, type below commands and press Enter

type *.py | Measure-Object -line


Windows Commands for Website Administrators


  • You have a web application the backup of which needs to be  created daily.
  • You have a web application the content of which needs to be replicated daily.
  • You have data folder the content of which needs to be augmented daily.


  • Copying from one folder contents to another folder:
robocopy E:\inetpub\wwwroot\ E:\inetpub\wwwroot\ /e

/e Copies subdirectories. This option includes empty directories.
  • Moving from one folder contents to another folder:
robocopy E:\inetpub\wwwroot\ E:\inetpub\wwwroot\ /move /e

/move Moves files and directories, and deletes them from the source after they are copied.
  • Granting Full permission to a user or group
icacls "E:\inetpub\wwwroot\\App_Data" /grant "IUSR":(OI)(CI)F /T

icacls "E:\inetpub\wwwroot\\App_Data" /grant "IIS_IUSRS":(OI)(CI)F /T

CI Container Inherit - This flag indicates that subordinate containers will inherit this ACE (access control entry).

OI Object Inherit - This flag indicates that subordinate files will inherit the ACE.

OI and CI only apply to new files and sub-folders).

F Full Control

/T Apply recursively to existing files and sub-folders.
  • Deleting and creating a folder
rmdir "E:\inetpub\wwwroot\\Temp\" /S /Q 
mkdir "E:\inetpub\wwwroot\\Temp\
  • Recurcively deleting all specific files in a folder and its sub-folders
cd C:\inetpub\wwwroot
del /s *.log
/s delete all the files in the sub-folders.

del /s /f /q *.*
/f force deletion of read-only files.
/q do not ask to confirm when deleting via wildcard.
  • Removing a drive letter from a volume
mountvol F: /D
/D remove the drive letter from the selected volume.
  • Copy (mirror) entire data from one drive to another, including file and folder permissions.
robocopy E:\ G:\ /MIR /COPYALL /ZB /W:1 /R:2 /XO 


robocopy E:\ G:\ /TEE /LOG+:F:\robolog.txt /MIR /COPYALL /ZB /W:1 /R:2 /XO

E:\ - Source folder. This can be a UNC path.
G:\ - Destination folder. This can be a UNC path.

/TEE - Display the output of the command in the console window and write it to a log file.

/LOG+:F:\robolog.txt - Write the logs to F:\robolog.txt. The + sign means appending the content to the log file.

/MIR - Copy all files and subfolders, remove files and folders from the destination if they no longer exist on the source.

/COPYALL - Copy all of the NTFS permissions and attributes (security permissions, timestamps, owner info, etc.)

/ZB - Use restartable mode when copying files. If a file is in use, retry after a set amount of time (see /W:1 and /R:2). If access is denied then try to copy in backup mode.

/W:1 - Wait for 1 second between retries when copying files.

/R:2 - The number of retries on failed copies.

/XO - eXclude Older files/folders if the destination file or folder exists and has the same date.
If destination file exists and is the same date or newer than the source - don't bother to overwrite it.
  • Augment data (make an incremental backup) from one drive to another, including file and folder permissions.
robocopy E:\ G:\ /E /COPYALL /ZB /W:1 /R:2 /XO /XX


robocopy E:\ G:\ /TEE /LOG+:F:\robolog2.txt /E /COPYALL /ZB /W:1 /R:2 /XO /XX

/E - Copy Subfolders, including Empty Subfolders.
/XX - eXclude "eXtra" files and dirs (present in destination but not source). This will prevent any deletions from the destination.

Topic 20 – Introduction to Applied Machine Learning

Why do I need to learn about applied machine learning?

Machine learning has solved many important difficult problems recently. A few of them are speech recognition, speech synthesis, image recognition, autonomous driving and chat bots.
Nowadays a key skill of software developer is the ability to use machine learning algorithms solve real-world problems.

What can I do after finishing learning about applied machine learning ?

You will be to create software that could recognize speech, recognize a face, translate text to speech, translate a sentence from English to French, answer a customer's question.

That sounds useful! What should I do now?

Please attend this free "Machine Learning (Coursera)" course and audit this "Applied Machine Learning in Python (Coursera)" course first.
At the same time, please read
- this "Aurelien Geron (2017). Hands-On Machine Learning with Scikit Learn and TensorFlow. O’Reilly Media" book and
- this "Brett Lantz (2015). Machine Learning With R. 2nd Edition. Packt Publishing" book.

After that please audit these "Deep Learning Specialization" courses.
At the same time, please read
- this "Francois Chollet (2018). Deep Learning with Python. Manning Publications" book and
- this "Michael Nielsen (2015). Neural Networks and Deep Learning. Determination Press" book.

After that please read this "Christopher M. Bishop (2006). Pattern Recognition and Machine Learning. Springer" book.
After finishing reading these books please click Topic 21 - Introduction to Applied Computer Vision and Natural Language Processing to continue.