Skip to content

Instantly share code, notes, and snippets.

View htuscher's full-sized avatar

Hans Tuscher htuscher

View GitHub Profile
@htuscher
htuscher / devenv.nix
Created April 25, 2023 08:24
Devenv Permission issues
{ pkgs, lib, config, ... }:
{
certificates = [
"shopware.dev"
];
hosts."shopware.dev" = "127.0.0.1";
packages = [
@htuscher
htuscher / keybase.md
Created November 16, 2022 10:29
keybase.md

Keybase proof

I hereby claim:

  • I am hhoechtl on github.
  • I am htuscher (https://keybase.io/htuscher) on keybase.
  • I have a public key ASDRch2Q2qmqSKqz12su02CIzIfFYSn_5x8r_VvngMNXgQo

To claim this, I am signing this object:

@htuscher
htuscher / Dockerfile
Created March 14, 2022 09:52
Keycloak Docker
FROM jboss/keycloak:15.0.2
ENV KEYCLOAK_WELCOME_THEME=mytheme
ENV KEYCLOAK_DEFAULT_THEME=mytheme
COPY theme /opt/jboss/keycloak/themes/mytheme
@htuscher
htuscher / fix_bm_prices.php
Created February 5, 2021 09:10
Fix WooCommerce B2B Market Prices after import on variants
<?php
define('DB_NAME', 'wordpress');
/** MySQL database username */
define('DB_USER', 'dbuser');
/** MySQL database password */
define('DB_PASSWORD', 'dbpassword');
/** MySQL hostname */
define('DB_HOST', 'localhost');
@htuscher
htuscher / worker.conf
Created January 14, 2021 18:15
The entrypoint of `webdevops/php-nginx:7.4` allows to start a different entrypoint script. The default starts the supervisord but we can switch to a worker.
# Copy this file to /opt/docker/etc/supervisor.d/worker.conf
[group:worker]
programs=queue-worker
priority=25
[program:queue-worker]
command = /app/bin/console messenger:consume default --time-limit=180 -vv
user = application
process_name=%(program_name)s
@htuscher
htuscher / FetchModeHelper.php
Created September 3, 2020 20:00
Doctrine DBAL Fetchmode helper FETCH_KEY_PAIR FETCH_GROUP
<?php declare(strict_types=1);
namespace Shopware\Core\Framework\DataAbstractionLayer\Doctrine;
class FetchModeHelper
{
/**
* User-land implementation of PDO::FETCH_KEY_PAIR
*/
public static function keyPair(array $result): array
@htuscher
htuscher / microk8s.md
Last active April 24, 2023 12:01
MicroK8s on Hetzner Cloud

Installation

apt-get install snapd
snap install microk8s --classic --channel=1.18/stable
microk8s enable dns dashboard registry helm3 ingress storage

Dashboard

@htuscher
htuscher / ClearCacheCommand.php
Created March 25, 2020 16:05
Override Symfony clear cache command for Shopware6
<?php
declare(strict_types=1);
/***************************************************************
* Copyright notice
*
* (c) 2020 Hans Hoechtl <hhoechtl@1drop.de>
* All rights reserved
***************************************************************/
namespace Onedrop\Platform\Command;
@htuscher
htuscher / post_deploy.sh
Created March 25, 2020 16:02
Shopware 6 post deployment steps
#!/usr/bin/env bash
bin/console cache:clear
bin/console database:migrate --all
bin/console plugin:refresh
# Ensure plugins are installed and active
bin/console plugin:install --activate FroshPlatformMailArchive
bin/console plugin:install --activate FroshPlatformTemplateMail
@htuscher
htuscher / root360 shopware gitlab-ci.md
Last active December 3, 2019 14:44
Root360 Deployment Shopware Gitlab CI

Repository structure

.
├── README.md
├── _dev-ops
│   └── deploy
|       ├── install.sh
│       └── post-hook.d
│           └── 10_upgrade.sh