This file contains hidden or 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
| # filter by request host header | |
| varnishlog -q 'ReqHeader ~ "Host: example.com"' | |
| # filter by request url | |
| varnishlog -q 'ReqURL ~ "^/some/path/"' | |
| # filter by client ip (behind reverse proxy) | |
| varnishlog -q 'ReqHeader ~ "X-Real-IP: .*123.123.123.123"' | |
| # filter by request host header and show request url and referrer header |
This file contains hidden or 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
| location /media/customer/ { deny all; } | |
| location /media/import/ { deny all; } | |
| location /magento_version { deny all; } | |
| location /static { | |
| expires max; | |
| # Remove signature of the static files that is used to overcome the browser cache | |
| location ~ ^/static/version { | |
| rewrite ^/static/(version\d*/)?(.*)$ /static/$2 last; |
This file contains hidden or 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
| location ~ ^/google(.*).html { | |
| alias /data/web/google-verification-files/google$1.html; | |
| } |
This file contains hidden or 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 | |
| $tables = shell_exec('magerun2 db:query "SHOW TABLES"'); | |
| $tables = array_filter(explode(PHP_EOL, $tables), function ($table) { | |
| if (empty($table)) return false; | |
| if (substr($table, -3) === '_cl') return false; | |
| if (substr($table, -8) === '_replica') return false; | |
| if (stripos($table, '_flat_') !== false) return false; | |
| if (stripos($table, '_fulltext_') !== false) return false; | |
| if (stripos($table, 'sequence_') !== false) return false; | |
| return true; |
This file contains hidden or 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 | |
| if (!file_exists('dutch.txt')) { | |
| shell_exec('wget -O dutch.txt https://github.com/OpenTaal/opentaal-wordlist/blob/master/wordlist.txt?raw=true'); | |
| } | |
| $dict = explode("\n", file_get_contents('dutch.txt')); | |
| $blacklisted = ['echo', 'var', 'reviews', 'rating', 'all', 'item', 'int', 'details', 'helper', 'label', 'configurator', 'display', 'var', 'id', 'show', 'a', 'br', 'preview', 'as', 'index', 'content', 'import', 'h', 'am', 'the', 'filter', 'type', 'Google', 'source', 'file', 'x', 'y', 'field', 'html']; | |
| $dict = array_diff($dict, $blacklisted); |
This file contains hidden or 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 VirtualMeetup\ImageOptimization\Console\Command; | |
| use Graze\ParallelProcess\Event\RunEvent; | |
| use Graze\ParallelProcess\PriorityPool; | |
| use Graze\ParallelProcess\RunInterface; | |
| use Magento\Framework\Filesystem\DirectoryList; | |
| use Symfony\Component\Console\Command\Command; | |
| use Symfony\Component\Console\Helper\ProgressBar; |
This file contains hidden or 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 VirtualMeetup\SitemapCrawler\Console\Command; | |
| use Graze\ParallelProcess\Event\RunEvent; | |
| use Graze\ParallelProcess\PriorityPool; | |
| use Graze\ParallelProcess\RunInterface; | |
| use Magento\Framework\Filesystem\Driver\File; | |
| use Magento\Framework\HTTP\Client\Curl; |
This file contains hidden or 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 | |
| /** | |
| * Copyright © Magento, Inc. All rights reserved. | |
| * See COPYING.txt for license details. | |
| */ | |
| use Magento\Framework\App\Bootstrap; | |
| use Magento\Framework\DB\Adapter\AdapterInterface; | |
| use Magento\Framework\DB\Query\Generator; | |
| use Magento\Framework\DB\Select\QueryModifierFactory; |
This file contains hidden or 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 | |
| SHOP_URL=https://yourshop.url | |
| ADMIN_USERNAME=yourusername | |
| ADMIN_PASSWORD=yourpassword | |
| BEARER=$(curl -XPOST -H 'Content-Type: application/json' ${SHOP_URL}/index.php/rest/V1/integration/admin/token -d '{ "username": "${ADMIN_USERNAME}", "password": "${ADMIN_PASSWORD}" }') | |
| curl -XGET -H "Authorization: Bearer ${BEARER}" ${SHOP_URL}/rest/default/schema?services=all | tee swagger.json | |
| docker run --rm -v ${PWD}:/local swaggerapi/swagger-codegen-cli generate -i /local/swagger.json -l php -o /local/ |
This file contains hidden or 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
| // ==UserScript== | |
| // @name Create copy/pastable composer patch definition for vaimo/composer-patches | |
| // @namespace http://elgentos.nl/ | |
| // @version 1.0.0 | |
| // @description Github Magento 2 - create definition for composer patches | |
| // @author Peter Jaap Blaakmeer <peterjaap@elgentos.nl> | |
| // @match https://github.com/*/*/pull/** | |
| // @match https://github.com/*/*/commit/** | |
| // @require http://code.jquery.com/jquery-3.4.1.min.js | |
| // @grant GM_addStyle |