Skip to content

Instantly share code, notes, and snippets.

Avatar

Thomas Löffler spoonerWeb

View GitHub Profile
@ohader
ohader / .htaccess
Last active Jun 2, 2021
Apache HTML, SVG, PHP restricted handlers
View .htaccess
# Additions to existing Apache's .htaccess rules
# Security: Enforce file types matching at end of filename only
# see https://docs.typo3.org/m/typo3/reference-coreapi/10.4/en-us/Security/GuidelinesAdministrators/Index.html#file-extension-handling
# see https://httpd.apache.org/docs/2.4/mod/mod_mime.html#multipleext
<IfModule mod_mime.c>
RemoveType .html .htm
<FilesMatch ".+\.html?$">
AddType text/html .html
AddType text/html .htm
@garbast
garbast / .gitlab-ci.yml
Created Mar 8, 2019
Deployment with deployerphp and gitlabci
View .gitlab-ci.yml
cache:
paths:
- $CI_PROJECT_DIR/cache
- $CI_PROJECT_DIR/vendor
- $CI_PROJECT_DIR/.Build/vendor
stages:
- composer
- deploy
@einpraegsam
einpraegsam / datamappingExtbase.php
Last active Aug 22, 2022
Use DataMapper class in TYPO3 to convert an array into an object
View datamappingExtbase.php
public function mapProperties(): AnyModel
{
$properties = [
'uid' => 123,
'pid' => 123,
'firstname' => 'Alex',
'lastname' => 'Kellner'
'email' => 'my@email.org'
];
$dataMapper = $this->objectManager->get(TYPO3\CMS\Extbase\Persistence\Generic\Mapper\DataMapper::class);
@cedricziel
cedricziel / FacebookVideoHelper.php
Created Oct 7, 2016 — forked from spoonerWeb/FacebookVideoHelper.php
Facebook video integration in TYPO3 (needs some love for FE rendering)
View FacebookVideoHelper.php
<?php
namespace Vendor\ExtensionKey\Helpers;
/**
* This file is part of the TYPO3 CMS project.
*
* It is free software; you can redistribute it and/or modify it under
* the terms of the GNU General Public License, either version 2
* of the License, or any later version.
*