Skip to content

Instantly share code, notes, and snippets.

View grafikchaos's full-sized avatar

Josh J. grafikchaos

View GitHub Profile
@grafikchaos
grafikchaos / Install_IonCube_Loaders.md
Last active November 29, 2023 07:49
Install IonCube on Linux

Overview

I always forget the steps, but it's pretty simple:

Steps:

  • Download the IonCube Loaders
  • Check your PHP version to find which IonCube loader you should use
  • Check your PHP configuration for the extension_dir
  • Copy the IonCube Loader into the PHP extension directory
@grafikchaos
grafikchaos / Cherry Picking Multiple Commits.md
Last active October 9, 2023 17:30
Cherry pick multiple commits from a remote or upstream branch
@grafikchaos
grafikchaos / add-checkout-form-key.sh
Last active September 2, 2022 16:22 — forked from aadmathijssen/add-checkout-form-key.sh
Magento SUPEE-9767 Checkout Form Key Theme Patch
find -L app/design/frontend -name 'shipping.phtml' -or -name 'billing.phtml' -or -name 'shipping_method.phtml' -or -name 'payment.phtml' \
| xargs grep -L formkey \
| xargs perl -i -pe 's/<\/form>/<?php echo \$this->getBlockHtml("formkey") ?>\n<\/form>/g'
find -L skin/frontend -name 'opcheckout.js' \
| xargs grep -L form_key \
| xargs perl -i -pe 's/if \(elements\[i\]\.name=='\''payment\[method\]'\''\) \{/if (elements[i].name=='\''payment[method]'\'' || elements[i].name == '\''form_key'\'') {/g'
find -L js -name 'payment.js' \
| xargs grep -L form_key \
@grafikchaos
grafikchaos / Magento_debug_controller_overrides.md
Last active July 10, 2019 16:10
Helpful debugging script for troubleshooting Magento overrides of controllers
@grafikchaos
grafikchaos / Category_Attributes.sql
Last active June 18, 2019 09:43 — forked from ticean/Category.sql
Magento EAV SQL Queries
SET @entityid = 5; -- category's ID
-- Select varchar/string based category attribute values
SELECT ea.attribute_id, ea.attribute_code, eav.value AS 'value', 'varchar' AS 'type'
FROM catalog_category_entity e
JOIN catalog_category_entity_varchar eav ON e.entity_id = eav.entity_id
JOIN eav_attribute ea ON eav.attribute_id = ea.attribute_id
WHERE e.entity_id = @entityid
-- Select integer based category attribute values (includes boolean values)
UNION(
@grafikchaos
grafikchaos / Add SSH Keys.md
Last active October 21, 2018 17:00
Quickly add SSH Key to server
$ cat ~/.ssh/id_rsa.pub | ssh USER@HOST "mkdir -p ~/.ssh; cat >> ~/.ssh/authorized_keys; chmod 700 ~/.ssh; chmod 600 ~/.ssh/authorized_keys"
@grafikchaos
grafikchaos / magento2-installation-via-command-line.md
Last active August 23, 2018 21:53
Magento 2 Installation via command line

Install Magento 2 Community Edition (CE)

Via Composer

You can use the Magento integrator instructions to install download/install Magento 2 via composer

Get the Magento CE metapackage

To get started:

Overview

This is the process I have found to be very helpful when migrating projects from their SVN repository over to Git. When migrating from one version control system to another it's important to retain as much information about the development history as possible (i.e., commit messages, tags, branches, etc.) and avoid the easy and tempting method of just downloading the project from a server and throw it into the new version control (you should only consider that if the project has never been in a version control system before).

Key concepts:

  • tools for migrating svn repositories to git
  • how to migrate standardized svn repositories
  • how to migrate non-standardized svn repositories
  • best practices for your now un-maintained SVN repository
@grafikchaos
grafikchaos / Magento - Add Custom Structure Blocks.md
Last active August 18, 2017 10:57
HowTo: Add Custom Structural Blocks to a Layout

Overview

Recently had a client that wanted to customize the layout for a category landing page so that the category's title and description would be displayed above the layered navigation and product grid — essentially creating a full-width section above the left sidebar and main content areas.

NOTE: For reference, this is based off the blog post from Collaboration133.com's Magento - Add Custom Structural Block Reference.

Custom Module (My_LayoutMods)

I created a custom module to help organize and identify that there are some custom modifications to layout templates. Not saying you have to, but it may be easier for other's (or your future self) to recognize and find what customizations were done (and hopefully why).

@grafikchaos
grafikchaos / macosx-install-php-oracle-oci8-pdo_oci.md
Created November 1, 2016 03:09 — forked from krisanalfa/macosx-install-php-oracle-oci8-pdo_oci.md
Install OCI8 and / or PDO_OCI on OSX via Brew

Installation

This procedure is tested on Mac OS X 10.10.5 with Developpers tools installed (xCode).

PHP 5.6 installed with Homebrew.

Preparation

Download the following files from Oracle website (yes, you need to create an account and accept terms):