Skip to content

Instantly share code, notes, and snippets.

#composer requirements
"require-dev": {
"captainhook/captainhook": "^5.25",
"deployer/deployer": "^7.5",
"friendsofphp/php-cs-fixer": "^3.75",
"frosh/shopware-rector": "^0.5.5",
"phpstan/extension-installer": "^1.4",
"phpstan/phpstan-symfony": "^2.0",
"rector/rector": "^2.0",
"shopware/dev-tools": "^1.5",
ubuntu-drivers list;
sudo ubuntu-drivers install;
# install a specific version from the list:
sudo ubuntu-drivers install nvidia:535;
## https://forum.shopware.com/t/bild-als-cover-setzen-bei-mehrfachaenderung/96122/14
## set cover image
UPDATE
product p
LEFT JOIN product_media pm ON (p.id = pm.product_id AND p.version_id = pm.product_version_id AND pm.position = (
SELECT
min(position)
FROM
product_media
WHERE
ddev config --project-type=php --docroot=htdocs --create-docroot --web-working-dir=/var/www/html/ \
--database=mysql:8.0 --php-version=8.2 --nodejs-version=20 --webserver-type=apache-fpm \
--web-environment-add="DATABASE_URL=mysql://db:db@db:3306/db,MAILER_DSN=smtp://localhost:1025?encryption=&auth_mode=,APP_URL=\${DDEV_PRIMARY_URL},APP_DEBUG=1,APP_ENV=dev"
let postData = new FormData(form);
postData.keys().forEach(
(key) => {
console.log(key);
console.log(postData.get(key));
}
);
AuthType Basic
AuthName 'Authentication required'
AuthUserFile /www/htdocs/meinpfad/.htpasswd
# Allow access to excluded diretories
SetEnvIf Request_URI /api noauth=1
Require env noauth
Require env REDIRECT_noauth
Require valid-user
#https://unix.stackexchange.com/questions/570743/cp-rsync-overwrite-if-smaller-backup-original-and-then-overwrite-if-larger
# get the size and filnames of files in '/tmp/A' directory and loop through each file found
ls /tmp/A | while read filename
do
# get the size of file in 'A' directory
sizeA=$( ls -l "/tmp/A/${filename}" | awk '{print $5}')
# get the size of corresponding file in 'B' directory
sizeB=$(ls -l "/tmp/B/${filename}" | awk '{print $5}')
## find files over 500kb and save to file
find ./public/media/ -type f -size +500k >> images-media-05mb.txt;
@steffen-wirth
steffen-wirth / hyva
Last active February 12, 2024 14:28
bin/magento mo:dis Yireo_NextGenImages Yireo_Webp2 Hyva_YireoNextGenImages;
bin/magento mo:dis Facebook_BusinessExtension Openstream_GoogleAnalytics Amasty_RequestQuote Magefan_Blog Hyva_MagefanBlog Divante_Storelocator Amasty_Storelocator;
bin/magento mo:st;
## compile static files watcher
cd app/design/frontend/Openstream/hyva_ch/web/tailwind/;
npm run watch;
/usr/local/bin/php -d memory_limit=-1 /usr/local/bin/composer require hyva-themes/magento2-wysiwyg-svg
#LiNK : https://www.varnish-software.com/developers/tutorials/troubleshooting-varnish/#varnish-is-not-caching
## see log for all / homepage request - start command and then visit site in browser
sudo varnishlog -i ReqUrl -i ReqMethod -i ReqProtocol -I ReqHeader:Host -I ReqHeader:Cookie -I ReqHeader:Authorization -i VCL_call -i VCL_return -q "ReqUrl eq '/'"