Skip to content

Instantly share code, notes, and snippets.

View erikhansen's full-sized avatar

Erik Hansen erikhansen

View GitHub Profile
@erikhansen
erikhansen / braintree_settlement.sh
Created November 29, 2016 23:29 — forked from mttjohnson/braintree_settlement.sh
Braintree manual transaction settlement
# Setup local directory with braintree example and libraries
git clone git@github.com:braintree/braintree_php_example.git
cd braintree_php_example
composer install
# Create and define configuration options
echo '
BT_ENVIRONMENT=sandbox
BT_MERCHANT_ID=xxxxxxxxxxxx
BT_PUBLIC_KEY=xxxxxxxxxxxx
@erikhansen
erikhansen / readme.md
Last active September 11, 2017 19:14 — forked from GianlucaGuarini/post-merge
Git hook that gets triggered after any 'git pull' whenever one of the files specified has changed. Useful to update any web application dependency.

How to create a global git commit hook by Matt Venables

1 Enable git templates (This tells git to copy everything in ~/.git-templates to your per-project .git/ directory when you run git init):

git config --global init.templatedir '~/.git-templates'

2 Create a directory to hold the global hooks:

mkdir -p ~/.git-templates/hooks

@erikhansen
erikhansen / magento1_enterprise_index_diagnostics.sql
Created February 18, 2016 14:46 — forked from mttjohnson/magento1_enterprise_index_diagnostics.sql
Magento 1.x Enterprise Partial Indexing Diagnostics Toolset
-- When products are added/removed from a category this table stores all the relation data
select * from catalog_category_product where product_id = '218';
-- The index that is used for presenting products in a category on the frontend
select * from catalog_category_product_index where product_id = '218';
-- The change log table used for Magento EE partial index functionality
select * from catalog_category_product_index_cl where product_id = '218';
-- The cron job that gets executed on each cron execution - check for errors