#!/bin/bash
echo "Quick analysis incident $1"
echo "\nTCP connections from specific IPs"
cat $1/*tcp-connections.txt | grep -v 127.0.0.1 | awk '{print $5}' | cut -d ':' -f1 | sort | uniq -c | sort -n | tail -n 20
echo "\nCPU-intensive processes:"
sort -nk4 $1/*process-list.txt | tail -n3
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 | |
| set_time_limit(0); | |
| //THIS SCRIPT JUST INITIALS THE PROFILE TO BE RUN VIA MAGENTO ADMIN "RUN PROFILE IN POPUP". Its the same thing as click just via this file that you can run via cron | |
| $profileId = $argv[1]; // SYSTEM - IMPORT/EXPORT - DATAFLOW PROFILES PROFILES <-- you need to go into your magento admin and grab the exact profile ID | |
| require_once 'app/Mage.php'; | |
| umask(0); | |
| Mage::app()->setCurrentStore(Mage_Core_Model_App::ADMIN_STORE_ID); |
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
| find app/design/frontend/Limburgia/default -maxdepth 1 -type d | grep -vE "web|etc|i18n|media" | |
| app/design/frontend/Limburgia/default | |
| app/design/frontend/Limburgia/default/Magento_Customer | |
| app/design/frontend/Limburgia/default/Magento_ConfigurableProduct | |
| app/design/frontend/Limburgia/default/Magento_LayeredNavigation | |
| app/design/frontend/Limburgia/default/Magento_ReCaptchaCustomer | |
| app/design/frontend/Limburgia/default/Magento_Wishlist | |
| app/design/frontend/Limburgia/default/Magento_Checkout | |
| app/design/frontend/Limburgia/default/Magento_CatalogSearch | |
| app/design/frontend/Limburgia/default/Magento_Tax |
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
| { | |
| "exception":{ | |
| "values":[ | |
| { | |
| "type":"ReferenceError", | |
| "value":"Unable to process binding \"if: function(){return isMsrpApplicable($row()) }\"\nMessage: isMsrpApplicable is not defined", | |
| "stacktrace":{ | |
| "frames":[ | |
| { | |
| "colno":30, |
Put this in your ~/.zshrc. Be sure to have your API token in IMGIX_API_TOKEN;
export IMGIX_API_TOKEN=yourtokenhere
purge() {
URL=$1
echo "Purging ${URL}"
Check which font weights are used. I used this to determine which Google Fonts I want to include.
Before;
https://fonts.googleapis.com/css2?family=Lato:wght@100;200;300;400;500;600;700;800;900&display=swap
You only need Docker installed. Add to ~/.zshrc, or ~/.bashrc, or whatever you're using;
lh() {
mkdir -p lighthouse && \
docker run --rm -it -v "$PWD":/usr/src -w /usr/src markhobson/node-chrome /bin/bash -c "npm i -g lighthouse && lighthouse --enable-error-reporting --chrome-flags=\"--headless --no-sandbox\" $1 --output html --output-path ./lighthouse/index.html" && \
open lighthouse/index.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
| server1: | |
| user: peterjaap | |
| password: | |
| port: 3306 | |
| host: db | |
| server2: | |
| user: peterjaap | |
| password: | |
| port: 3306 | |
| host: db |
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 | |
| composer create-project --repository-url=https://repo.magento.com/ magento/project-community-edition magento2 | |
| cd magento2 | |
| DB_NAME=dbnamehere php bin/magento setup:install --base-url=http://elgentos.magento2.localhost/ --db-host=db --db-name=${DB_NAME} --db-user=peterjaap --admin-firstname=PJ --admin-lastname=Blaakmeer --admin-email=peterjaap@elgentos.nl --admin-user=peterjaap --admin-password=peterjaap123 --language=en_US --currency=EUR --timezone=Europe/Amsterdam --use-rewrites=1 --backend-frontname=admin --amqp-host=rabbitmq --amqp-port=5672 --amqp-user=guest --amqp-password=guest --amqp-virtualhost="/" --search-engine=elasticsearch7 --elasticsearch-host=elasticsearch7 --elasticsearch-port=9200 --elasticsearch-enable-auth=0 --elasticsearch-index-prefix=magento2_${DB_NAME} --elasticsearch-timeout=15 --use-sample-data | |
| php bin/magento deploy:mode:set developer |
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
| # Magento | |
| php bin/magento config:set dev/css/minify_files 0 --lock-env | |
| php bin/magento config:set dev/css/merge_css_files 0 --lock-env | |
| php bin/magento config:set dev/js/merge_files 0 --lock-env | |
| php bin/magento config:set dev/js/enable_js_bundling 0 --lock-env | |
| php bin/magento config:set dev/js/minify_files 0 --lock-env | |
| php bin/magento config:set dev/template/minify_html 0 --lock-env | |
| php bin/magento config:set dev/static/sign 0 --lock-env | |
| php bin/magento config:set sales_email/general/async_sending 0 --lock-env | |
| php bin/magento config:set payment/checkmo/active 1 --lock-env |