Skip to content

Instantly share code, notes, and snippets.

View mpdude's full-sized avatar
💭
Coding

Matthias Pigulla mpdude

💭
Coding
View GitHub Profile
@mpdude
mpdude / Briefing.md
Created November 17, 2025 10:03
Copilot Briefing zur Aktualisierung von Paketen auf PHP 8.4 und Symfony 6.4 sowie 7.x

Ziel

Repositorien so anpassen, dass sie Symfony 6.4 und 7.x offiziell unterstützen und in CI darauf getestet werden. Außerdem PHP-Obergrenze entfernen (z. B. ">=8.1" statt ">=8.1, <8.4") damit PHP 8.4 erlaubt ist. CI um PHP 8.4 erweitern und die Testmatrix anpassen (u. a. minimal/lowest- und stabile Läufe).

Schritt für Schritt

  1. Ersetze in composer.json alls Abhängigkeiten für symfony/-Pakete, die im Moment auf ^5.x, ^6.x, ^7.x oder ähnliches zielen, konsistent auf "^6.4|^7.0". Es gibt einige symfony/-Pakete, die eine andere Versionsnummerierung verwenden und aktuell Versionen 1.x, 2.x, 3.x oder Mischungen davon erlauben. Diese Pakete dürfen nicht verändert werden.
@mpdude
mpdude / fix-php-cs.yml
Last active November 21, 2025 18:49
Run PHP-CS-Fixer on PRs and commit/push back changes
# Update this by running
# curl https://gist.githubusercontent.com/mpdude/804005e2bc7717bc36e4def876a5303d/raw/fix-php-cs.yml > .github/workflows/fix-cs-php.yml
name: Coding Standards
on:
push:
branches:
- master
pull_request:
@mpdude
mpdude / README.md
Created January 18, 2022 20:52
Use `jq` to tweak `composer.json` requirements

Change Symfony requirements in composer.json

This took me two hours on stackoverflow.com, so I'm going to document it to future me:

In the composer.json require section, for all packages starting with symfony/, but not for symfony/monolog-bundle, change the required version to the value of the $VERSION environment variable.

Write out the updated composer.json file in a way that works _without sponge`, which is not installed on GitHub Action runners by default.

-----BEGIN PGP PUBLIC KEY BLOCK-----
mDMEYLvsoRYJKwYBBAHaRw8BAQdAfGlCQI9xzi6s/JSfkcE19grdeW3Xf/hIUv1T
Czfgo+G0I01hdHRoaWFzIFBpZ3VsbGEgPG1wQHdlYmZhY3RvcnkuZGU+iI4EExYK
ADYCGwEECwkIBwQVCgkIBRYCAwEAAh4BAheAFiEEhU82pmfobc+YBhNGhc7z7F2f
JHwFAmC/A1UACgkQhc7z7F2fJHxfywD+KimyGRa5Fv4NyS+eXRE+5xIy0q+SeMkQ
djU36a1jVfIA/RNkseAmUe3BB9xavrBklwxetynXtjUZsIzmwaxyFyUAuDMEYLvt
jhYJKwYBBAHaRw8BAQdAPeAqSij5tu/5ol3zmeFCU98g5U3LCAqPIfVsstH7g6aI
7wQYFgoAIAIbAhYhBIVPNqZn6G3PmAYTRoXO8+xdnyR8BQJgvwNiAIF2IAQZFgoA
HRYhBIW5u5oK9SUa2Pft5wdiXbCBXWyhBQJgu+2OAAoJEAdiXbCBXWyh43cBAKyp
@mpdude
mpdude / ssh-deploy-key-wrapper.sh
Last active January 14, 2025 04:29
Wrapper around `ssh` to pick the right one from several GitHub deploy keys
#!/bin/bash
# The last argument is the command to be executed on the remote end, which is something
# like "git-upload-pack 'webfactory/ssh-agent.git'". We need the repo path only, so we
# loop over this last argument to get the last part of if.
for last in ${!#}; do :; done
# Don't use "exec" to run "ssh" below; then the trap won't work.
key_file=$(mktemp -u)
trap "rm -f $key_file" EXIT
@mpdude
mpdude / projekt-img.sh
Last active May 12, 2020 13:29 — forked from scottsb/casesafe.sh
Create and manage a case-sensitive disk-image on macOS (OS X).
#!/bin/bash -e
# ---------------------------------------------------------
# Customizable Settings
# ---------------------------------------------------------
MOUNT_POINT="${CASE_SAFE_MOUNT_POINT:-${HOME}/Projekte}"
VOLUME_PATH="${CASE_SAFE_VOLUME_PATH:-${HOME}/.Projekte.sparsebundle}"
VOLUME_NAME="${CASE_SAFE_VOLUME_NAME:-Projekte}"
VOLUME_SIZE="${CASE_SAFE_VOLUME_SIZE:-200g}"
@mpdude
mpdude / fix-cs-php.yml
Last active August 27, 2024 07:31
GitHub Actions workflow to run PHP-CS-Fixer and push changes back to the branch
# Update this by running
# curl https://gist.github.com/mpdude/ca93a185bcbf56eb7e341632ad4f8263/raw/fix-cs-php.yml > .github/workflows/fix-cs-php.yml
on:
push:
branches:
- master
pull_request:
name: Coding Standards
@mpdude
mpdude / AWS-permissions.json
Created January 15, 2020 21:42
Build a Docker Image on GitHub Actions and push to AWS ECR
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "VisualEditor0",
"Effect": "Allow",
"Action": [
"ecr:GetDownloadUrlForLayer",
"ecr:BatchGetImage",
"ecr:CompleteLayerUpload",
@mpdude
mpdude / build.yml
Last active January 15, 2020 16:57
Build Docker image and push it to GPR
on:
push:
branches:
- master
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
@mpdude
mpdude / whiteboardCleaner.md
Created December 22, 2019 13:39 — forked from Ocramius/whiteboardCleaner.md
Whiteboard Picture Cleaner - Shell one-liner/script to clean up and beautify photos of whiteboards!

Description

This simple script will take a picture of a whiteboard and use parts of the ImageMagick library with sane defaults to clean it up tremendously.

The script is here:

#!/bin/bash
convert "$1" -morphology Convolve DoG:15,100,0 -negate -normalize -blur 0x1 -channel RBG -level 60%,91%,0.1 "$2"

Results