Skip to content

Instantly share code, notes, and snippets.

View rafaelstz's full-sized avatar
👨‍🔬

Rafael Corrêa Gomes rafaelstz

👨‍🔬
View GitHub Profile
@rqsakai
rqsakai / magento-cloud-docker.md
Last active February 15, 2024 18:37
The IT Nerd - Gist

Install magento with composer

composer create-project --repository-url=https://repo.magento.com/ magento/project-community-edition <install-directory-name>
 composer create-project --repository-url=https://repo.magento.com/ magento/project-enterprise-edition <install-directory-name>

Require the Cloud docker and ECE tools

@Vinai
Vinai / magento-composer-issues.md
Last active October 28, 2024 14:55
My beef with composer and Magento
@gwillem
gwillem / enforce-passwd-change.sh
Created March 4, 2019 09:42
Enforce new passwords for all Magento1 staff users
# 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
@erikhansen
erikhansen / sync_prod_to_stage.sh
Last active November 11, 2022 23:31
Magento 2 script to push DB and `pub/media` changes from prod>stage
#!/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
@luizventurote
luizventurote / m2theme.sh
Last active August 29, 2019 17:46
Bash script to deploy Magento 2 theme static content.
#!/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
@dannygsmith
dannygsmith / valet-plus-destroy
Last active July 18, 2023 09:07
Remove valet-plus - reboot required
#!/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'
@addyosmani
addyosmani / workbox.md
Last active January 20, 2024 16:14
Workbox recipes

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()
@rafaelpatro
rafaelpatro / magento-address-autocomplete.js
Last active September 23, 2024 12:44
Magento Address Auto Fill based on Postcode
/**
* Address Auto Fill based on Postcode
*
* Author:
* Rafael Patro <[email protected]>
*
* Intallation:
* Add a CMS Static Block applying the entire script below.
* Add a Widget to pages with address forms.
*
@SilentImp
SilentImp / babel.js
Last active October 26, 2020 20:55
How to configure Magento 2 to transpile es6
'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] = {
@dfelton
dfelton / 000 - Magento - Instagram Feed
Last active March 4, 2019 20:54
Instagram Feed for Magento
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