Skip to content

Instantly share code, notes, and snippets.


Armin Vieweg a-r-m-i-n

View GitHub Profile
a-r-m-i-n / symfony-cli-command-without-console
Last active Jun 9, 2021
Using Symfony on CLI without a Console application
View symfony-cli-command-without-console
#!/usr/bin/env php
use App\Entity\User;
use App\Kernel;
use Doctrine\Bundle\DoctrineBundle\Registry;
if (!is_file(dirname(__DIR__).'/vendor/autoload_runtime.php')) {
throw new LogicException('Symfony Runtime is missing. Try running "composer require symfony/runtime".');
a-r-m-i-n / fbled.css
Created May 31, 2021
Ein kombiniertes, herunterladbares Gist mit HTML/JS, um die LEDs einer alten FritzBox komplett zu deaktivieren. Gefunden in diesem Blog-Post:
View fbled.css
header {
a-r-m-i-n / CreateInstanceTrait.php
Created Mar 29, 2021
CreateInstanceTrait for TYPO3 CMS
View CreateInstanceTrait.php
use TYPO3\CMS\Core\Utility\GeneralUtility;
use TYPO3\CMS\Core\Utility\StringUtility;
use TYPO3\CMS\Extbase\Object\ObjectManager;
trait CreateInstanceTrait
/** @return parent */
public static function createInstance()
a-r-m-i-n /
Last active Aug 29, 2020
Example composer.json and DDEV config.yaml for a TYPO3 CMS extension, running in a local environment
$ ddev start
$ ddev composer install
$ ddev composer run typo3
a-r-m-i-n / FaViewHelper.php
Created Mar 25, 2020
Font Awesome ViewHelper (using SVG sprites) for TYPO3 CMS 9+
View FaViewHelper.php
<?php declare(strict_types=1);
namespace Armin\Vieweg\ViewHelpers;
use TYPO3\CMS\Core\Core\Environment;
use TYPO3\CMS\Core\Utility\GeneralUtility;
use TYPO3Fluid\Fluid\Core\Rendering\RenderingContextInterface;
use TYPO3Fluid\Fluid\Core\ViewHelper\AbstractViewHelper;
* Font Awesome SVG ViewHelper
a-r-m-i-n / DeletedFilter.php
Last active Aug 9, 2019 — forked from baptistedonaux/DeletedFilter.php
Soft Delete Symfony/Doctrine
View DeletedFilter.php
namespace Namespace\MyBundle\Repository\Filters;
use Doctrine\ORM\Mapping\ClassMetaData;
use Doctrine\ORM\Query\Filter\SQLFilter;
class DeletedFilter extends SQLFilter
public function addFilterConstraint(ClassMetadata $targetEntity, $targetTableAlias)
a-r-m-i-n / Easy Admin Bundle
Last active May 27, 2020
This document describes the process of Symfony's Easy Admin Bundle, to process the given YAML configuration, with registered **ConfigPass** classes.
View Easy Admin Bundle

Easy Admin Bundle ConfigPass

This document describes the process of Symfony's Easy Admin Bundle, to process the given YAML configuration, with registered ConfigPass classes.

The problem

Those ConfigPasses are collections of private methods, which have e.g. action names hardcoded, so you can't reuse the "config auto-magic" for your new actions.

a-r-m-i-n / GlossaryController.php
Created Feb 27, 2019
TYPO3 Fluid Widget to achieve a Glossary navigation.
View GlossaryController.php
namespace Vendor\Package\ViewHelpers\Widget\Controller;
* This view helper uses the technology of paginate widget but works with arrays
* and the assigned objects don't need the QueryResultInterface.
* @author Armin Vieweg <>
* @license GNU General Public License, version 3 or later
a-r-m-i-n / TYPO3 Extension
Last active Sep 2, 2019
Generic Vagrantfile for TYPO3 extension development
View TYPO3 Extension

TYPO3 Extension Box

Version: 1.2.0


This Vagrantfile ships a handy development environment for TYPO3 extensions. The shell based provision scripts, use Composer to fetch TYPO3 CMS and all required dependencies - for different TYPO3 versions:

  • TYPO3 CMS 8.7 LTS
a-r-m-i-n / halt.bat
Created Mar 11, 2018
Windows Batch file to perform "vagrant halt" on all running machines.
View halt.bat
@echo off
vagrant global-status | awk '/running/{print $1}' | xargs -r -d '\n' -n 1 -- vagrant halt