This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Validating a date from format yyyy-mm-dd | |
$date = DateTime::createFromFormat('Y-m-d', $generatedFrom); | |
if (!($date instanceof DateTime)) { | |
throw new ValidationError('Not valid start date'); | |
} | |
Similarly other formats can be validated. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ssh -C2qTnN -D 8080 [email protected] (xxx.xxx.xxx.xxx is the ip which allows ssh access) (can change the port from 8080 to as per requirement) | |
You are connected to the proxy. To use the proxy, go the one of your browser | |
and change the proxy settings to use SOCKS protocol and localhost (127.0.0.1) with port 8080. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
There are times when you need to keep the date and time of your system to be correct. | |
Ntpdate in linux helps you do the same | |
sudo ntpdate -u ntp.ubuntu.org | |
ntpdate are installed on most distributions, if not install using apt-get. |
NewerOlder