grep -r Mage::dispatchEvent /path/to/your/Magento/* > events.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Instructions on how to add an Instagram Feed to a Magento Site. | |
Includes: | |
Block Class w/ base template for rendering the feed | |
System -> Configuration options for connecting to the client's Instagram account | |
Default CSS Styles |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Requires n98-magerun | |
n98-magerun admin:user:list --format=csv | grep ,active | while read row; | |
do | |
user=$(echo $row | cut -d, -f2) | |
pass=$(tr -cd '[:alnum:]' < /dev/urandom | fold -w10 | head -n1) | |
echo "$user -> $pass" | |
n98-magerun admin:user:change-password $user $pass >/dev/null | |
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
echo "M2 - Deploy Static Content $1/$2 🚀" | |
rm -rf var/view_preprocessed/pub/static/frontend/$1/$2 | |
rm -rf var/view_preprocessed/source/frontend/$1/$2 | |
grunt exec:$2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Address Auto Fill based on Postcode | |
* | |
* Author: | |
* Rafael Patro <rafaelpatro@gmail.com> | |
* | |
* Intallation: | |
* Add a CMS Static Block applying the entire script below. | |
* Add a Widget to pages with address forms. | |
* |
Magento has recently merged an architecture proposal with the goal of removing non-composer modules.
At first this seems like a good idea, but I think there are some problems.
Magento listens to the community. That is a good thing.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
var combo = require('./combo'), | |
themes = require('./themes'), | |
_ = require('underscore'); | |
var themeOptions = {}; | |
_.each(themes, function(theme, name) { | |
if (typeof theme.babelFiles != "undefined") { | |
themeOptions[name] = { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# stop on errors | |
set -e | |
# turn on debugging if you're running into issues | |
#set -x | |
# Static variables | |
ENVIRONMENT=$1 | |
RED='\033[0;31m' | |
NC='\033[0m' # No Color |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
#styles | |
VP_NONE='\033[00m' | |
VP_RED='\033[01;31m' | |
VP_GREEN='\033[01;32m' | |
VP_YELLOW='\033[01;33m' | |
VP_PURPLE='\033[01;35m' | |
VP_CYAN='\033[01;36m' | |
VP_WHITE='\033[01;37m' |
Workbox runtime caching recipes
Your Service Worker script will need to import in Workbox and initialize it before calling any of the routes documented in this write-up, similar to the below:
importScripts('workbox-sw.prod.v1.3.0.js');
const workbox = new WorkboxSW();
// Placeholder array populated automatically by workboxBuild.injectManifest()
OlderNewer