#!/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 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
DELETE FROM core_config_data WHERE config_id IN (SELECT config_id | |
FROM (SELECT DUPS.* | |
FROM core_config_data ORIG | |
LEFT JOIN core_config_data DUPS | |
ON ORIG.path = DUPS.path AND (ORIG.value = DUPS.value OR (ORIG.value IS NULL AND DUPS.value IS NULL)) | |
AND DUPS.scope != "default" AND DUPS.scope_id != 0 | |
WHERE ORIG.scope = "default" | |
AND ORIG.scope_id = 0 | |
AND DUPS.path IS NOT NULL) as tmp) |
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 | |
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 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 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 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 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 |