- Nx (Monorepo setup) https://nx.dev/
- NextJs https://nextjs.org/
- Stitches (CSS-in-js) https://stitches.dev/
- SWR (React Hooks for Data Fetching) https://swr.vercel.app/
- NestJs https://nestjs.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
<?php | |
$router = new Router(new Request); | |
$router->get('/', function() {}); |
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 | |
include_once 'IRequest.php'; | |
class Request implements IRequest | |
{ | |
function __construct() | |
{ | |
$this->bootstrapSelf(); | |
} |
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 Router | |
{ | |
private $request; | |
private $supportedHttpMethods = array( | |
"GET", | |
"POST" | |
); |
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 IRequest | |
{ | |
public function getBody(); | |
} |
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 Router | |
{ | |
private $request; | |
function __construct(IRequest $request) | |
{ | |
$this->request = $request; | |
} | |
} |
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 | |
include_once 'Request.php'; | |
include_once 'Router.php'; | |
$router = new Router(new Request); | |
$router->get('/', function() { | |
return <<<HTML | |
<h1>Hello world</h1> | |
HTML; |
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
const svg = document.querySelector('svg'); | |
const currentTime = new Date(); | |
svg.style.setProperty('--start-seconds', currentTime.getSeconds()); | |
svg.style.setProperty('--start-minutes', currentTime.getMinutes()); | |
svg.style.setProperty('--start-hours', currentTime.getHours() % 12); |
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
<g class="marks"> | |
<line x1="15" y1="0" x2="16" y2="0" /> | |
<line x1="15" y1="0" x2="16" y2="0" /> | |
<line x1="15" y1="0" x2="16" y2="0" /> | |
<line x1="15" y1="0" x2="16" y2="0" /> | |
<line x1="15" y1="0" x2="16" y2="0" /> | |
<line x1="15" y1="0" x2="16" y2="0" /> | |
<line x1="15" y1="0" x2="16" y2="0" /> | |
<line x1="15" y1="0" x2="16" y2="0" /> | |
<line x1="15" y1="0" x2="16" y2="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
.hour { | |
... | |
animation: rotateHourHand calc(12 * 60 * 60s) linear infinite; | |
animation-delay: calc(calc(var(--start-minutes) * -60 * 1s) + calc(var(--start-seconds) * -1 * 1s)); | |
} | |
@keyframes rotateHourHand { | |
from { | |
transform: translate(20px, 20px) rotate(calc(var(--start-hours) * 30deg)); | |
} | |
to { |
NewerOlder