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
@ProxiBlue
ProxiBlue / ghosts.sh
Created May 13, 2025 09:39 — forked from jakwinkler/ghosts.sh
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 ===
@ProxiBlue
ProxiBlue / 80-mount-usb-to-media-by-label.rules
Created December 29, 2024 11:54 — forked from eklex/80-mount-usb-to-media-by-label.rules
udev rule for Home Assistant OS (hassio) to mount USB drives into the Supervisor Media directory
#
# udev rule
# Mount USB drive to the media directory using the partition name as mount point
#
# Description:
# Created for Home Assistant OS, this rule mounts any USB drives
# into the Hassio media directory (/mnt/data/supervisor/media).
# When a USB drive is connected to the board, the rule creates one directory
# per partition under the media directory. The newly created partition is named
# as the partition name. If the partition does not have a name, then the following
$('form input:text').each(function(index, elem) {
var eId = $(elem).attr('id');
var label = null;
if (eId && (label = $(elem).parents('form').find('label[for='+eId.replace(':', '\\:')+']')).length === 1) {
$(elem).attr('placeholder', $(label).html().replace(/<\/?[^>]+(>|$)/g, ""));
@ProxiBlue
ProxiBlue / fix-url-keys.php
Last active February 19, 2016 15:33 — forked from Vinai/fix-url-keys.php
This fixes the duplicate url_key issue in a Magento 1.8 / 1.13 installation.
<?php
/**
* Drop this into the shell directory in the Magento root and run with -h to see all options.
*/
require_once 'abstract.php';
/**
* Fix duplicate url keys for categories and products to work with the 1.8 alpha1 CE url key constraints.