Wednesday, April 3, 2024

Download Large File from Google Drive using API

 Here are step-by-step instructions to download a file from Google Drive using the command line API if the file is shared privately and needs authentication.

Get the file ID:

  1. Go to your Google Drive in your browser.
  2. Right-click (or control-click) the file you want to download and click “Get shareable link”. The link looks like this: Make note of the file ID “XXXXX”; you will be needing it below.

Get an OAuth token:

  1. Go to OAuth 2.0 Playground
  2. In the “Select the Scope” box, scroll down, expand “Drive API v3”, and select
  3. Click “Authorize APIs” and then “Exchange authorization code for tokens”. Copy the “Access token”; you will be needing it below.

Download the file from the command line:

If using OS X or Linux, open the “Terminal” program and enter the following command.

  1. curl -H "Authorization: Bearer YYYYY" -o ZZZZZ 

If using Windows, open the “PowerShell” program and enter the following command.

  1. Invoke-RestMethod -Uri -Method Get -Headers @{"Authorization"="Bearer YYYYY"} -OutFile ZZZZZ 

In your command, replace “XXXXX” with the file ID from above, “YYYYY” with the access token from above, and “ZZZZZ” with the file name that will be saved (for example, “myFile.mp4” if you’re downloading an mp4 file).

Press Enter and let the download begin.

Wednesday, March 13, 2024

WordPress website Migration & Restore using All-In-One-WP-Migration

Copy cPanel to cPanel internal server Migration

cp /home/Source-cPanel-username/public_html/wp-content/ai1wm-backups/your-backup-file-name.wpress /home/Target-cPanel-username/public_html/wp-content/ai1wm-backups

 Copy cPanel to cPanel Different server Migration

1. cd /home/Target-cPanel-username/public_html/wp-content/ai1wm-backups

2. wget use-source-url-https-link

All in One WP Migration Download

Sunday, March 10, 2024

Rebuild BCD in Windows using CMD

  1. Boot your computer into Advanced Recovery Mode
  2. Launch Command Prompt available under Advanced Options.
  3. To rebuild the BCD or Boot Configuration Data file use the command – bootrec /rebuildbcd
  4. It will scan for other operating systems and let you select the OS’s you want to add to BCD

To set boot record manually:

bcdboot c:\windows /s c:

Friday, February 16, 2024

Increment the cell in Vlookup when dragging horizontally in Excel

Excel VLOOKUP with Dynamic Column Reference:




Monday, January 22, 2024

How to Install and Use PHP Composer on CentOS 7

 sudo yum install php-cli php-zip wget unzip

php -r "copy('', 'composer-setup.php');"

HASH="$(wget -q -O -"

php -r "if (hash_file('SHA384', 'composer-setup.php') === '$HASH') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;"

sudo php composer-setup.php --install-dir=/usr/local/bin --filename=composer


Wednesday, November 22, 2023

The file GeoLite2-Country.mmdb does not exist or is not readable laravel


From the command line run:

$ composer require torann/geoip


Once installed you need to register the service provider with the application. Open up config/app.php and find the providers key.

'providers' => [



This package also comes with an optional facade, which provides an easy way to call the the class. Open up config/app.php and find the aliases key.

'aliases' => [

    'GeoIP' => \Torann\GeoIP\Facades\GeoIP::class,


Publish the configurations

Run this on the command line from the root of your project:

php artisan vendor:publish --provider="Torann\GeoIP\GeoIPServiceProvider" --tag=config

A configuration file will be publish to config/geoip.php.


Quick breakdown of the two main options in the configuration file. To find out more simple open the config/geoip.php file.

Service Configuration

To simplify and keep things clean, all third party composer packages, that are needed for a service, are installed separately.

For further configuration options checkout the services page.

Caching Configuration

GeoIP uses Laravel's default caching to store queried IP locations. This is done to reduce the number of calls made to the selected service, as some of them are rate limited.


  • all all location are cached
  • some cache only the requesting user
  • none caching is completely disable

How to install SSL on CWP hostname?

1 - Check that you should have an A record for the hostname. For example if your server hostname is, then you should have a...