Skip to content

Instantly share code, notes, and snippets.

View tshabatyn's full-sized avatar

Taras Shabatyn tshabatyn

View GitHub Profile
@tshabatyn
tshabatyn / confirm.Makefile
Created February 3, 2023 16:37 — forked from Pierstoval/confirm.Makefile
"confirm" action for your Makefile
# To use the "confirm" target inside another target,
# use the " if $(MAKE) -s confirm ; " syntax.
mycommand:
@if $(MAKE) -s confirm ; then \
execute_your_command_here ; \
fi
.PHONY: mycommand
# The CI environment variable can be set to a non-empty string,
@tshabatyn
tshabatyn / cleanImages.php
Created August 4, 2020 14:21 — forked from peterjaap/cleanImages.php
Script to clean up the images tables in a Magento installation. Removes references to non-existing images, removes duplicate images, sets correct default image and deletes orphaned images from the filesystem.
<?php
/*
* This script deletes duplicate images and imagerows from the database of which the images are not present in the filesystem.
* It also removes images that are exact copies of another image for the same product.
* And lastly, it looks for images that are on the filesystem but not in the database (orphaned images).
*
* This script can most likely be optimized but since it'll probably only be run a few times, I can't be bothered.
*
* Place scripts in a folder named 'scripts' (or similar) in the Magento root.
@tshabatyn
tshabatyn / blocklist.txt
Created August 4, 2020 13:33 — forked from hn-support/blocklist.txt
A curated list of user agents that use lot's of resources but don't cause more conversion or add any value to most of the webshops
360Spider
80legs\.com
ADmantX
Abonti
AcoonBot
Acunetix
AddThis\.com
AhrefsBot
AngloINFO
Antelope