- Origin:
Topics
Topics
| # Docker multistage | |
| # 1. stage to run npm install | |
| # 2. stage to create a webserver image with the build artifact from stage 1 | |
| FROM node:latest as build-stage | |
| WORKDIR /app | |
| COPY ./ /app/ |
| <?php | |
| declare(strict_types=1); | |
| namespace App\Tests\Unit\Playground; | |
| use Attribute; | |
| use PHPUnit\Framework\TestCase; | |
| use ReflectionAttribute; | |
| use ReflectionClass; |
| # Remove Image | |
| docker rmi <imageId/Name> | |
| # Force remove image | |
| docker rmi -f <imageId/Name> | |
| # Remove dangling images | |
| docker image prune | |
| # Remove all images |
// HiddenMessage.tsx
import * as React from "react";
function HiddenMessage({children}) {
const [showMessage, setShowMessage] = React.useState(false)
return (
<div>
<label htmlFor="toggle">Show Message</label>
| import { useEffect, useState } from 'react'; | |
| import axios from 'axios'; | |
| type State<T> = { | |
| pending: boolean; | |
| error?: Error; | |
| data?: T; | |
| }; | |
| export function useGet<T>(url: string) { |
| <?php | |
| declare(strict_types=1); | |
| namespace App\Command; | |
| use Rx\Observable; | |
| use Rx\Scheduler; | |
| use Rx\Scheduler\ImmediateScheduler; | |
| use Symfony\Component\Console\Attribute\AsCommand; |
| <?php | |
| use React\EventLoop\Factory; | |
| use Rx\Observable; | |
| use Rx\Scheduler; | |
| use Rx\Scheduler\EventLoopScheduler; | |
| require_once __DIR__ . '/vendor/autoload.php'; | |
| $loop = Factory::create(); |