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
# Update all dependencies via brew | |
brew update | |
brew upgrade | |
# validate php | |
php -v | |
# When problems re-occur fix them first. I had to run 'brew reinstall icu4c' because my icu4c dependency was missing. | |
# Remove mysql 5.7 | |
brew services stop [email protected] |
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 gsed (Mac OSX) or sed (Linux) | |
targets=$(grep -HRl "function setUp()" app) | |
for i in ${targets}; do | |
echo $i | |
/usr/local/bin/gsed -i 's/[a-zA-Z]\+ function setUp().*/protected function setUp(): void/' "$i" | |
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
name: Fetch DB, anonymize and upload to S3 | |
env: | |
MASQUERADE_DOWNLOAD_URL: 'https://github.com/elgentos/masquerade/releases/latest/download/masquerade.phar' | |
DO_SPACES_HOST: 'ams3.digitaloceanspaces.com' | |
ANONYMIZED_DB_NAME: 'db_anonymized.sql.gz' | |
MYQSL_HOST: '127.0.0.1' | |
MYSQL_PWD: 'root' | |
REMOTE_HOST: ${{ secrets.REMOTE_HOST }} # source server host | |
REMOTE_USER: ${{ secrets.REMOTE_USER }} # source server use | |
REMOTE_PORT: ${{ secrets.REMOTE_PORT }} # source server port |
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
<?php declare(strict_types=1); | |
namespace Vendic\SampleModule\Setup\Patch\Data; | |
use Magento\Framework\Setup\Patch\DataPatchInterface; | |
use Magento\Cms\Api\Data\BlockInterfaceFactory; | |
use Magento\Cms\Api\BlockRepositoryInterface; | |
class CreateDesktopMenuCmsBlocks implements DataPatchInterface | |
{ |
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
#### by MageHost.pro #### | |
# execute in Magento 2 root: | |
find vendor app -regextype 'egrep' -type f -regex '.*/layout/.*\.xml' -not -regex '.*(vendor/magento/|/checkout_|/catalogsearch_result_|/dotmailer|/msp).*' | xargs grep --color -n -e 'cacheable="false"' |
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
-- Update all dev settings to false | |
UPDATE `core_config_data` | |
SET `value` = 0 | |
WHERE (`path` REGEXP '^dev.*') | |
AND `value` = 1; | |
-- Update Sphinx when using Mirasvit Sphinx Search | |
UPDATE `core_config_data` | |
SET `value` = 'mysql2' | |
WHERE `value` = 'sphinx'; |
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 | |
set -o errexit | |
# Author: David Underhill | |
# Script to permanently delete files/folders from your git repository. To use | |
# it, cd to your repository's root and then run the script with a list of paths | |
# you want to delete, e.g., git-delete-history path1 path2 | |
if [ $# -eq 0 ]; then | |
exit 0 |
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
<?php | |
namespace Mynamespace\RegenerateUrls\Console\Command; | |
use Magento\Framework\Exception\AlreadyExistsException; | |
use Symfony\Component\Console\Command\Command; | |
use Symfony\Component\Console\Input\InputInterface; | |
use Symfony\Component\Console\Output\OutputInterface; | |
NewerOlder