Tuesday, August 3, 2021

How to generate SSH keys in Mac OS

To generate SSH keys in Mac OS X, follow these steps:

1. Enter the following command in the Terminal window.ssh-keygen -t rsa
This starts the key generation process. When you execute this command, the ssh-keygen utility prompts you to indicate where to store the key.

2. Press the ENTER key to accept the default location. The ssh-keygen utility prompts you for a passphrase.

3. Type in a passphrase. You can also hit the ENTER key to accept the default (no passphrase). However, this is not recommended.
Please note that you will need to enter the passphrase a second time to continue.

After you confirm the passphrase, the system generates the key pair.

Your identification has been saved in /Users/user/.ssh/id_rsa.

Your public key has been saved in /Users/user/.ssh/id_rsa.pub.

The key fingerprint is:

ae:89:72:0b:85:da:5a:f4:7c:1f:c2:43:fd:c6:44:38 user@mymac.local

The key's randomart image is:

+--[ RSA 2048]----+

|                 |

|         .       |

|        E .      |

|   .   . o       |

|  o . . S .      |

| + + o . +       |

|. + o = o +      |

| o...o * o       |

|.  oo.o .        |

+-----------------+

Your private key is saved to the id_rsa file in the .ssh directory and is used to verify the public key you use belongs to the same cloud server. It's important to never share your private key with anyone, it is equivalent of your password!

Your public key is saved to the id_rsa.pub file and it is the key you'll upload to our cloud service. You can save this key to the clipboard by running this:

pbcopy < ~/.ssh/id_rsa.pub

or

cat ~/.ssh/id_rsa.pub


Wednesday, June 2, 2021

Install imap extension on PHP 7.x or Higher in CentOS 8

yum update -y 

yum install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm 

yum install -y https://rpms.remirepo.net/enterprise/remi-release-7.rpm 

yum install -y php80-php-imap 

cp /opt/remi/php80/root/usr/lib64/php/modules/imap.so /usr/lib64/php/modules/ /bin/echo 'extension="imap.so"' > /etc/php.d/40-imap.ini 

systemctl restart php-fpm

Tuesday, June 1, 2021

Install PHP-mbstring on CentOS 8 for PHP 7.4



dnf install php-mbstring

dnf install https://rpms.remirepo.net/enterprise/remi-release-8.rpm

dnf install php74-php-mbstring

Set Default PHP version in CentOS 8



sudo yum update

sudo reboot

sudo yum search php-

sudo yum module list php

sudo yum install yum-utils http://rpms.remirepo.net/enterprise/remi-release-8.rpm

sudo yum module list php
sudo yum module reset php
sudo yum module enable php:remi-7.4
## verify it php set to 7.4 ##
sudo yum module list php




sudo yum install php php-fpm




sudo yum install php-fpm php-common php-cli




php -v
php --version




sudo systemctl enable php-fpm.service




sudo systemctl start php-fpm.service
sudo systemctl status php-fpm.service

sudo systemctl stop php-fpm.service
sudo systemctl restart php-fpm.service

cat /etc/nginx/conf.d/php-fpm.conf

ls -l /run/php-fpm/www.sock

cat /etc/nginx/default.d/php.conf

sudo systemctl restart nginx.service

php --version

sudo vi /usr/share/nginx/html/hello.php

curl -I http://localhost/hello.php
curl http://localhost/hello.php

Bkash Merchant QR Code on WHMCS invoice

At the line number 104 of invoicepdf.tpl

 # QR Payment Code

$qrFilename = 'QR_INVOICE.png';

if (file_exists(ROOTDIR . '/assets/img/QR_INVOICE.png')) {

    $qrFilename = 'QR_INVOICE.png';

} elseif (file_exists(ROOTDIR . '/assets/img/logo.jpg')) {

    $qrFilename = 'logo.jpg';

}

$pdf->Image(ROOTDIR . '/assets/img/' . $qrFilename, 120, 110, 75);


$pdf->Ln(10);

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...