=CHAR(RANDBETWEEN(65,90))&CHAR(RANDBETWEEN(65,90))&RANDBETWEEN(100,10000)&CHAR(RANDBETWEEN(65,90))
Wednesday, January 5, 2022
Friday, December 31, 2021
Git Configuration and Commit Command
Git Configuration :
git config --global user.email "you@example.com"
git config --global user.name "Your Name"
Commit comman for Mac:
Commit comman for Windows:
git add * or git add --all
git commit -m"first message"
git remote add origin "LINK"
git push -u origin master
Tuesday, December 28, 2021
Track from where method is being called in codeigniter
For example, suppose your function name is test, use below code
Code:
function test( )
{
$backtrace = debug_backtrace();
print_r( $backtrace );
}
It will print the details from where the test method is being called.
How to Allow WebP Upload in WordPress using Function
//enable upload for webp image files.
function webp_upload_mimes($existing_mimes) {
$existing_mimes['webp'] = 'image/webp';
return $existing_mimes;
}
add_filter('mime_types', 'webp_upload_mimes');
//enable preview / thumbnail for webp image files.
function webp_is_displayable($result, $path) {
if ($result === false) {
$displayable_image_types = array( IMAGETYPE_WEBP );
$info = @getimagesize( $path );
if (empty($info)) {
$result = false;
} elseif (!in_array($info[2], $displayable_image_types)) {
$result = false;
} else {
$result = true;
}
}
return $result;
}
add_filter('file_is_displayable_image', 'webp_is_displayable', 10, 2);
function webp_upload_mimes($existing_mimes) { $existing_mimes['webp'] = 'image/webp'; return $existing_mimes; } add_filter('mime_types', 'webp_upload_mimes'); //enable preview / thumbnail for webp image files. function webp_is_displayable($result, $path) { if ($result === false) { $displayable_image_types = array( IMAGETYPE_WEBP ); $info = @getimagesize( $path ); if (empty($info)) { $result = false; } elseif (!in_array($info[2], $displayable_image_types)) { $result = false; } else { $result = true; } } return $result; } add_filter('file_is_displayable_image', 'webp_is_displayable', 10, 2);
Tuesday, November 23, 2021
How to use Siteground SSH in MacOS terminal
Wednesday, November 17, 2021
How to install Composer in MacOS
curl -sS https://getcomposer.org/installer | php
After the command, you will have composer.phar file in the current directory and the composer command is available as:
php composer.phar [composer commnad]
sudo mv composer.phar /usr/local/bin/
sudo chmod 755 /usr/local/bin/composer.phar
nano ~/.bash_profile
alias composer="php /usr/local/bin/composer.phar"and then run this command:
source ~/.bash_profile
Install PhpStorm on Mac OSX
- App name: PhpStorm
- App description: phpstorm (App: PhpStorm.app)
- App website: http://www.jetbrains.com/phpstorm/
- Press Command+Space and type Terminal and press enter/return key.
- Run in Terminal app:
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" 2> /dev/null
and press enter/return key. If you are prompted to enter your Mac's user password, enter it (when you type it, you wont see it on your screen/terminal.app but it would accept the input; this is to ensure no one can see your password on your screen while you type it. So just type password and press enter, even if you dont see it on your screen). Then wait for the command to finish. - Run:
brew install phpstorm
Done!
You can now use PhpStorm.
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...