Skip to content

Instantly share code, notes, and snippets.

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

Chris Astley chrisastley

🏠
Working from home
View GitHub Profile
@leek
leek / _Magento2_DeleteTestData.md
Last active July 16, 2024 20:20
Magento 2 - Delete All Test Data

These set of scripts are for Magento 2. For Magento 1, see this Gist.

@wigman
wigman / Compress Magento media
Last active August 6, 2021 12:49
Compress Magento media from commandline
# you need these installed if you want to:
sudo apt-get update
# resize images
sudo apt-get install imagemagick -y
# compress jpg and png files
sudo apt-get install jpegoptim optipng
# compress video's
sudo apt-get install ffmpeg
@pduchnovsky
pduchnovsky / optimize.sh
Last active December 11, 2023 11:40
Image size optimization for webpages jpg/png | https://duchnovsky.com/2020/11/images-optimization-for-web/
#!/bin/bash
# Script adapted by pduchnovsky
# https://duchnovsky.com/2020/11/images-optimization-for-web/
# Add list of folder names to ignore array here, separated by space
ignore=("./themes/*" "./resources/*" "./assets/*")
# Array of png optimizers with their arguments
optimizers=(
"optipng -nb -nc"
@peterjaap
peterjaap / varnish6.vcl
Last active July 15, 2024 09:30
Updated Magento 2 Varnish 6 VCL, in cooperation with Varnish Software
# A number of these changes come form the following PR's; , combines changes in https://github.com/magento/magento2/pull/29360, https://github.com/magento/magento2/pull/28944 and https://github.com/magento/magento2/pull/28894, https://github.com/magento/magento2/pull/35228, https://github.com/magento/magento2/pull/36524, https://github.com/magento/magento2/pull/34323
# VCL version 5.0 is not supported so it should be 4.0 even though actually used Varnish version is 6
vcl 4.1;
import std;
# The minimal Varnish version is 6.0
# For SSL offloading, pass the following header in your proxy server or load balancer: '/* {{ ssl_offloaded_header }} */: https'
backend default {
.host = "/* {{ host }} */";