This file contains 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
git init | |
git add . | |
git commit -m "First commit" |
This file contains 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
echo "<?php \n echo 'Hello World';" > index.php |
This file contains 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
mkdir my_project && cd my_project |
This file contains 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
provider "aws" { | |
region = "ap-southeast-1" | |
} | |
resource "aws_instance" "poc" { | |
ami = "ami-0123b531fc646552f" | |
instance_type = "t2.micro" | |
} |
This file contains 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
provider "aws" { | |
region = "ap-southeast-1" | |
} | |
resource "aws_instance" "poc" { | |
ami = "ami-0123b531fc646552f" | |
instance_type = "t2.micro" | |
tags = { | |
Name = "poc" | |
} |
This file contains 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
provider "aws" { | |
region = "ap-southeast-1" | |
} | |
resource "aws_security_group" "instance" { | |
name = "poc-instance" | |
ingress { | |
from_port = 8080 | |
to_port = 8080 |
This file contains 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 | |
$kernel = new Kernel($_SERVER['APP_ENV'], (bool) $_SERVER['APP_DEBUG']); | |
$request = Request::createFromGlobals(); | |
$response = $kernel->handle($request); | |
$response->send(); |
This file contains 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 | |
public function handle(Request $request, int $type = HttpKernelInterface::MASTER_REQUEST, bool $catch = true) | |
{ | |
try { | |
return $this->handleRaw($request, $type); | |
} catch (\Exception $e) { | |
return $this->handleThrowable($e, $request, $type); | |
} | |
} |
This file contains 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 | |
//vendor/symfony/http-kernel/EventListener/RouterListener.php | |
public function onKernelRequest(RequestEvent $event) | |
{ | |
$request = $event->getRequest(); | |
// add attributes based on the request (routing) | |
try { | |
$parameters = $this->matcher->matchRequest($request); | |
$request->attributes->add($parameters); | |
unset($parameters['_route'], $parameters['_controller']); |
This file contains 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 HomeController extends AbstractController | |
{ | |
/** | |
* @Route("/", name="home") | |
*/ | |
public function index() | |
{ | |
return $this->render('home/index.html.twig', [ | |
'controller_name' => 'HomeController', |
OlderNewer