Skip to content

Instantly share code, notes, and snippets.

View dmitryd's full-sized avatar

Dmitry Dulepov dmitryd

View GitHub Profile
dmitryd / normalizer.diff
Created March 27, 2021 09:40
TYPO3 9.5 patch for #93764: slugs in non-normalized Unicode can produce incorrect urls
commit 0657788b1e5e0b5ea382083637438fc50c22baf8
Author: Dmitry Dulepov <>
Date: Wed Mar 17 13:47:07 2021 +0300
[BUGFIX] Slugs in non-normalized Unicode can produce incorrect urls
diff --git a/typo3/sysext/core/Classes/DataHandling/SlugHelper.php b/typo3/sysext/core/Classes/DataHandling/SlugHelper.php
index dccc65af7f..fb4e8ca46e 100644
--- a/typo3/sysext/core/Classes/DataHandling/SlugHelper.php
+++ b/typo3/sysext/core/Classes/DataHandling/SlugHelper.php
dmitryd / docker-compose.solr.yaml
Last active March 27, 2021 11:33
Ddev yaml file for using solr in TYPO3
# To access Solr after it is installed:
# - The Solr admin interface will be accessible at:
# http://<projectname>
# For example, if the project is named "myproject" the hostname will be:
# - To access the Solr container from the web container use:
# http://solr:8983/solr/
version: '3.6'
dmitryd / ContentButtonBarHook.php
Created August 17, 2020 14:42
Restore split button for TYPO3 v9 forms
namespace Vendor\Extension\Hook;
use TYPO3\CMS\Backend\Template\Components\ButtonBar;
use TYPO3\CMS\Backend\Template\Components\Buttons\InputButton;
use TYPO3\CMS\Backend\Template\Components\Buttons\LinkButton;
use TYPO3\CMS\Core\Http\ServerRequest;
use TYPO3\CMS\Core\Imaging\Icon;
use TYPO3\CMS\Core\Imaging\IconFactory;
dmitryd /
Created August 11, 2019 08:34
Replace git email in all subdirectories
#!/usr/bin/env bash
for f in `grep -Rl --include=config '' .` ; do sed -i 's/' "$f" ; done
namespace Vendor\Extension\Storage;
use TYPO3\CMS\Extbase\Persistence\Generic\Qom\SourceInterface;
use TYPO3\CMS\Extbase\Persistence\Generic\Storage\Typo3DbQueryParser;
* This class allows ordering by 'FIELD' SQL statement.
* @author Dmitry Dulepov <>
dmitryd /
Created December 14, 2018 09:06
Toggles swap for the composer on Linux
# Must be run as root!
# Source:
if [ -f /var/swap.1 ] ; then
/sbin/swapoff /var/swap.1
rm /var/swap.1
echo "Swap is off"
dmitryd / validate-yaml.txt
Last active February 8, 2022 10:15
Validate YAML file using Python one-liner
python -c 'import yaml,sys;yaml.safe_load(sys.stdin)' < file.yml
Needs "pip install pyyaml".
dmitryd / Dockerfile
Created June 27, 2017 07:41
Dockerfile for mkpasswd. This fixes a problem when no suitable mkpasswd is available on OS X that can do sha-512 method.
# In ~/.profile: alias "mkpasswd=docker run -i -t mkpasswd"
FROM debian:stretch
RUN apt-get update && apt-get install -y --no-install-recommends --no-install-suggests whois
CMD ["/usr/bin/mkpasswd", "-m", "sha-512"]
dmitryd / .phpstorm.meta.php
Last active April 19, 2017 08:00
Let PhpStorm recognise types of objects created by GeneralUtility::makeInstance(), ObjectManager::get(), etc
* This file configures factory methods in TYPO3 CMS.
* The file should be dropped to project root. You may need
* to restart PhpStorm.
* PhpStorm will now correctly recognise types of objects
* returned by TYPO3 methods listed below.
* (c) 2017 Dmitry Dulepov <>
dmitryd / FormConverterService.php
Last active July 12, 2016 15:36
Fix Powermail convertor for records with sys_language_uid>0 and l18n_parent=0
namespace DmitryDulepov\PowermailConversionFix\Xclass;
* Copyright notice
* (c) 2016 Dmity Dulepov <>
* All rights reserved
* This script is part of the TYPO3 project. The TYPO3 project is
* free software; you can redistribute it and/or modify