How to clear your DNS cache on OSX 10.10.4 or above

MacOS® 10.10.4 and above
To clear your DNS cache if you use MacOS X version 10.10.4 or above, perform the following steps:

Click Applications.
Click Utilities.
Click Terminal.
Run the following command:

Or on Microsoft Windows version 7, 8, 10 type the following command to the command prompt:

 

[OSX] How to install ssh-askpass for OS X/macOS

You can install ssh-askpass using Homebrew, this method also works on the latest Mojave 10.14.5 version.

 

[PHP] How to return IP address of a host / domain

Here is a quick solution written in php that you can use to determine the current IP address of a given webhost/domain.

[Linux] Install WordPress on Ubuntu Server with add-on features as HTTPS support, SSL certificate and HTTP2 supports

Enable HTTPS supports:

Create a ssl-params.conf file and add the following definition below to it, then save it.

Next thing to do is create a backup of the original default-ssl.conf file.

Then modify it accordingly, we are deploying a wordpress site in this particular example we use the following adjustments.

Enable HTTP2 supports:

It is also recommended adding strong ciphers for Apache to increase SSL Security on the server.
Part of my Best Practices to deploy a secure webserver, virtual personal server or database serve is to add the recommended ciphers from Cipherli.st.

Install Oracle Java 12 on Ubuntu

You need to add the PPA. (Surce: “Linux Uprising” team)
Install:

For multiple java versions, install [or uninstall] oracle-java12-set-default package to set [or not] Java 12 as default.
Verify:

Remove it: … use the following command if you need to uninstall it:

How to Install Google Authenticator on Ubuntu Server

Install Google Authenticator:

Install qrencode:

youtube-dl arguments

Best Audio Quality for mp3 (with –ffmpeg-location):

Best Audio/Video Quality for mp4 (with –ffmpeg-location):

Login to WordPress or other accounts using python selenium package

The best way to install the selenium package is using the following command:

$ pip install selenium

or on macOS with Homebrew

$ brew install geckodriver

If you are using Anaconda just simply activate your virtual environment and then install geckodriver using the following command:

$ conda install -c conda-forge geckodriver

Then you’ll need a driver to interface with the browser you choose. I used Firefox in this example, therefore I downloaded the required geckodriver driver.
Drivers for other browser: selenium-python.readthedocs.io
You might need to set the PATH of your geckodriver.

This python source code will pull up a Firefox window and open the url that you need set https://yourwpdomain.com/wp-login.php, then find user_login and user_pass elements on the page (by the id) and finally send a click() function to the submitButton.
If everything goes well the next thing you should see is your WordPress dashboard page in the browser.

If you are using Windows you might need to set the geckodriver PATH with FirefoxDriver.

How to use wget without adding –no-check-certificate

You need to add a check_certificate = off line into your .wgetrc file in your Home directory.
Or simply run this command on your terminal.

After this wget will add this –no-check-certificate automatically from your .wgetrc file.