Skip to content

Instantly share code, notes, and snippets.

View makomweb's full-sized avatar
🌀

Martin Komischke makomweb

🌀
View GitHub Profile
@makomweb
makomweb / docker.sh
Last active October 10, 2023 15:31
Remove docker images / containers
# Remove Image
docker rmi <imageId/Name>
# Force remove image
docker rmi -f <imageId/Name>
# Remove dangling images
docker image prune
# Remove all images
@makomweb
makomweb / reflection-test.php
Last active November 30, 2023 12:04
Reflecting a PHP class and it's attributes (traverse properties and attributes)
<?php
declare(strict_types=1);
namespace App\Tests\Unit\Playground;
use Attribute;
use PHPUnit\Framework\TestCase;
use ReflectionAttribute;
use ReflectionClass;
@makomweb
makomweb / Dockerfile
Created March 25, 2024 12:29
Docker multi stage file for npm + webserver
# 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/