Skip to content

Instantly share code, notes, and snippets.

View DavidBruchmann's full-sized avatar
💭
It's all about compatibility

David Bruchmann DavidBruchmann

💭
It's all about compatibility
  • Webdevelopment Barlian
  • Bandung, West Java, Indonesia
View GitHub Profile
@DavidBruchmann
DavidBruchmann / t3d.php
Created October 10, 2023 12:41 — forked from garvinhicking/t3d.php
TYPO3 T3D uncompress / extract / deflate / extrahieren / entpacken
<?php
# Execute:
# php -d memory_limit=2G t3d.php file.t3d > output.txt
$fd = fopen($argv[1], 'rb');
function getNextFilePart($fd, $unserialize = false, $name = '') {
$headerLength = 32 + 1 + 1 + 1 + 10 + 1;
$headerString = fread($fd, $headerLength);
if (empty($headerString)) {
echo 'File does not contain data for "' . $name . '"';
@DavidBruchmann
DavidBruchmann / meta-tags.md
Last active May 26, 2023 05:32 — forked from lancejpollard/meta-tags.md
Complete List of HTML Meta Tags

Copied from http://code.lancepollard.com/complete-list-of-html-meta-tags/

Basic HTML Meta Tags

<meta name="keywords" content="your, tags"/>
<meta name="description" content="150 words"/>
<meta name="subject" content="your website's subject">
<meta name="copyright"content="company name">
<meta name="language" content="ES">
## Configuration options with # in front are not active and they were
## valid at install time. Updating the package does not update this file
## automatically.
## Latest options listed at:
## https://gitlab.com/gitlab-org/omnibus-gitlab/blob/master/files/gitlab-config-template/gitlab.rb.template
## Url on which GitLab will be reachable.
## For more details on configuring external_url see:
## https://gitlab.com/gitlab-org/omnibus-gitlab/blob/master/doc/settings/configuration.md#configuring-the-external-url-for-gitlab
@DavidBruchmann
DavidBruchmann / TypoScript.xml
Created May 13, 2022 14:02 — forked from janikvonrotz/TypoScript.xml
TypoScript Syntax Highlight #Typo3 #NotepadPlusPlus #XML
<NotepadPlus>
<?xml version="1.0" encoding="UTF-8" ?>
<AutoComplete>
<KeyWord name="absRefPrefix" />
<KeyWord name="accessibility" />
<KeyWord name="accessKey" />
<KeyWord name="ACT" />
<KeyWord name="ACTIFSUB" />
<KeyWord name="ACTIFSUBRO" />
<KeyWord name="ACTRO" />
@DavidBruchmann
DavidBruchmann / gist:598fc0ebe92efd6f18a7cf6bfbaf7e96
Last active January 28, 2022 18:10 — forked from alexsegura/gist:9895452
Get MySQL error code with Doctrine DBAL
<?php
protected function executeQueryBuilder($queryBuilder, string $debugHeader)
{
$resource = null;
try {
$resource = $queryBuilder->execute();
} catch (\Doctrine\DBAL\DBALException $e) {
$previous = $e->getPrevious();
@DavidBruchmann
DavidBruchmann / .gitattributes
Last active January 26, 2022 10:26 — forked from dpalomar/.gitattributes
Fixing CRLF with gitattributes
# Handle line endings automatically for files detected as text
# and leave all files detected as binary untouched.
* text=auto
# Force the following filetypes to have unix eols, so Windows does not break them
*.* text eol=lf
# Windows forced line-endings
/.idea/* text eol=crlf
@DavidBruchmann
DavidBruchmann / ConvertApplicationAreaValuesToBinaryDataProcessor.php
Created May 1, 2019 09:31 — forked from h3nn3s/ConvertApplicationAreaValuesToBinaryDataProcessor.php
TYPO3 powermail DataProcessor: Convert checkbox positions to there decimal represenation
<?php
namespace HenrikZiegenhain\MyExt\DataProcessor;
/***************************************************************
* Copyright notice
*
* (c) 2018 Henrik Ziegenhain <henrik@ziegenhain.me>
* All rights reserved
*
* This script is part of the TYPO3 project. The TYPO3 project is
@DavidBruchmann
DavidBruchmann / Update_Powermail.sql
Last active January 12, 2019 14:42 — forked from einpraegsam/Update.sql
Update TYPO3 Powermail from 2.x to 5.x or a newer version
# Just copy all tables from plural to singular naming
create table tx_powermail_domain_model_form LIKE tx_powermail_domain_model_forms;
insert tx_powermail_domain_model_form select * from tx_powermail_domain_model_forms;
create table tx_powermail_domain_model_page LIKE tx_powermail_domain_model_pages;
insert tx_powermail_domain_model_page select * from tx_powermail_domain_model_pages;
create table tx_powermail_domain_model_field LIKE tx_powermail_domain_model_fields;
insert tx_powermail_domain_model_field select * from tx_powermail_domain_model_fields;
@DavidBruchmann
DavidBruchmann / debug-sql
Last active January 14, 2022 04:27 — forked from rvollebregt/debug-sql
Debug SQL query in TYPO3 8 Extbase
/** @var ObjectManager $objm */
$dbParser = $this->objectManager->get(\TYPO3\CMS\Extbase\Persistence\Generic\Storage\Typo3DbQueryParser::class);
$doctrineQueryBuilder = $dbParser->convertQueryToDoctrineQueryBuilder($query);
$sql = $doctrineQueryBuilder->getSQL();
$parameters = $doctrineQueryBuilder->getParameters();
\TYPO3\CMS\Extbase\Utility\DebuggerUtility::var_dump(['sql' => $sql, 'parameters' => $parameters], __METHOD__ . ':' . __LINE__);
@DavidBruchmann
DavidBruchmann / lib.navSidebar.ts
Created June 16, 2018 07:26 — forked from julrich/lib.navSidebar.ts
Fully cached TYPO3 HMENU navigation example with expAll and 'active', 'current' states
#
# Main navigation in Sidebar
#
# General idea: Don't render & cache 'active' and 'current' states in 'expAll' menu, so it becomes cacheable
# over all pages. To regain 'active' and 'current' states, the result of the cached menu is parsed by
# 'stdWrap.replacement', utilizing specific information about the resulting menu item markup to insert them.
# Use COA to decouple the stdWrap ('lib.navSidebar.stdWrap.replacement') needed for RegExp replacement from
# the cached menu ('lib.navSidebar.10'). This way the complete menu can be generically cached without current