**Open up your terminal/SSH and edit below file:
** nano ~/.bashrc
Use sudo command to edit file if you logged in with non-sudo user
Save the below lines at the end of .bashrc file
parse_git_branch() {| // Use Gists to store code you would like to remember later on | |
| console.log(window); // log the "window" object to the console |
| { | |
| // Use IntelliSense to learn about possible attributes. | |
| // Hover to view descriptions of existing attributes. | |
| // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 | |
| "version": "0.2.0", | |
| "configurations": [ | |
| { | |
| "type": "chrome", | |
| "request": "launch", | |
| "name": "Launch Chrome", |
| <?php | |
| use Magento\Framework\App\Bootstrap; | |
| require __DIR__ . '/app/bootstrap.php'; | |
| $params = $_SERVER; | |
| $bootstrap = Bootstrap::create(BP, $params); | |
| $obj = $bootstrap->getObjectManager(); |
| <?php | |
| namespace Vendor\Module\Plugin; | |
| class CsrfValidatorSkip | |
| { | |
| /** | |
| * @param \Magento\Framework\App\Request\CsrfValidator $subject | |
| * @param \Closure $proceed | |
| * @param \Magento\Framework\App\RequestInterface $request | |
| * @param \Magento\Framework\App\ActionInterface $action |
| <?php | |
| use Magento\Framework\App\Bootstrap; | |
| require __DIR__ . '/app/bootstrap.php'; | |
| $bootstrap = Bootstrap::create(BP, $_SERVER); | |
| $obj = $bootstrap->getObjectManager(); | |
| // set frontend scope - necessary | |
| /** @var \Magento\Framework\App\State $state */ |
**Open up your terminal/SSH and edit below file:
** nano ~/.bashrc
Use sudo command to edit file if you logged in with non-sudo user
Save the below lines at the end of .bashrc file
parse_git_branch() {Below is the M2 virtual hosts config file in /etc/nginx/sites-available/m2.m235p1.local.conf
server {
listen 80;
server_name m2.m235p1.local;
set $MAGE_ROOT /var/www/html/m2235-p1;
# set $MAGE_MODE production;
include /var/www/html/m2235-p1/nginx.conf.sample;
| <?php | |
| use Magento\Framework\App\Bootstrap; | |
| use Magento\Framework\DataObject; | |
| require __DIR__ . '/app/bootstrap.php'; | |
| $bootstrap = Bootstrap::create(BP, $_SERVER); | |
| $obj = $bootstrap->getObjectManager(); | |
| // set frontend scope - necessary |
| ; Run mailcatcher | |
| ; In Magento 2, Check Disable Email Communications is No | |
| ; https://php.net/smtp-port | |
| smtp_port = 1025 | |
| sendmail_path = /usr/bin/env /usr/local/bin/catchmail --smtp-ip 127.0.0.1 -f [email protected] |
| #!/usr/bin/env bash | |
| if ! test -f /etc/php/8.1/fpm/conf.d/20-xdebug.ini && ! test -f /etc/php/8.1/cli/conf.d/20-xdebug.ini; then | |
| echo " | |
| # | |
| # Xdebug is not enabled | |
| # | |
| "; | |
| /usr/bin/php8.1 -v | |
| exit |