Posted in PHP

Terminal CheatSheet

Basic Commands

sudo      Run command as a superuser provision

sudo -s   Login as a superuser

clear     Clears the screen

cal       Shows calendar

date      Shows date & time

exit      Exit from the terminal

man [command] Command manual

whatis [command]  One line description of command

where [command]   shows the command bin path

[command] -h      Help section of the command

Continue reading “Terminal CheatSheet”

Basic Commands

sudo      Run command as a superuser provision

sudo -s   Login as a superuser

clear     Clears the screen

cal       Shows calendar

date      Shows date & time

exit      Exit from the terminal

man [command] Command manual

whatis [command]  One line description of command

where [command]   shows the command bin path

[command] -h      Help section of the command

Continue reading “Terminal CheatSheet”

Posted in SSH

SSH Key config to PUTTY with Pageant

In this tutorial we are going to see how to configure SSH key to PUTTY for direct login to cloud server using public key authentication instead of password.

 

Why should we do this?

SSH key provide more secure way of logging instead of password. While a password can eventually be cracked with a brute-force attack, SSH keys are nearly impossible to decipher by brute force alone. With public key authentication, every computer has (i) a public and (ii) a private “key” (two mathematically-linked algorithms that are effectively impossible to crack).

You can use the same SSH key for multiple cloud server as they all saved with you public key and your private key file is saved on your computer. You can disable normal username/password login procedure, which mean only people with private/public key can access the server, which will be more secure.

  Continue reading “SSH Key config to PUTTY with Pageant”

Posted in Javascript

GULP

– Tools like Gulp are often referred to as “build tools” because they are tools for running the tasks for building a website.
– The two most popular build tools out there right now are Gulp and Grunt.
– Gulp configurations tend to be much shorter and simpler when compared with Grunt. Gulp also tends to run faster.

Continue reading “GULP”

Posted in PHP

PHP Magic Constants

PHP Magic Constants

PHP provides a large number of constants and some of them are termed as magic constants,
Magic constants are case sensitive, start and ends with undersquare (__) here we are disscussing eight magic constants as follows

__LINE__, __FILE__, __DIR__, __FUNCTION__, __CLASS__, __TRAIT__, __METHOD__, __NAMESPACE__

These magic functions will be more useful on the OOP development process lets understand magic constants in PHP
Continue reading “PHP Magic Constants”

Posted in PHP

Magic Methods in PHP

Magic Methods

Magic methods are PHP predefined functions, starting with two underscores (__), which executes in response to particular PHP events. That might sound slightly automagical but actually it’s pretty straightforward

__construct(), __destruct(), __call(), __callStatic(), __get(), __set(), __isset(), __unset(), __sleep(), __wakeup(), __toString(), __invoke(), __set_state(), __clone() and __debugInfo()

Let’s dig into magic methods deeply,
Continue reading “Magic Methods in PHP”