Skip to content

Instantly share code, notes, and snippets.

@peterjaap
peterjaap / varnish6.vcl
Last active February 18, 2026 05:28
Updated Magento 2 Varnish 6 VCL, in cooperation with Varnish Software, see Xkey soft purge version here; https://gist.github.com/peterjaap/7f7bf11aa7d089792e8fcc2fb34760fa
# 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
# See the Xkey version here: https://gist.github.com/peterjaap/7f7bf11aa7d089792e8fcc2fb34760fa
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'
@jlnarvaez
jlnarvaez / M2Log.php
Last active July 27, 2023 09:01
Magento 2 Custom Log (for Development purposes)
<?php
/**
* This snippet is useful to debug in production environments.
* DON'T USE THIS CODE TO LOG IN YOUR MODULES.
* To create a custom log check Magento official documentation
* (https://devdocs.magento.com/guides/v2.4/config-guide/log/custom-logger-handler.html)
*/
// Custom Log for Magento v2.3 or <
@jordanvector
jordanvector / 2.3.6-Fixed-issue-with-critical-error-The-following-tags.patch
Created November 19, 2020 12:44
2.3.6-Fixed issue with critical error: The following tag(s) are not allowed
From 21759562afe3a1b8e6733a6ca1c8d0f8d7f39767 Mon Sep 17 00:00:00 2001
Date: Thu, 19 Nov 2020 07:33:39 -0500
Subject: [PATCH] =?UTF-8?q?Fixed=20issue=20with=20critical=20error:=20The?=
=?UTF-8?q?=20following=20tag(s)=20are=20not=20allowed=E2=80=A6?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../order/creditmemo/items/renderer/default.phtml | 10 +++++++---
@thoaster
thoaster / MAMP PRO 4 Trial Reset.md
Last active May 27, 2025 05:08
MAMP PRO 4 Trial Reset

MAMP PRO 4 Trial Reset

A simple script that resets latest MAMP PRO 4 trial validity, and keeps your data safe.

How to use

  • Copy the code into a file OR download the script and save it as reset_mamp4.sh
  • Open the Terminal app and write chmod +x then drag and drop the file on the Terminal. You should have something like chmod +x reset_mamp4.sh. Press Enter to run it.
  • Now, run the file itself by dragging and dropping it on the Terminal (something like reset_mamp4.sh) then pressing Enter.
  • Open MAMP PRO and check if you have 14 days left now.

Didn't work?