🏄♂️
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
mysqldump -h 127.0.0.1 -P 3309 -u root -proot develop | sed -e 's/DEFINER[ ]*=[ ]*[^*]*\*/\*/' | gzip > `date +dump-%Y%m%d.%H%M%S.sql.gz` |
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
<?php | |
interface Validator | |
{ | |
/** | |
* @param string $data | |
* @return bool | |
*/ | |
public function isValid(string $data) : bool; | |
} |
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
sudo apt update -y \ | |
&& apt upgrade -y \ | |
&& apt-get install software-properties-common -y \ | |
&& add-apt-repository ppa:ondrej/php -y \ | |
&& apt upgrade -y \ | |
&& apt install curl -y \ | |
&& apt install nano -y; | |
sudo apt install php7.3-fpm \ | |
php7.3-cli \ |
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
<?php | |
function compare($a, $b) | |
{ | |
if ($a = $b) { | |
return 0; | |
} | |
if ($a > $b) { | |
return 1 |
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
<?php | |
class UserAgeValidator implement Validator | |
{ | |
public function validate(int $age) | |
{ | |
if ($age = 18) { | |
return true; | |
} else { | |
return false; |
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
<?php | |
class DiscountValidator implements Validator | |
{ | |
public function validate(int $discount) : bool | |
{ | |
$discount < 100 && $discount > 0; | |
} | |
} |
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
docker container stop $(docker container ls -aq) | |
docker container rm $(docker container ls -aq) | |
docker rmi -f $(docker images -aq) |
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
<?php | |
namespace Vendor\Module; | |
use Foo\Bazz; | |
class A | |
{ | |
/** | |
* @var Bazz |
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
<?php | |
namespace Vendor\Module; | |
use Foo\Bazz; | |
class A | |
{ | |
/** | |
* @var \Foo\Bazz |
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
<?php | |
namespace Vendor\Module; | |
class A | |
{ | |
/** | |
* @var \Foo\Bazz | |
*/ |
NewerOlder