Skip to content

Instantly share code, notes, and snippets.

View eliashaeussler's full-sized avatar
🐛
Out there, looking for bugs.

Elias Häußler eliashaeussler

🐛
Out there, looking for bugs.
View GitHub Profile
@ruudk
ruudk / README.md
Created December 8, 2022 15:35
How to find the files that are the slowest to analyze with PHPStan?

How to find the files that are the slowest to analyze with PHPStan?

For us, PHPStan became a bit slower with every release. We have a very large codebase with 10.000+ classes. There seem to be a few known issues related to big arrays.

See: phpstan/phpstan#8353 phpstan/phpstan#8146

To understand which files are problematic we run the following command:

@s2b
s2b / deploy.yaml
Last active November 24, 2022 10:03
TYPO3 Deployment with Deployer7
import:
- recipe/common.php
- contrib/rsync.php
- contrib/cachetool.php
config:
shared_files:
- .env
shared_dirs:
- var
@heiglandreas
heiglandreas / ci-fail.yml
Last active March 26, 2023 13:03
Patch-Coverage as GitHub Action
jobs:
patch-coverage:
# Fail when untested lines are found
steps:
- name: "Install PHP"
uses: "shivammathur/setup-php@v2"
with:
tools: "phive"
coverage: "xdebug"
- name: "Install tools"
@xperseguers
xperseguers / README.md
Last active March 23, 2024 18:21
Create composer patch from a pending TYPO3 patch on Gerrit

Following structure is expected for your TYPO3 project (adapt script if it differs):

.
├── composer.json
├── composer.lock
├── patches
│   ├── ...
│   └── ...
└── scripts
@peterhurford
peterhurford / install_xelatex_on_mac.txt
Last active April 16, 2024 04:20
How to install latex and xelatex on Mac so that Jupyter "Download as PDF" will work
brew install pandoc
brew tap homebrew/cask
brew install --cask basictex
eval "$(/usr/libexec/path_helper)"
# Update $PATH to include `/usr/local/texlive/2022basic/bin/universal-darwin`
sudo tlmgr update --self
sudo tlmgr install texliveonfly
sudo tlmgr install xelatex
sudo tlmgr install adjustbox
sudo tlmgr install tcolorbox
@vertexvaar
vertexvaar / SomeCommand.php
Last active October 21, 2022 15:55
Symfony Console mulitple subprocess status bar with overall progress and message
<?php
use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Helper\ProgressBar;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\ConsoleOutput;
use Symfony\Component\Console\Output\OutputInterface;
use TYPO3\CMS\Core\Database\ConnectionPool;
use TYPO3\CMS\Core\Utility\GeneralUtility;
@froemken
froemken / docker-compose.override.yaml
Last active August 8, 2022 15:00
How to exclude typo3temp directory from ddev to get more performance
# Move typo3temp into RAM-Disk. Do not sync vendor and TYPO3-Directory.
# For MAC: 'nocopy' will only work correct, if nfs_mount_enabled is true
version: '3.6'
services:
web:
volumes:
- type: tmpfs
tmpfs:
size: 268435456
# TYPO3 8
@einpraegsam
einpraegsam / ReadableDateViewHelper.php
Created July 24, 2018 14:28
ReadableDateViewHelper to show a date in TYPO3 Fluid with a readable date like: "2 Minutes ago", "4 hours ago", "2 days ago" or a date. Tipp: use a normal date viewhelper date in a title-attribute in a wrapping (e.g.) span tag to have a exact date and time while hovering the readable date.
<?php
declare(strict_types=1);
namespace In2code\Lux\ViewHelpers\Format;
use TYPO3\CMS\Extbase\Utility\LocalizationUtility;
use TYPO3Fluid\Fluid\Core\ViewHelper\AbstractViewHelper;
/**
* Class ReadableDateViewHelper
*