Skip to content

Instantly share code, notes, and snippets.

View Tjitse-E's full-sized avatar

Tjitse Tjitse-E

View GitHub Profile
@Tjitse-E
Tjitse-E / settings.sql
Last active October 14, 2020 07:53
Prepare Magento 2 production database for usage with Valet Plus
-- Update all dev settings to false
UPDATE `core_config_data`
SET `value` = 0
WHERE (`path` REGEXP '^dev.*')
AND `value` = 1;
-- Update Sphinx when using Mirasvit Sphinx Search
UPDATE `core_config_data`
SET `value` = 'mysql2'
WHERE `value` = 'sphinx';
@robhrt7
robhrt7 / MySQL_5-7_macOS.md
Last active February 28, 2024 03:48 — forked from nrollr/MySQL_macOS_Sierra.md
Install MySQL 5.7 on macOS using Homebrew

This is a fork of original gist https://gist.github.com/nrollr/3f57fc15ded7dddddcc4e82fe137b58e, with slight changes on pointing to 5.7 version branch, instead of 8 (latest default of MySQL in Hombrew).

Install MySQL 5.7 on macOS

This procedure explains how to install MySQL using Homebrew on macOS (Sierra 10.12 and up)

Install Homebrew

  • Installing Homebrew is effortless, open Terminal and enter :
    $ /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
  • Note: Homebrew will download and install Command Line Tools for Xcode 8.0 as part of the installation process.
@iancassidyweb
iancassidyweb / 2.1.6-Image-Resize-Patch
Created May 19, 2017 09:20
Magento 2.1.6 - Image Resizer Patch - Allow CLI Override
Index: www/vendor/magento/module-catalog/Helper/Image.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- www/vendor/magento/module-catalog/Helper/Image.php
+++ www/vendor/magento/module-catalog/Helper/Image.php
@@ -494,6 +494,6 @@
protected function isScheduledActionsAllowed()
{
@jeroenvermeulen
jeroenvermeulen / find_cacheable_false.sh
Last active August 3, 2023 08:42
Magento2: Find cacheable="false" in layout XML
#### by MageHost.pro ####
# execute in Magento 2 root:
find vendor app -regextype 'egrep' -type f -regex '.*/layout/.*\.xml' -not -regex '.*(vendor/magento/|/checkout_|/catalogsearch_result_|/dotmailer).*' | xargs grep --color -n -e 'cacheable="false"'
@udovicic
udovicic / INSTRUCTIONS.md
Last active January 6, 2021 19:16
Instructions for setting up Magento 2 code analysis with PHPSTorm

Setting up MEQP Coding standard checks in PHPStorm

Overview

In order to submit extensions to Magento marketplace, source code needs to pass Magento Extension Quality Program Coding Standard checks.

You can either do it manually, by following this guide in official Github repository, or by fixing things as you code, by setting up check in PHP Storm.

Install and configure Code Sniffer on system

@petemcw
petemcw / docker_instructions.md
Last active October 22, 2020 21:24
Mac OS X Docker Instructions using Dinghy

Docker Installation

A great way to get Docker running smoothly on OS X is to use the awesome project Dinghy. It is basically:

Docker on OS X with batteries included, aimed at making a more pleasant local development experience. Runs on top of docker-machine.

Some of the benefits are:

  • Faster volume sharing using NFS rather than built-in virtualbox/vmware file shares
  • Filesystem events work on mounted volumes
@standa
standa / SupportDesk_FixAcl.php
Last active May 18, 2016 23:57 — forked from raybogman/SupportDesk_FixAcl.php
SupportDesk_FixAcl
<?php
/**
* Updated behaviour:
*
* - search also /controllers and /Controller folders
* - disregard adminhtml.xml setup, write 'return true' always - or comment it back in if you need it
* - write more verbose logs
* - only update controllers extending Mage_Adminhtml_Controller_Action
*
*
@matt448
matt448 / slack_nagios.sh
Last active February 13, 2023 15:38
Script to post Nagios notifications into a Slack channel
#!/bin/bash
# This script is used by Nagios to post alerts into a Slack channel
# using the Incoming WebHooks integration. Create the channel, botname
# and integration first and then add this notification script in your
# Nagios configuration.
#
# All variables that start with NAGIOS_ are provided by Nagios as
# environment variables when an notification is generated.
# A list of the env variables is available here:
@kalenjordan
kalenjordan / Batched Iterator for Magento collections
Last active May 9, 2022 12:25
Batched iterator for Magento collections
// This is how you would use it. Pass in your collection
// along with an individual callback as well as a batch callback
Mage::getSingleton('stcore/resource_iterator_batched')->walk(
$collection,
array($this, 'batchIndividual'),
array($this, 'batchAfter'),
self::BATCH_SIZE
);
public function batchIndividual($model)
@manastungare
manastungare / css-compress.php
Created May 7, 2012 00:23
On-the-fly CSS Compression
<?php
/**
* On-the-fly CSS Compression
* Copyright (c) 2009 and onwards, Manas Tungare.
* Creative Commons Attribution, Share-Alike.
*
* In order to minimize the number and size of HTTP requests for CSS content,
* this script combines multiple CSS files into a single file and compresses
* it on-the-fly.
*