Skip to content

Instantly share code, notes, and snippets.

View vanWittlaer's full-sized avatar

Benny Poensgen vanWittlaer

View GitHub Profile
@vanWittlaer
vanWittlaer / dbdump5.sh
Last active July 15, 2021 11:40
A simple bash script to dump a Shopware 5 database using settings from config.php
#!/usr/bin/env bash
#
# usage: ./dbdump5.sh <shopware project root dir> <target file for dump>
#
# note this script requires PHP and gzip
#
root=${1:-/var/www/shopware/shopware}
target=${2:-test.sql.gz}
config=${3:-php}
#
# Being stuck by PhpStorm indexing on all CPUs? On Ubuntu, you can limit PhpStorm to using just say 4 of your CPUs by amending
# the Exec directive with 'taskset -a -c 0,1,2,3' in its desktop file (usually located in /usr/share/applications)
[Desktop Entry]
Version=1.0
Type=Application
Name=PhpStorm
Icon=/opt/PhpStorm-212.5080.71/bin/phpstorm.svg
Exec="taskset -a -c 0,1,2,3 /opt/PhpStorm-212.5080.71/bin/phpstorm.sh" %f
Comment=Lightning-smart PHP IDE
@vanWittlaer
vanWittlaer / install.sh
Last active May 17, 2025 14:30
Shopware 6 - ddev Quick Install
#!/usr/bin/env bash
# What it does:
# - Creates a local Shopware installation using the Symfony Flex template for local development of client projects
# - Prerequisites: ddev installed on your machine, see https://ddev.com/get-started/
#
# How to use:
# - create a project folder
# - copy this file into the project folder
# - chmod +x install.sh
@vanWittlaer
vanWittlaer / sample-api-with-query.txt
Created February 28, 2024 09:57
Append query to Shopware API requests
Shopware admin API requests can be enriched with a query.
For example, to retrieve only snippets for a particular snippet set, use this query:
{{HOST}}/api/snippet?query[0][query][type]=equals&query[0][query][field]=setId&query[0][query][value]=685f610ee07544feb28b6a5abf38cf7c
@vanWittlaer
vanWittlaer / gist:662223488ac68d0fea7f59206c4bba84
Created November 19, 2024 10:30
Composer - update all recipes at once
composer symfony:sync-recipes --force
-- list all docker log entries with particular status code
SELECT
STRFTIME(TO_TIMESTAMP(ts )::TIMESTAMP,'%Y-%m-%d %H:%M:%S') AS datetime,
request.headers."X-Real-Ip" as source,
request.method,
status,
request.host as target,
request.uri,
request.headers."User-Agent" as userAgent
FROM logs