Skip to content

Instantly share code, notes, and snippets.

View henkvalk's full-sized avatar

Henk Valk henkvalk

View GitHub Profile
@henkvalk
henkvalk / varnish.vcl
Last active March 25, 2024 20:59
A solution for softpurges in Magento on Varnish 6.0 many thanks to @IvanChepurnyi
vcl 4.1;
import std;
import xkey;
# The minimal Varnish version is 6.0
# For SSL offloading, pass the following header in your proxy server or load balancer: 'X-Forwarded-Proto: https'
backend default {
@henkvalk
henkvalk / facebook-php-business-sdk-compatible-with-php81.patch
Created December 30, 2022 12:11
facebook/php-business-sdk compatible with php8.1
diff --git a/vendor/facebook/php-business-sdk/src/FacebookAds/Object/ServerSide/AdsPixelSettings.php b/vendor/facebook/php-business-sdk/src/FacebookAds/Object/ServerSide/AdsPixelSettings.php
index f995a18b..be3abcb6 100644
--- a/vendor/facebook/php-business-sdk/src/FacebookAds/Object/ServerSide/AdsPixelSettings.php
+++ b/vendor/facebook/php-business-sdk/src/FacebookAds/Object/ServerSide/AdsPixelSettings.php
@@ -151,7 +151,7 @@ class AdsPixelSettings implements ArrayAccess {
* @param integer $offset Offset
* @return boolean
*/
- public function offsetExists($offset) {
+ public function offsetExists($offset) :bool {
@henkvalk
henkvalk / change_magento2_staging_baseurls.py
Last active October 22, 2022 12:45 — forked from hn-support/change_magento2_staging_baseurls.py
Copy and adjust your base_urls for Magento 2 staging environment on hypernode
#!/usr/bin/env python
"""
Set the base-urls for your Magento 2 staging environment by copying and adjusting the base-urls from your production site.
To use, download the file and make it executable. Then run:
./change_magento2_staging_baseurls.py
After use, check your base-urls by issuing:
n98-magerun2 sys:store:config:base-url:list
This script requires n98-magerun2.