Skip to content

Instantly share code, notes, and snippets.

Jan Kiesewetter t3easy

Block or report user

Report or block t3easy

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@t3easy
t3easy / .gitlab-ci.yml
Last active Nov 13, 2019
TYPO3 Surf in GitLab CI
View .gitlab-ci.yml
cache:
key: "$CI_JOB_STAGE-$CI_COMMIT_REF_NAME"
paths:
- .cache/
.dedicated-runner:
tags:
- docker
- linux
@t3easy
t3easy / .gitlab-ci.yml
Created Apr 29, 2019
Wraith in GitLab CI
View .gitlab-ci.yml
compare:staging:live:
image:
name: bbcnews/wraith
entrypoint: [""]
tags:
- docker
- linux
stage: compare
only:
- develop
@t3easy
t3easy / .gitlab-ci.yml
Last active Nov 13, 2019
Build and deploy docker containers with GitLab CI
View .gitlab-ci.yml
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
Lock composer packages for a specific php version
View Readme.md
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
View FlexFormProcessor.php
<?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 Jul 28, 2017
Deploy TYPO3 (via Surf) to METANET hosting
View AdditionalConfiguration.php
<?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;
}
View .gitlab-ci.yml
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 Apr 10, 2019
Non composer extension insight composer mode TYPO3
View README.md
  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.
View deploy-to-target-info.md

Requirements for deployment

  • ssh (generate key and put on server)
  • rsync must be available on both machines (deployment host and target host)
  • PHP cli binary must be available on both machines (deployment host and target host)
  • composer must be available on deployment host

Needed info for each target system:

  • deploy directory
View mh_code_highlighter-to-fs_code_snippet.sql
UPDATE `tt_content` SET `bodytext` = `tx_mhcodehighlighter_geshi_code` WHERE `list_type` = 'mh_code_highlighter_pi1';
UPDATE `tt_content` SET `CType` = 'fs_code_snippet' WHERE `list_type` = 'mh_code_highlighter_pi1';
UPDATE `tt_content` SET `list_type` = '' WHERE `CType` = 'fs_code_snippet';
UPDATE `tt_content` SET `programming_language` = 'typoscript' WHERE `CType` = 'fs_code_snippet' AND `tx_mhcodehighlighter_geshi_lang` = 'typoscript.php';
UPDATE `tt_content` SET `programming_language` = 'bash' WHERE `CType` = 'fs_code_snippet' AND `tx_mhcodehighlighter_geshi_lang` = 'bash.php';
UPDATE `tt_content` SET `programming_language` = 'javascript' WHERE `CType` = 'fs_code_snippet' AND `tx_mhcodehighlighter_geshi_lang` = 'javascript.php';
UPDATE `tt_content` SET `programming_language` = 'php' WHERE `CType` = 'fs_code_snippet' AND `tx_mhcodehighlighter_geshi_lang` = 'php.php';
UPDATE `tt_content` SET `programming_language` = 'html' WHERE `CType` = 'fs_code_snippet' AND `tx_mhcodehighlighter_geshi_lang` = 'html4stric
You can’t perform that action at this time.