Skip to content

Instantly share code, notes, and snippets.

@Mabahe
Mabahe / [FEATURE]_EXT_form_-_add_file_size_validator.patch
Last active May 9, 2019 04:37
TYPO3 8.7.20 Backport for typo3/cms-form: [FEATURE] EXT:form - add file size validator
Index: Classes/Mvc/ProcessingRule.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- Classes/Mvc/ProcessingRule.php (date 1540895975000)
+++ Classes/Mvc/ProcessingRule.php (date 1543499098000)
@@ -143,6 +143,18 @@
$this->validator->addValidator($validator);
}
<?php
// INPUT: phpMyAdmin xml-dump
// HOW TO: on CLI: php dump-to-dataset.php dumpfile.xml
// OUTPUT: dumpfile.xmldataset.xml
$xsl = "<xsl:stylesheet version='1.0' xmlns:xsl='http://www.w3.org/1999/XSL/Transform'>
<xsl:template match='/'>
<dataset><xsl:text>&#xa;</xsl:text>
<xsl:for-each select='pma_xml_export/database/table'>
@Mabahe
Mabahe / redirects_realurl2core.sql
Created March 15, 2018 14:08
Migrate realurl redirects to sys_redirect (TYPO3 9 core)
INSERT INTO `sys_redirect` (source_path,target,hitcount,target_statuscode,source_host) SELECT CONCAT('/',url),destination,counter,301,d.domainName FROM `tx_realurl_redirects` r LEFT JOIN sys_domain d ON r.domain_limit = d.uid;
UPDATE sys_redirect SET source_host = '*' WHERE source_host = '';
@Mabahe
Mabahe / migrate_repo.sh
Created February 10, 2016 10:36 — forked from mariozig/migrate_repo.sh
Migrate repo from GitLab to GitHub Full blog post @ http://ruby.zigzo.com/2015/03/23/moving-from-gitlab-to-github/
# Assume we are in your home directory
cd ~/
# Clone the repo from GitLab using the `--mirror` option
$ git clone --mirror git@your-gitlab-site.com:mario/my-repo.git
# Change into newly created repo directory
$ cd ~/my-repo.git
# Push to GitHub using the `--mirror` option. The `--no-verify` option skips any hooks.
#!/bin/bash
#
# This script will
# * fire up a ramdisk
# * start a mysql server using it as storage
# * copying your typo3 database to ram
# * run the tests
# * clean up
#
# use -k as parameter to clean-up after a failed run
@Mabahe
Mabahe / gist:6038018
Last active December 19, 2015 23:59
Solution for indexing sys_category in ext:solr in TYPO3 with unmerged https://review.typo3.org/#/c/22415/ and unfixed http://forge.typo3.org/issues/44961
plugin.tx_solr.index.queue {
pages.fields {
tags_textM = SOLR_MULTIVALUE
tags_textM {
cObject = CONTENT
cObject {
table = pages
select {
uidInList = this
pidInList = 0