Skip to content

Instantly share code, notes, and snippets.

View ProcessEight's full-sized avatar
💻
Working remotely

Simon Frost ProcessEight

💻
Working remotely
  • York
View GitHub Profile
@ProcessEight
ProcessEight / Download any Magento version or patch programmatically.md
Created July 31, 2017 10:33
Download any Magento resource programmatically.md

Download any Magento version or patch programmatically

  1. Login to Magento.com and find your account ID.
  2. Go to Account Settings > Downloads Access Token and generate a new token.
  3. cURL (or wget) the following URL to make sure you can authenticate: https://MAG_ID:[email protected]/products/downloads/info/help

Example:

$ curl -k https://MAG_ID:[email protected]/products/downloads/info/help
@ProcessEight
ProcessEight / Debug API requests.md
Last active January 18, 2021 13:20
Example scripts showing how to debug API calls with Xdebug

Debugging with Xdebug

Debug from the command line in Xdebug

Just export the XDEBUG_CONFIG variable:

export XDEBUG_CONFIG="idekey=PHPSTORM"

Remember to enable Xdebug first:

@ProcessEight
ProcessEight / Magento 1 stack configs.md
Last active April 21, 2018 04:24
Sample config files for the Magento 1 LEMP stack

Magento 1 stack configs

Nginx

nginx.conf

user www-data;
worker_processes 4;
pid /run/nginx.pid;
@ProcessEight
ProcessEight / install-magento1-with-sample-data.sh
Created April 18, 2017 17:40
Install Magento 1 with sample data through Composer
#!/usr/bin/env bash
# Install Magento sample data from pre-existing archive
# Just find and replace version number
# Run this from the projectroot of the vhost (usually folder with www and logs in it)
#
# What it does:
#
# 1. Copy media folder into current folder
# 2. Copy skin folder into current folder
# 3. Copy local.xml into app/etc ready for editing
@ProcessEight
ProcessEight / Composer cheatsheet.md
Last active December 19, 2022 02:50
Composer cheatsheet: Common Composer tasks
@ProcessEight
ProcessEight / Testing in Magento 2.md
Last active February 11, 2025 09:03
M2: Notes on setting up PHPUnit and writing/troubleshooting tests in Magento 2
@ProcessEight
ProcessEight / Magento.md
Last active April 4, 2022 13:22
Magento 1 Cheatsheet: Common Magento 1 tasks

Magento Cheatsheet (For Magento 1)

Database operations

Download Sonassi database helper

wget sys.sonassi.com/mage-dbdump.sh && chmod +x ./mage-dbdump.sh

Download Magerun