$ puttygen key.ppk -O private-openssh -o key.pem
Sunday, December 4, 2022
Convert a putty .ppk key to an Amazon .pem file on Mac
$ puttygen key.ppk -O private-openssh -o key.pem
Migrate Linux server to AWS EC2
wget -O ./aws-replication-installer-init.py https://aws-application-migration-service-us-west-2.s3.us-west-2.amazonaws.com/latest/linux/aws-replication-installer-init.py
sudo python3 aws-replication-installer-init.py --region us-west-2
Saturday, December 3, 2022
Reinstall MySQL in virtualmin
sudo apt purge mysql-server mysql-client mysql-common
sudo apt autoremove
Then goto webmin dashboard>Server>MySQL Database Server>Install
PHP Laravel Artisan commands
php artisan config:clear
php artisan view:clear
php artisan event:clear
php artisan cache:clear
php artisan optimize:clear
Saturday, November 26, 2022
How to change the default filename when using mPDF
$payStub=new mPDF();
$payStub->SetTitle('My title');
$payStub->WriteHTML($pcTableRows);
$payStub->Output('yourFileName.pdf', 'I');
- 'D': download the PDF file
- 'I': serves in-line to the browser
- 'S': returns the PDF document as a string
- 'F': save as file $file_out
Thursday, November 24, 2022
Auto deployment from github to server using FTP
Step-1: Login the github the go to the project and click on setteings and add FTP Password under Security->Secrets. Then click New repository secret and name
Step - 2:Click Actions menu of repository and create the yml file as follows:
Click on Create a new worklow> set up a workflow yourself
.github/workflows/main.ymlon: push
name: 🚀 Deploy website on push
jobs:
web-deploy:
name: 🎉 Deploy
runs-on: ubuntu-latest
steps:
- name: 🚚 Get latest code
uses: actions/checkout@v2
- name: 📂 Sync files
uses: SamKirkland/FTP-Deploy-Action@4.3.2
with:
server: ourdomain.com/IP
username: username@yourdomain.com //or IP
password: ${{ secrets.FTP_PASSWORD }}
# server-dir: /home/dfaserghx/public_html/
How to delete all commit history in GitHub & repush to main?
Create a new Branch:
git checkout --orphan latest_branch
Add your all the files:
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...