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 Training5\VendorRepository\Controller\Test; | |
use Magento\Catalog\Api\Data\ProductInterface; | |
use Magento\Catalog\Api\ProductRepositoryInterface; | |
use Magento\Framework\Api\Filter; | |
use Magento\Framework\Api\FilterBuilder; | |
use Magento\Framework\Api\SearchCriteriaBuilder; | |
use Magento\Framework\App\Action\Action; | |
use Magento\Framework\App\Action\Context; |
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 | |
# Run this script whenever you need to update the logrotate configuration for your website. | |
# You can do that in 3 ways: | |
# a) Execute this script Manually | |
# b) Schedule it on a cronjob | |
# c) Execute it every time before the rotation takes place. Call this script on first line of your logrotate "/etc/cron.daily/logrotate" | |
# -e = stop if something fails | |
# -u = fail if you try to use an unset variable. | |
set -eu |
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 php | |
<?php | |
class PhpStormVcsRoots | |
{ | |
private $rootPath = "."; | |
private $maxDepth = "4"; | |
private $configPath = ".idea/vcs.xml"; | |
public function updateVcsRootsConfig() |
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
// module.xml | |
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/internal/Magento/Framework/Module/etc/module.xsd"> | |
<module name="VendorName_ModuleName" setup_version="0.0.1" > | |
<sequence> | |
<module name="Magento_Config"/> | |
</sequence> | |
</module> | |
</config> | |
// di.xml |
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
<!-- module.xml --> | |
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/internal/Magento/Framework/Module/etc/module.xsd"> | |
<module name="VendorName_ModuleName" setup_version="0.0.1" > | |
<sequence> | |
<module name="Magento_Config"/> | |
</sequence> | |
</module> | |
</config> | |
<!-- di.xml --> |
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
<!-- Local Setups --> | |
<toolSet name="External Tools"> | |
<tool name="mg2 clear cache" showInMainMenu="true" showInEditor="false" showInProject="false" showInSearchPopup="false" disabled="false" useConsole="true" showConsoleOnStdOut="false" showConsoleOnStdErr="false" synchronizeAfterRun="false"> | |
<exec> | |
<option name="COMMAND" value="bin/magento" /> | |
<option name="PARAMETERS" value="cache:clean" /> | |
<option name="WORKING_DIRECTORY" value="$ProjectFileDir$/magento" /> | |
</exec> | |
</tool> | |
<tool name="mg2 generation flush" description="Flushs generated code like factories and proxies" showInMainMenu="true" showInEditor="false" showInProject="false" showInSearchPopup="false" disabled="false" useConsole="true" showConsoleOnStdOut="false" showConsoleOnStdErr="false" synchronizeAfterRun="true"> |
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
[mysqld] | |
sql_mode=STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION | |
# https://expressionengine.com/blog/mysql-5.7-server-os-x-has-gone-away | |
interactive_timeout = 300 | |
wait_timeout = 300 | |
# https://github.com/Homebrew/legacy-homebrew/issues/47335 | |
table_open_cache = 250 |
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
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd"> | |
<!-- We create our own virtual class because original Magento\Setup\Module\DataSetup cannot be instantiated when compilation enabled. --> | |
<virtualType name="Vendor\Module\Setup\Module\DataSetup" type="Magento\Setup\Module\DataSetup"> | |
<arguments> | |
<argument name="context" xsi:type="object">Magento\Framework\Module\Setup\Context</argument> | |
</arguments> | |
</virtualType> | |
<virtualType name="Vendor\Module\Eav\Setup\EavSetup" type="Magento\Eav\Setup\EavSetup"> | |
<arguments> | |
<argument name="setup" xsi:type="object">Vendor\Module\Setup\Module\DataSetup</argument> |
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
map $http_host $MAGE_RUN_CODE { | |
hostnames; # indicates that values can be hostnames with prefix or suffix mask. | |
default base; | |
*.ch ch; | |
*.de de; | |
*.at at; | |
} | |
server { |
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
node { | |
// Clean workspace before doing anything | |
deleteDir() | |
def hostStage | |
def deployStatus | |
try { | |
stage ('Preparations') { | |
if (BRANCH_NAME == 'develop') { |
OlderNewer