Skip to content

Instantly share code, notes, and snippets.

View teiling88's full-sized avatar

Thomas Eiling teiling88

View GitHub Profile
-- 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
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
@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
@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}