Skip to content

Instantly share code, notes, and snippets.

@rxaviers
rxaviers / gist:7360908
Last active May 6, 2024 17:53
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: 😄 :smile: 😆 :laughing:
😊 :blush: 😃 :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
😆 :satisfied: 😁 :grin: 😉 :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: 😀 :grinning:
😗 :kissing: 😙 :kissing_smiling_eyes: 😛 :stuck_out_tongue:
@ProcessEight
ProcessEight / Testing in Magento 2.md
Last active February 7, 2024 14:42
M2: Notes on setting up PHPUnit and writing/troubleshooting tests in Magento 2
@parhamr
parhamr / 0: Magento 1.12 Enterprise multi-store cluster configuration.md
Last active October 13, 2023 14:20
A highly available, fault tolerant, distributed, and load balanced LEMP cluster.
@jellesiderius
jellesiderius / TrojanOrders-exploit.patch
Last active December 9, 2022 15:15
Quick fix for trojan order exploit in 2.4.5-p1 and below
--- a/vendor/magento/module-sales/Model/Order/Email/Sender.php
+++ b/vendor/magento/module-sales/Model/Order/Email/Sender.php
@@ -73,6 +73,20 @@
*/
protected function checkAndSend(Order $order)
{
+ $possibleExploitTags = ['{{', '}}', '()', '.()', 'base64_', 'this.', 'addAfterFilterCallback', '.filter', '.Filter', 'getTemplateFilter'];
+ $addressArray = $order->getAddressesCollection()->toArray()['items'];
+ $addressStringCombined = "";
+ foreach ($addressArray as $addressArrayItem) {
@colinmollenhour
colinmollenhour / cleanCache.php
Created May 17, 2012 00:50
Simplified cache cleaning script for production updates.
<?php
/**
* Set global/skip_process_modules_updates to '1' in app/etc/local.xml and
* then use this script to apply updates and refresh the config cache without
* causing a stampede on the config cache.
*
* @author Colin Mollenhour
*/
umask(0);
ini_set('memory_limit','512M');
@IvanChepurnyi
IvanChepurnyi / Table.php
Last active July 11, 2022 10:44
Optimized options load
<?php
/**
* Optimized version of attribute source options model
*
* That allows to preload options once and reuse them instead of doing calls to db all the time
*
*/
class EcomDev_Optimization_Model_Resource_Attribute_Source_Table
extends Mage_Eav_Model_Entity_Attribute_Source_Table
@bpj
bpj / README.md
Last active April 6, 2022 08:40
Pandoc Markdown Quick Reference by Examples

pandoc-quick-ref.markdown

@drobinson
drobinson / form_key_checks.txt
Created December 11, 2013 16:38
List (and command that generated it) of places that form key validation has been added in 1.13.1
Controllers that have added form key validation:
$ git grep --files-with-matches "this->_validateFormKey())" <core_sources_update_commit_hash>
<core_sources_update_commit_hash>:app/code/core/Enterprise/Checkout/controllers/CartController.php
<core_sources_update_commit_hash>:app/code/core/Enterprise/GiftRegistry/controllers/IndexController.php
<core_sources_update_commit_hash>:app/code/core/Enterprise/GiftRegistry/controllers/ViewController.php
<core_sources_update_commit_hash>:app/code/core/Enterprise/Reward/controllers/CustomerController.php
<core_sources_update_commit_hash>:app/code/core/Enterprise/Wishlist/controllers/SearchController.php
<core_sources_update_commit_hash>:app/code/core/Mage/Catalog/controllers/Product/CompareController.php
<core_sources_update_commit_hash>:app/code/core/Mage/Checkout/controllers/CartController.php
@gorsuch
gorsuch / gist:1418850
Created December 1, 2011 18:37
clojure uuid
(defn uuid [] (str (java.util.UUID/randomUUID)))
@jrosell
jrosell / tasks.json
Last active August 28, 2020 18:13
Visual Studio Code startup task for cache-clean.js on Magento 2. Please, Ctrl+shift+P to select Tasks: Manage Automatic Tasks in Folder and choose "Allow Automatic Tasks in folder
{
"version": "2.0.0",
"tasks": [
{
"label": "cache-clean.js",
"type": "shell",
"command": "~/.config/composer/vendor/bin/cache-clean.js --watch",
"presentation": {
"reveal": "always",
"panel": "dedicated"