Skip to content

Instantly share code, notes, and snippets.

View t3easy's full-sized avatar
💭
Busy but happy!

Jan Kiesewetter t3easy

💭
Busy but happy!
View GitHub Profile
@t3easy
t3easy / FileCategoryAspect.php
Created September 17, 2020 07:25
Categories of files for TYPO3 v8
<?php
namespace Vendor\Extension\Aspect;
use TYPO3\CMS\Core\Database\ConnectionPool;
use TYPO3\CMS\Core\Utility\GeneralUtility;
class FileCategoryAspect
{
/**
* Add categories to file metadata
@t3easy
t3easy / .env
Created January 13, 2020 08:09
Snipe-it docker-compose stack
SNIPE_IT_VERSION=4.7.8
VHOST=assets.domain.tld
FRONTEND_NETWORK=frontend
@t3easy
t3easy / .gitlab-ci.yml
Last active October 26, 2023 10:09
TYPO3 Surf in GitLab CI
cache:
key: "$CI_JOB_STAGE-$CI_COMMIT_REF_NAME"
paths:
- .cache/
.dedicated-runner:
tags:
- docker
- linux
@t3easy
t3easy / .gitlab-ci.yml
Created April 29, 2019 12:56
Wraith in GitLab CI
compare:staging:live:
image:
name: bbcnews/wraith
entrypoint: [""]
tags:
- docker
- linux
stage: compare
only:
- develop
@t3easy
t3easy / .gitlab-ci.yml
Last active February 12, 2024 18:05
Build and deploy docker containers with GitLab CI
image: an-image-with-docker-and-docker-compose
variables:
DOCKER_TLS_VERIFY: "1"
DOCKER_CERT_PATH: ".docker"
before_script:
- mkdir -p $DOCKER_CERT_PATH
- echo "$DOCKER_CA" > $DOCKER_CERT_PATH/ca.pem
- echo "$DOCKER_CERT" > $DOCKER_CERT_PATH/cert.pem
@t3easy
t3easy / Readme.md
Created May 4, 2018 12:32
Lock composer packages for a specific php version
composer config platform.php 7.0.30 # Fake PHP 7.0.30
composer update --with-all-dependencies symfony/* # Update symfony to the latest 7.0.30 compatible version
composer config --unset platform.php # Remove the faked PHP (or remove the entire config section if its empty)
composer update --lock # Rewrite the composer.lock to remove the platform-override and recalculate the hash
<?php
namespace Vendor\Extension\DataProcessing;
use TYPO3\CMS\Core\Utility\ArrayUtility;
use TYPO3\CMS\Core\Utility\GeneralUtility;
use TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer;
use TYPO3\CMS\Frontend\ContentObject\DataProcessorInterface;
/**
* This data processor can be used for processing data for the content elements which have flexform contents in one field
@t3easy
t3easy / AdditionalConfiguration.php
Created July 28, 2017 06:22
Deploy TYPO3 (via Surf) to METANET hosting
<?php
// The mysql socket is not accessable from the chrooted env. You have to allow TCP connection for the user from 127.0.0.1
// See https://www.metanet.ch/support/713#weitere-hinweise
if (PHP_SAPI === 'cli') {
$GLOBALS['TYPO3_CONF_VARS']['DB']['Connections']['Default']['host'] = '127.0.0.1';
$GLOBALS['TYPO3_CONF_VARS']['DB']['Connections']['Default']['port'] = 3306;
}
@t3easy
t3easy / .gitlab-ci.yml
Last active January 22, 2020 18:36
GitLab CI
cache:
# Use a cache for every branch and every stage
key: "$CI_COMMIT_REF_NAME/$CI_JOB_STAGE"
# Cache the path .cache within the project workspace
paths:
- .cache/
variables:
# Tell composer to save and load it's cache within the .cache folder
COMPOSER_CACHE_DIR: "$CI_PROJECT_DIR/.cache/composer"
@t3easy
t3easy / README.md
Last active May 18, 2020 13:21
Non composer extension insight composer mode TYPO3
  1. Copy your extension to [web/]typo3conf/ext/ of your composer mode TYPO3 (or kickstart one with extension_builder).
  2. Add autoload entry to your root composer.json (that one which requires "typo3/cms")
"autoload": {
	"psr-4": {
		"T3easy\\MyExt\\": "web/typo3conf/ext/my_ext/Classes/"
	}
}
  1. Run composer dump-autoload -a to update the autoloader.