Skip to content

Instantly share code, notes, and snippets.

View ProcessEight's full-sized avatar
💻
Working remotely

Simon Frost ProcessEight

💻
Working remotely
View GitHub Profile
@ProcessEight
ProcessEight / rabbitmq.md
Last active March 1, 2024 15:50
Research into RabbitMQ

RabbitMQ

Key concepts

AMQP: Advanced Message Queueing Protocol: A set of rules which govern how messages are exchanged between systems and processed.

Message: A piece of data which needs to be processed in some way

Queue: A buffer which temporarily holds messages. A queue processes messages one-by-one, in a FIFO order.

@ProcessEight
ProcessEight / magento-debugging-cheatsheet-cron.md
Created June 22, 2023 10:56
Cheatsheet for debugging cron-based issues in Magento 2

Magento Debugging Cheatsheet: Cron Edition

  • Verify cron job is setup on magento
  • Verify other cron jobs are running
  • Check cron tables in db for hidden error messages
  • Check cron logs for error messages
  • Schedule a cron task for scheduled execution using magerun. Does the job get added to magento cron db tables?
  • Install a cron management tool in the admin
@ProcessEight
ProcessEight / automated-refactoring.md
Last active May 3, 2024 20:34
Discussion of automated refactoring processes to bring legacy codebases up to date
@ProcessEight
ProcessEight / Xdebug3.md
Last active January 24, 2022 14:33
Xdebug 3 research

Xdebug 3 research

Support

Xdebug hooks into PHP's internals deeply in order to offer it's fetures of step debugging, tracing, profiling and others. So each PHP version has a matching Xdebug version.

The latest version of Xdebug, Xdebug 3, only supports PHP versions back to 7.2. However, that's a longer support period than even PHP itself provides.

See the compatibility table for more info: https://xdebug.org/docs/compat#supported-versions

@ProcessEight
ProcessEight / debugging-podcast-notes.md
Created May 3, 2021 14:05
Notes for the Swift Otter 'Smash the bug' podcast

Notes for Swift Otter podcast

Shortcuts

  • Power user tip: If the error message or error description sounds familiar, check your list of previous solutions, before you spend hours debugging.
  • Otherwise, start gathering evidence:
    • From error logs, error messages, unusual behaviour, entities with missing information (e.g. Orders, customers, products)
    • Reproducibility: If it can't be reproduced, it'll be hard, if not impossible to debug. Wait for it to occur regularly before investing time in debugging it.

First level (i.e. Can we get away with an quick/easy win?)

@ProcessEight
ProcessEight / laravel-troubleshooting.md
Last active November 7, 2022 16:22
Troubleshooting common Laravel problems

Laravel Troubleshooting

Database migrations

could not find driver (SQL: PRAGMA foreign_keys = ON;)

$ php artisan migrate

   WARN  The SQLite database does not exist: database/database.sqlite.  
@ProcessEight
ProcessEight / Applying SUPEEs to Magento - a checklist.md
Created April 12, 2019 14:04
Applying SUPEEs to Magento - a checklist
  • (/) Check the patch release notes for any dependencies. Some patches need to have other patches applied/reverted before they can be applied successfully
  • (/) Check if earlier patches need to be reverted and a newer version installed first
  • (/) Download patch
  • (/) Make it executable
  • (/) Run patch helper
  • (/) Apply patch
  • (/) Move the patch file to /app/etc/patches
  • (/) Manually add files created by the patch to git
  • (/) Commit the patch changes before manually merging any changes
@ProcessEight
ProcessEight / Anatomy of Magento 2: Layered Navigation.md
Last active February 17, 2024 05:39
In-depth exploration of how layered navigation is implemented in Magento 2

Anatomy of Magento 2: Layered Navigation

Points for investigation

  • Generate high-level overview of all the main components
  • How are the total item counts for each option generated?
  • How is the catalog updated to display the matching products?
  • How are options rendered?
  • What are the customisation points?
  • What events are dispatched?
@ProcessEight
ProcessEight / Mage Titans Presentations 2018.md
Last active February 12, 2019 15:06
Mage Titans Presentations 2018

Mage Titans Presentations

Async PHP

  • Basic concepts of asynchronous programming
  • Using it to process queues
  • Any other angles?

In this talk, I'll discuss how to appply asynchronous programming techniques to solve common problems in Magento.

After a quick introduction to the basics of asynchronous programming, I'll show you how frameworks like ReactPHP and AmPHP can take PHP beyond the traditional 'run the script, execute some code and die' paradigm and demonstrate some novel and unique ways that asynchronous programming can be used in your Magento store.

@ProcessEight
ProcessEight / Enabling-and-disabling-Xdebug.md
Last active November 25, 2021 11:00
How to enable and disable smoothly using simple bash scripts

Enabling and disabling the Xdebug PHP extension with a single command

Note: This guide assumes you are using PHP-FPM and Ubuntu 16.04

Speed (and therefore time) is of the essence

Xdebug is a fantastic tool which can save hours or even days of debugging effort.

Yet just enabling the extension itself will slow down Magento. Composer will also warn you of performance degradation when running it with Xdebug enabled.