Skip to content

Instantly share code, notes, and snippets.

View smichaelsen's full-sized avatar
🥋
Changing the world in code

Sebastian Michaelsen smichaelsen

🥋
Changing the world in code
View GitHub Profile
@smichaelsen
smichaelsen / console.js
Created August 7, 2020 11:29
F1TV Cinema Mode
document.querySelector('#desktop-navigation-header').remove();
document.querySelector('.wXPTD').style.paddingTop = '0';
document.querySelector('._28ubt').style.gridTemplateColumns = 'auto 0';
document.querySelector('._28ubt').style.gridTemplateRows = 'auto 0';
document.querySelector('._28ubt').style.height = '100vh';
--- a/typo3/sysext/backend/Classes/Utility/BackendUtility.php
+++ b/typo3/sysext/backend/Classes/Utility/BackendUtility.php
@@ -2989,6 +2989,31 @@
}
/**
+ * Creates a link to create a record translation on demand and directly edit it
+ *
+ * @param string $table
+ * @param int $defaultLanguageRecordUid
===================================================================
--- public/typo3conf/ext/news/Classes/Service/SlugService.php
+++ public/typo3conf/ext/news/Classes/Service/SlugService.php
@@ -221,60 +221,50 @@
$queryBuilder = $connection->createQueryBuilder();
// Get entries to update
+ $execTimeParameter = $queryBuilder->createNamedParameter($GLOBALS['EXEC_TIME'], \PDO::PARAM_INT);
+ $emptyStringParameter = $queryBuilder->createNamedParameter('', \PDO::PARAM_STR);
$statement = $queryBuilder
@smichaelsen
smichaelsen / temporary_performance_patch.php
Created December 9, 2020 14:22
Put this in your sitepackage Configuration/TCA/Overrides/
<?php
// this mitigates the core bug #92863 and is taken from https://github.com/TYPO3/TYPO3.CMS/commit/db0d7549647ed5326f4affc84b907dd0e397c844
// this file can be removed entirely after updating to TYPO3 10.4.11
$GLOBALS['TCA']['sys_file_metadata']['columns']['l10n_parent']['config'] = [
'type' => 'group',
'internal_type' => 'db',
'allowed' => 'sys_file_metadata',
'size' => 1,
test
OS Information: Darwin Sebastians-MacBook-Pro.local 20.3.0 Darwin Kernel Version 20.3.0: Thu Jan 21 00:07:06 PST 2021; root:xnu-7195.81.3~1/RELEASE_X86_64 x86_64
DDEV-Local version v1.17.1
architecture amd64
db drud/ddev-dbserver-mariadb-10.3:v1.17.0
dba phpmyadmin:5
ddev-ssh-agent drud/ddev-ssh-agent:v1.17.0
docker 20.10.5
docker-compose 1.29.0
os darwin
router drud/ddev-router:v1.17.0
2021-01-02: 333
2021-01-03: 333
2021-01-04: 369
2021-01-05: 374
2021-01-06: 375
2021-01-07: 382
2021-01-08: 435
2021-01-09: 445
2021-01-10: 458
2021-01-11: 481

Keybase proof

I hereby claim:

  • I am smichaelsen on github.
  • I am smichaelsen (https://keybase.io/smichaelsen) on keybase.
  • I have a public key ASCw1xX6QKV_bSkC77_NwgAtXPlJw-KmI_tM933Hi4cncgo

To claim this, I am signing this object:

<?php
declare(strict_types=1);
namespace MyVendor\MyExt\ViewHelpers;
use TYPO3\CMS\Core\Utility\GeneralUtility;
use TYPO3Fluid\Fluid\Core\Rendering\RenderingContextInterface;
use TYPO3Fluid\Fluid\Core\ViewHelper\AbstractViewHelper;
<?php
namespace MyVendor\MyPackage\Service;
use TYPO3\CMS\Core\Core\Environment;
use TYPO3\CMS\Core\Database\ConnectionPool;
use TYPO3\CMS\Core\Utility\GeneralUtility;
/**
* Use in ext_localconf.php with ExtensionManagementUtility::addTypoScript()