Skip to content

Instantly share code, notes, and snippets.

View stephansteiner's full-sized avatar

Stephan Steiner stephansteiner

  • Vienna, Austria
View GitHub Profile
@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'
@daliborgogic
daliborgogic / elementTiming.js
Last active August 18, 2023 17:09
Vue.js Element Timing API directive as plugin
export default {
install: (app, options) => {
let observer
const obj = {
created(el, binding) {
if (options?.observe) {
el.setAttribute('elementtiming', binding.arg)
observer = new PerformanceObserver(list => {
for (const entry of list.getEntries()) {
const { identifier, loadTime } = entry
@maderlock
maderlock / amcaptcha.phtml
Created September 8, 2017 10:41
Allowing multiple forms to be recaptcha'ed with Amasty Invisible Google ReCaptcha for Magento 2
<?php
/**
* @author Amasty Team
* @copyright Copyright (c) 2017 Amasty (https://www.amasty.com)
* @package Amasty_InvisibleCaptcha
*/
?>
<?php
/**
*