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 Acme\Serializer\Normalizer; | |
use Doctrine\Common\Collections\ArrayCollection; | |
use Doctrine\Common\Collections\Collection; | |
use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; | |
use Symfony\Component\Serializer\Normalizer\NormalizerInterface; | |
use Symfony\Component\Serializer\Normalizer\SerializerAwareNormalizer; |
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 | |
//http://www.phptherightway.com/pages/Design-Patterns.html | |
class Automobile | |
{ | |
private $vehicleMake; | |
private $vehicleModel; | |
public function __construct($make, $model) | |
{ |
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
<!doctype html> | |
<html lang="vi"> | |
<head> | |
<meta charset="utf-8"> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
<title>Javascript Study - Closure</title> | |
</head> | |
<body> |
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 vi /etc/nginx/conf.d/example.conf | |
upstream php { | |
server unix:/var/run/php-fpm/php-fpm.sock; | |
server 127.0.0.1:9000; | |
} | |
server { | |
listen 80; | |
server_name example.com www.example.com; |
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
DELIMITER $$ | |
USE `fashino`$$ | |
DROP FUNCTION IF EXISTS `GeoCalDistanceByLatLon`$$ | |
CREATE DEFINER=`root`@`localhost` FUNCTION `GeoCalDistanceByLatLon`( TYPE ENUM('mi', 'km'), lat1 DECIMAL(10,7), lon1 DECIMAL(10,7), lat2 DECIMAL(10,7), lon2 DECIMAL(10,7) ) RETURNS DECIMAL(10,7) | |
BEGIN | |
RETURN IF(TYPE = 'km', 6371, 3959)*ACOS(SIN(lat1*PI()/180)*SIN(lat2*PI()/180)+COS(lat1*PI()/180)*COS(lat2*PI()/180)*COS((lon2*PI()/180)-(lon1*PI()/180))); | |
END$$ |
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
server { | |
listen 80; | |
#listen [::]:80; #Use this to enable IPv6 | |
server_name example.com www.example.com; | |
root /var/www/example.com/; | |
access_log /var/log/nginx/example-access.log; | |
error_log /var/log/nginx/example-error.log; | |
index index.php index.html; |
OlderNewer