- whoami
- man
- clear
- pwd
- ls
- cd
- mkdir
- touch
- rmdir
- rm
- open
- mv
- cp
- head
- tail
- date
- cat
- less
- echo
- wc
- piping
- sort
- uniq
- expansions
- diff
- find
- grep
- du
- df
- history
- ps
- top
- kill
- killall
- gzip
- gunzip
- tar
- nano
- alias
- xargs
- ln
- who
- su
- sudo
- passwd
- chown
- chmod
Saturday, October 14, 2023
Common linux commands
Sunday, October 8, 2023
Thursday, October 5, 2023
Export multiple records one by one from Excel
Sub Print1()
For a = 1 To 10
Sheet3.Range("L2").Value = a
ActiveWindow.SelectedSheets.PrintOut copies:=1, collate:=True,
IgnorePrintAreas:=False
Next
End Sub
Export multiple records to PDF one by one from Excel
Sub ExportRangeToPDF()
For a = 3 To 10
Sheet1.Range("D4").Value = Sheet2.Cells(a, "A")
Sheet1.ExportAsFixedFormat Type:=xlTypePDF, Filename:="C:\Users\Naeem\OneDrive\Desktop\PrintingPDF\" & Sheet1.Range("D4").Value & ".pdf", Quality:=xlQualityStandard, IncludeDocProperties:=True, IgnorePrintAreas:=False, OpenAfterPublish:=False
Next
End Sub
Sunday, September 17, 2023
Find WHM/cPanel or linux failed email login log
Webmail Login attempt:
/usr/local/cpanel/logs/login_log
cp /usr/local/cpanel/logs/login_log /home/cpanel_unsername
chmod 644 /home/cpanel_unsername/ogin_log
POP3 login attempts:
/var/log/maillog
chmod 644 /home/cpanel_unsername/maillog
Wednesday, September 6, 2023
MariaDB Socket from Path XAMPP for VSCODE on MAC OS
Run the following command in terminal:
ps -ax|grep mysql
FInd the output like this:
--socket=/Applications/XAMPP/xamppfiles/var/mysql/mysql.sock --port=3306
Then use this path without quote in Socket path
"Applications/XAMPP/xamppfiles/var/mysql/mysql.sock"
Then click Save and connect. It will show the success message.
How to Configure Xdebug in Mac with XAMPP
To install with single command:
pecl install xdebug
Or Follow the instructions below:
https://xdebug.org/wizard
Installation Wizard
Summary
- Xdebug installed: no
- Server API: Apache 2.0 Handler
- Windows: no
- Zend Server: no
- PHP Version: 8.2.4
- Zend API nr: 420220829
- PHP API nr: 20220829
- Debug Build: no
- Thread Safe Build: no
- OPcache Loaded: no
- Configuration File Path: /Applications/XAMPP/xamppfiles/etc
- Configuration File: /Applications/XAMPP/xamppfiles/etc/php.ini
- Extensions directory: /Applications/XAMPP/xamppfiles/lib/php/extensions/no-debug-non-zts-20220829
Instructions
- Download xdebug-3.2.2.tgz
- Install the pre-requisites for compiling PHP extensions.
On your Mac, we only support installations with 'homebrew', andbrew install php && brew install autoconf
should pull in the right packages. - Unpack the downloaded file with
tar -xvzf xdebug-3.2.2.tgz
- Run:
cd xdebug-3.2.2
Run:
phpize
(See the FAQ if you don't havephpize
).As part of its output it should show:
Configuring for: ... Zend Module Api No: 20220829 Zend Extension Api No: 420220829
If it does not, you are using the wrong
phpize
. Please follow this FAQ entry and skip the next step.- Run:
./configure
- Run:
make
- Run:
cp modules/xdebug.so /Applications/XAMPP/xamppfiles/lib/php/extensions/no-debug-non-zts-20220829
- Update
/Applications/XAMPP/xamppfiles/etc/php.ini
and add the line:zend_extension = xdebug
- Restart the Apache Webserver
Enabling Features
Now Xdebug is installed, you can enable its features. Please refer to the dedicated sections in the documentation about information on how to enable and configure these Xdebug features. Where these sections refer to php.ini
or similar, please remember to use /Applications/XAMPP/xamppfiles/etc/php.ini
:
- Development Helpers — help you get better error messages and obtain better information from PHP's built-in functions.
- Step Debugging — allows you to interactively walk through your code to debug control flow and examine data structures.
- Profiling — allows you to find bottlenecks in your script and visualize those with an external tool.
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...