cat /etc/redhat-release
Thursday, April 4, 2024
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:
- Go to your Google Drive in your browser.
- Right-click (or control-click) the file you want to download and click “Get shareable link”. The link looks like this:
https://drive.google.com/open?id=XXXXX
. Make note of the file ID “XXXXX”; you will be needing it below.
Get an OAuth token:
- Go to OAuth 2.0 Playground
- In the “Select the Scope” box, scroll down, expand “Drive API v3”, and select
https://www.googleapis.com/auth/drive.readonly
- 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.
- curl -H "Authorization: Bearer YYYYY" https://www.googleapis.com/drive/v3/files/XXXXX?alt=media -o ZZZZZ
If using Windows, open the “PowerShell” program and enter the following command.
- Invoke-RestMethod -Uri https://www.googleapis.com/drive/v3/files/XXXXX?alt=media -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.
Tuesday, April 2, 2024
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
Sunday, March 10, 2024
Rebuild BCD in Windows using CMD
- Boot your computer into Advanced Recovery Mode
- Launch Command Prompt available under Advanced Options.
- To rebuild the BCD or Boot Configuration Data file use the command – bootrec /rebuildbcd
- It will scan for other operating systems and let you select the OS’s you want to add to BCD
bcdboot c:\windows /s c:
Friday, February 16, 2024
Increment the cell in Vlookup when dragging horizontally in Excel
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('https://getcomposer.org/installer', 'composer-setup.php');"
HASH="$(wget -q -O - https://composer.github.io/installer.sig)"
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
composer
How to get Ranking of the Students in Excel using RANK Function
=RANK(number,ref,[order]) To rank in descending order, we will use the formula =RANK(B2,($C$5:$C$10),0) If we want unique ranks, we can use...
-
Put the following code in a TXT file and save as "file.cmd" then run the cmd file as administrator. @echo off title Activate Micr...
-
We can install PowerMTA on the server. rpm -ivh /home/PowerMTA-4.0r6.x86_64.rpm You will see the output like this Preparing... #############...
-
# $Id: config 2015-03-24 16:00:00 Jack $ # Sample PowerMTA configuration file # PowerMTA Multiple Virtual PMTA config file sample # # E-mai...