Skip to content

Instantly share code, notes, and snippets.

View kassner's full-sized avatar

Rafael Kassner kassner

View GitHub Profile
@schmengler
schmengler / add-checkout-form-key.sh
Last active September 2, 2022 16:23
Magento SUPEE-9767 Checkout Form Key Theme Patch
find -L app/design/frontend -regex '.*\(shipping\|billing\|shipping_method\|payment\).phtml' -exec grep -L formkey {} \; \
| xargs sed -i 's/<\/form>/<?php echo $this->getBlockHtml("formkey") ?><\/form>/g'
find -L skin/frontend -name 'opcheckout.js' -exec grep -L form_key {} \; \
| xargs sed -i 's/if (elements\[i\].name=='\''payment\[method\]'\'') {/if (elements[i].name=='\''payment[method]'\'' || elements[i].name == '\''form_key'\'') {/g'
@kevashcraft
kevashcraft / K8s-DigitalOcean-CoreOS.md
Last active September 18, 2020 05:47
How to Setup Kubernetes on DigitalOcean with CoreOS

Kubernetes on DigitalOcean with CoreOS

Let's look at an example of how to launch a Kubernetes cluster from scratch on DigitalOcean, including kubeadm, an Nginx Ingress controller, and Letsencrypt certificates.

Overview

Environment

We'll be creating a four-node cluster (k8s-master, k8s-000...k8s-002), load balancer, and ssl certificates.

Table of Contents

  1. Install Kubernetes
@hostep
hostep / composer-v2-support-older-magento2-versions.md
Last active July 2, 2025 00:06
Add composer v2 support to older Magento2 versions

Add composer v2 support to older Magento2 versions

Magento 2.3.7 and 2.4.2 ship with composer v2 support out of the box but as far as I can see the only thing that needs to happen is to use some more modern versions of certain composer plugins which are used by certain dependencies of Magento.

This means we should be able to add composer v2 support to older Magento2 versions as well if we get a bit creative.

See below for diffs of the composer.json files you can apply to your projects, be sure to keep a mental note of these things, they will need to maintained by yourself in case newer versions of these modules are released. And if one day you update to Magento 2.3.7 or 2.4.2 or higher, you can remove these changes again.

⚠️ Disclaimer: use these tricks at your own risk!

@henriklindgren
henriklindgren / 50-mousetrapper.conf
Created May 8, 2023 19:02
Linux Mint, Mousetrapper Advance 2.0 libinput xorg config, legacy
# /usr/share/X11/xorg.conf.d/50-mousetrapper.conf
#
# using "libinput debug-events --verbose", seems the scroll wheel report in 15 degree increments.
# Vertical scroll under-reports, horizontal works as promised. Not sure if hardware/software issue/choice in mousetrapper or just libinput issue.
Section "InputClass"
Identifier "MouseTrapper"
MatchUSBID "0d24:0010"
# Seems to be no need to match pointer even though it registers on keyboard as well
# MatchIsPointer "true"
Driver "libinput"