Give a brief description of the extension here.
- List any usage and deployment instructions
- Consider including any preference overrides that may conflict with other extension
I recently had the following problem:
We didn't want to open the MySQL port to the network, but it's possible to SSH from the Jenkins machine to the MySQL machine. So, basically you would do something like
ssh -L 3306:localhost:3306 remotehost
| const fs = require('fs'); | |
| const path = require('path'); | |
| const assetManifestPath = path.join(__dirname, 'build/asset-manifest.json'); | |
| let assetManifest = fs.readFileSync(assetManifestPath); | |
| assetManifest = JSON.parse(assetManifest)['files']; | |
| const indexFilePath = path.join(__dirname, 'build/index.html'); | |
| const BUILD_PATH = path.join(__dirname, 'build/useful-asset-manifest.json'); | |
| // Filter paths that exists in the create-react-app generated `build/asset-manifest.json` and use the path from that file because that can contain the "homepage" prefix from package.json. |
| # Magento 2 Sandbox Snippet - You can copy and paste into any shell in a Magento root directory | |
| # Extended: https://docs.classyllama.net/disciplines/engineering/magento/sandbox-file-m2 | |
| set +H # disable history expansion | |
| PHP_CODE=$(cat <<'PHP_CODE' | |
| <?php | |
| header('Content-type: text/plain'); | |
| require __DIR__ . '/app/bootstrap.php'; | |
| $bootstrap = \Magento\Framework\App\Bootstrap::create(BP, $_SERVER); | |
| # rsync with sudo | |
| rsync -av \ | |
| --rsync-path="sudo -u www-data rsync" \ | |
| -e 'ssh -o StrictHostKeyChecking=no' | |
| path_to_local_data/ user_name@example.com:/var/www/ | |
| # rsync media between two remotes that can not talk to each other | |
| # this creates a port (50000) on the origin server that establishes a tunnel between the origin and destination through | |
| # your computer, as long as your computer can access both servers you can rsync the files between the two |
| #!/bin/bash | |
| # This script crawls all urls in a /sitemap.xml file and loads them, effectively priming the cache | |
| # Usage: ./warm_cache.sh www.example.com | |
| time wget --quiet https://$1/sitemap.xml --output-document - | \ | |
| egrep -o "https?://[^<]+" | \ | |
| grep $1 | \ | |
| grep -v "jpg" | \ | |
| xargs -i -d '\n' curl --output /dev/null --silent --write-out '%{http_code} %{time_total}ms %{url_effective} \n' {} |
| # You can find the current list of casks on github, and the one for vagrant here: | |
| # https://github.com/Homebrew/homebrew-cask/blob/master/Casks/vagrant.rb | |
| # From there you may be able to load the history of that file and lookup previous versions of | |
| # the cask which would be related to previous versions of vagrant as indicated in the cask definition file. | |
| # If the github history of the file fails you can search through recent commit history and find a commit prior | |
| # to the version change you are trying to avoid and get the commit hash before the change and use it to locate | |
| # a previous version of the cask file. | |
| # current (master branch) casks: |
| # TODO: Update this with appropriate url | |
| Sitemap: https://www.example.com/sitemap.xml | |
| User-agent: * | |
| # Paths (clean URLs) | |
| Disallow: /index.php/ | |
| Disallow: /catalog/product_compare/ | |
| # Need to allow these urls paths to be indexed, since M2 commonly includes these links in sitemap.xml | |
| # Disallow: /catalog/category/view/ |
| #!/bin/bash | |
| # stop on errors | |
| set -e | |
| # turn on debugging if running into issues | |
| #set -x | |
| # This script sends a nightly email, showing errors, grouped and sorted by count. | |
| # Getting these errors emailed can be especially useful for the first few weeks after launching a new Magento site. | |
| # Assumptions: |