Skip to content

Instantly share code, notes, and snippets.

View ProxiBlue's full-sized avatar
🏠
Working from home

Lucas van Staden ProxiBlue

🏠
Working from home
View GitHub Profile
@henkvalk
henkvalk / magento-248-image-cache-map.php
Created August 31, 2026 19:22
FIX for Magento 2.4.8 images not showing after deploy. Rename every product image cache directory; Rename them instead of resizing the whole catalog
<?php
/**
* Renames the product image cache directories after the upgrade to Magento 2.4.8.
*
* Up to 2.4.7 the directory name was hashed with the installation's encryption key (an hmac over
* the parameter string); from 2.4.8 on it is a plain md5 over that same string. The files are
* identical, only the directory is named differently, so renaming saves resizing the whole
* catalogue.
*
* The parameters are built along the exact same path UrlBuilder uses, and the script verifies
@jakwinkler
jakwinkler / ghosts.sh
Created May 13, 2025 05:26
Remove Ghost Indexes From ElasticSuite - Magento Open Source
#!/bin/bash
ES_HOST="http://localhost:9200" # Replace with your ES host
INDEX_PATTERN="magento2_default_catalog_product_*"
# Get all aliases (used indexes) ===
echo "Fetching all aliases in use..."
USED_INDEXES=$(curl -s "$ES_HOST/_cat/aliases?h=index" | sort | uniq)
# Get all indexes matching the pattern ===
@michielgerritsen
michielgerritsen / instructions.md
Last active October 4, 2025 03:42
Find old Luma code so you can convert it to Hyvä Alpine.js code

Introduction

The goal of this script is to help you migrate you old Magento Luma code to Hyvä compliant code. Luma used to rely on Require.js to manage it's javascript components. Hyvä relies on Alpine.js for this. For a lot of modules there are already compatibility modules available. Custom code you have to convert yourself.

Usage

There are several ways to use this code:

  • Using Tampermonkey (Chrome) or Greasemonkey (Firefox). If you have that installed just click on "Raw" by the requirejs-finder.user.js file.
  • (Temporary) By injecting it into Magento's head. Open the admin and navigate to Content -> Design -> Click your theme -> HTML -> Head -> Add `` and place the code above between the two script tags.
@markshust
markshust / CLAUDE.md
Created March 15, 2025 11:05
Claude Code configuration for Magento

Magento 2 Dev Commands & Guidelines

Build & Installation

  • composer install - Install dependencies
  • bin/magento setup:install - Install Magento
  • bin/magento setup:upgrade - Update database schema
  • bin/magento setup:di:compile - Compile dependency injection
  • bin/magento setup:static-content:deploy - Deploy static assets

Testing

@peterjaap
peterjaap / .dbdiff
Created November 30, 2020 12:42
dbdiff config file for M2 - see https://github.com/DBDiff/DBDiff
server1:
user: peterjaap
password:
port: 3306
host: db
server2:
user: peterjaap
password:
port: 3306
host: db