Skip to content

Instantly share code, notes, and snippets.

View teiling88's full-sized avatar

Thomas Eiling teiling88

View GitHub Profile
@teiling88
teiling88 / BasicSubscriber.php
Created November 22, 2019 08:13
Template Registration Shopware 5
<?php declare(strict_types=1);
namespace SwagEnterprisePricingEngine\Subscriber;
use Enlight\Event\SubscriberInterface;
class BasicSubscriber implements SubscriberInterface
{
/**
* {@inheritdoc}
@teiling88
teiling88 / docker
Last active September 8, 2017 11:49
docker-compose up app_redis
docker-compose down app_redis
docker-compose rm app_redis
docker ps -a
docker logs 4b1ae63d07bc
docker volume list
fallocate -l 1G /swapfile
chmod 600 /swapfile
mkswap /swapfile
swapon /swapfile
swapon --show
cp /etc/fstab /etc/fstab.bak
echo '/swapfile none swap sw 0 0' | sudo tee -a /etc/fstab
-- find invalide seo urls with not existing articleIds
SELECT COUNT(*) FROM s_core_rewrite_urls scru
LEFT JOIN s_articles sa ON REPLACE(scru.org_path, 'sViewport=detail&sArticle=', '') = sa.id
WHERE scru.org_path LIKE 'sViewport=detail&sArticle=%'
AND sa.id IS NULL
// @codingStandardsIgnoreStart
// @codingStandardsIgnoreEnd
find $DIR -name $ENDUNG -exec echo rm -rv {} \;
INSERT IGNORE s_core_snippets
SELECT null, src.namespace, 16, 107, src.name, src.value, src.created, src.updated, 1
FROM s_core_snippets src WHERE src.shopID=1 AND src.localeID = 108
git rebase -i HEAD~2 (squash) letzten 2 Commits
git rebase -i master alle Commits die im aktuellen Branch mehr enthalten sind als im master
git rebase --continue (nach gelösten Konflikten weiter machen)
git rebase --abort (rebase abrechen)
git push --force-with-lease http://movingfast.io/articles/git-force-pushing/
git pull --rebase origin develop (rebasing)
git branch -d bugfix/fix (lokalen branch löschen)
/backend/Seo/seoSupplier/offset/0/limit/250/shopId/1
/backend/Seo/seoEmotion/offset/0/limit/250/shopId/1
/backend/Seo/seoArticle/offset/0/limit/250/shopId/1
/backend/Seo/seoBlog/offset/0/limit/250/shopId/1
/backend/Seo/seoCategory/offset/0/limit/250/shopId/1
/backend/Seo/seoStatic/offset/0/limit/250/shopId/1
@teiling88
teiling88 / update.sql
Created July 29, 2015 13:47
change thumbnails after sw 5 update
UPDATE s_media_album_settings SET thumbnail_size='200x200;600x600;1280x1280' WHERE albumID='-1' OR albumID='-11';
UPDATE s_media_album_settings SET thumbnail_size='800x800;1280x1280;1920x1920' WHERE albumID='-2' OR albumID='-3';