Skip to content

Instantly share code, notes, and snippets.

View cmuench's full-sized avatar

Christian Münch cmuench

View GitHub Profile
@cmuench
cmuench / commit.md
Created October 12, 2026 08:40
Commit slash command for OpenCode (place it in ~/.config/opencode/commands)
description Commit the changes to the repository

Commit the changes by using the Conventional Commit format for all commit messages. This helps keep the commit history readable and enables automated tools for changelogs and releases.

Commit all changes in logical chunks. For example, if you added a new feature and also fixed a bug, you should create two separate commits: one for the new feature and one for the bug fix. This makes it easier to understand the history of changes and to revert specific changes if needed.

Example commit messages

@cmuench
cmuench / ResponsiveConvertFieldContentCommand.php
Last active January 26, 2025 10:17
Statamic: Convert image field data to responsive field
<?php
namespace App\Console\Commands;
use Illuminate\Console\Command;
use Symfony\Component\Yaml\Yaml;
/**
* This command converts the content of a image field to a responsive image field
* in the markdown data of a collection.
❯ ddev debug test
Running bash [-c /tmp/test_ddev.sh]
OS Information: Linux balmung 5.15.58-2-lts #1 SMP Mon, 01 Aug 2022 19:44:08 +0000 x86_64 GNU/Linux
User information: uid=1000(cmuench) gid=985(users) Gruppen=985(users),33(http),108(vboxusers),150(wireshark),948(nordvpn),952(realtime),953(adbusers),969(docker),976(libvirt),986(video),988(storage),990(optical),995(audio),998(wheel)
DDEV version: ITEM VALUE
DDEV version v1.20.0
architecture amd64
db drud/ddev-dbserver-mariadb-10.4:v1.20.0
dba phpmyadmin:5
ddev-ssh-agent drud/ddev-ssh-agent:v1.20.0
@cmuench
cmuench / pr-33803-m244.patch
Last active October 21, 2022 11:59
Magento PR-33803 - compatible for Magento 2.4.4
--- a/vendor/magento/framework/App/DeploymentConfig.php 2022-03-08 00:52:02.000000000 +0100
+++ b/vendor/magento/framework/App/DeploymentConfig.php 2022-06-29 14:51:07.639221346 +0200
@@ -35,14 +35,14 @@
*
* @var array
*/
- private $data;
+ private $data = [];
/**
@cmuench
cmuench / _darwin.conf
Created April 4, 2022 23:40
Kitty Beispiel Konfiguration
# vim:fileencoding=utf-8:foldmethod=marker
# Create a new window splitting the space used by the existing one so that
# the two windows are placed one above the other
map super+alt+d launch --location=hsplit --cwd=current
# Create a new window splitting the space used by the existing one so that
# the two windows are placed side by side
map super+alt+r launch --location=vsplit --cwd=current
@cmuench
cmuench / ddev-debug-20220314.log
Created March 14, 2022 07:51
ddev-debug-20220314
Running bash [-c /tmp/test_ddev.sh]
OS Information: Linux balmung 5.15.27-1-lts #1 SMP Tue, 08 Mar 2022 19:57:55 +0000 x86_64 GNU/Linux
User information: uid=1000(cmuench) gid=985(users) Gruppen=985(users),33(http),108(vboxusers),150(wireshark),948(nordvpn),953(adbusers),969(docker),976(libvirt),986(video),988(storage),990(optical),995(audio),998(wheel)
DDEV version: ITEM VALUE
DDEV version v1.19.0
architecture amd64
db drud/ddev-dbserver-mariadb-10.3:v1.19.0
dba phpmyadmin:5
ddev-ssh-agent drud/ddev-ssh-agent:v1.19.0
docker 20.10.12
@cmuench
cmuench / magento.app.yaml
Last active February 4, 2021 11:20
n98-magerun2.phar in Magento Cloud
hooks:
# We run build hooks before your application has been packaged.
build: |
set -e \
&& echo "[!] Running composer install ..." \
&& composer -n --no-dev install \
&& curl -O https://files.magerun.net/n98-magerun2.phar \
&& mv n98-magerun2.phar bin/n98-magerun2 \
&& chmod +x bin/n98-magerun2 \
&& echo "alias mr2='~/bin/n98-magerun2'" >> ~/.bash_profile \
<?php
namespace N98\Magento\Command\Database;
use InvalidArgumentException;
use N98\Magento\Command\Database\Compressor\Compressor;
use N98\Util\Console\Enabler;
use N98\Util\Console\Helper\DatabaseHelper;
use N98\Util\Exec;
use N98\Util\VerifyOrDie;
@cmuench
cmuench / install_gd_arch.sh
Last active March 24, 2019 12:49
phpbrew install extension GD / Arch Linux
phpbrew ext install gd -- \
--with-gd=shared \
--with-webp-dir=/usr/include/webp \
--with-xpm-dir=/usr/lib \
--with-jpeg-dir=/usr/lib \
--with-png-dir=/usr/lib \
--with-freetype-dir=usr/include/freetype2/freetype
@cmuench
cmuench / magento.xml
Last active July 23, 2018 05:39
PHPStorm Live Templates for Magento 2 (copy xml content to clipboard and paste it in a template group)
<template name="magento2:__" value="&lt;?php echo __('$SELECTION$'); ?&gt;" description="Translation" toReformat="false" toShortenFQNames="true">
<context>
<option name="HTML" value="true" />
<option name="PHP" value="true" />
</context>
</template>
<template name="magento2:collection" value="class Collection extends AbstractCollection&#10;{&#10; /**&#10; * Initialize resource model&#10; *&#10; * @return void&#10; */&#10; protected function _construct()&#10; {&#10; $this-&gt;_init($model$::class, $resourceModel$::class);&#10; }&#10;}" toReformat="true" toShortenFQNames="true">
<variable name="model" expression="" defaultValue="" alwaysStopAt="true" />
<variable name="resourceModel" expression="" defaultValue="" alwaysStopAt="true" />
<context>