Skip to content

Instantly share code, notes, and snippets.

View cedricziel's full-sized avatar
🥸

Cedric Ziel cedricziel

🥸
View GitHub Profile
@cedricziel
cedricziel / CustomerAutocompletion.php
Created November 4, 2016 14:40
TYPO3 CMS 7 fully loaded TSFE in EiD
<?php
namespace Project\Namespace\Hooks;
use Psr\Http\Message\ResponseInterface;
use Psr\Http\Message\ServerRequestInterface;
use TYPO3\CMS\Backend\Utility\BackendUtility;
use TYPO3\CMS\Core\Core\Bootstrap;
use TYPO3\CMS\Core\Utility\ExtensionManagementUtility;
use TYPO3\CMS\Core\Utility\GeneralUtility;
@cedricziel
cedricziel / README
Created February 4, 2020 14:29
Simple setup for keycloak and docker.
* run gen_keys.sh
* run keycloak_server.sh
Take a look at kcadm on how to import more diverse data points like idp metadata and client configurations.
Also take a look at the simple import / export stuff at https://hub.docker.com/r/jboss/keycloak/
@cedricziel
cedricziel / README.md
Last active October 27, 2021 08:12
TYPO3 Extension with 3rd part composer dependencies. composer.json is placed in Resources/Private - Updated

Motivation

As long as composer support in CMS is "not there yet", you need to get around somehow.

Say you want to use the (awesome) markdown library, you need a way to get it in.

How

  1. Use a container extension with a private namespace
@cedricziel
cedricziel / migrate.sh
Created January 12, 2017 09:11
Very simple migration script to move from gitlab to gogs
#!/bin/env bash
## Needs `jq` (https://stedolan.github.io/jq/) on PATH
## and a personal gogs token of yours.
## Obtain token from https://git.example.com/user/settings/applications
## Usage:
## ./migrate.sh $clone_url $project_name [$optional_group]
## Migrate a repository to gogs into the user namespace of the token-user
## ./migrate.sh git@mygitlab.com:group/repo.git repo
## Migrate a repository to gogs into the group namespace `group` (needs to exist)
@cedricziel
cedricziel / DlrgSeminareConfigurationProvider.php
Created November 9, 2013 11:40
FluxForm Provider for Plugin forms - with fluid.
<?php
/**
* @package dlrg_seminare
* @subpackage Provider/Configuration
*/
namespace DLRG\DlrgSeminare\Provider\Configuration;
class DlrgSeminareConfigurationProvider
@cedricziel
cedricziel / post-receive
Created January 7, 2016 20:27
Uberspace Laravel 5.2 Zero downtime deployments as a post-receive hook.
#!/bin/bash
source ~/.bash_profile
VERSION=$(date +%Y%m%d%H%M%S)
BASE_DIRECTORY=/var/www/virtual/foxyzor/html/application
SOURCE_ROOT=$BASE_DIRECTORY/versions/$VERSION
SHARED_FOLDER=$BASE_DIRECTORY/shared
STORAGE_FOLDER=$BASE_DIRECTORY/shared/storage
CURRENT_LINK=$BASE_DIRECTORY/current
@cedricziel
cedricziel / publish_post.json
Created August 9, 2020 15:53
Canva.com Publish Extension Request Schema
{
"user": "userid",
"brand": "brandid",
"label": "Publish",
"message": "message provided",
"assets": [
{
"url":"https://s3-url",
"type":"PNG",
"name":"0001-9416535780.png"
@cedricziel
cedricziel / AdditionalConfiguration.php
Created June 9, 2013 19:17
Using different caching backend in TYPO3 6.x After #t3cs2013 I simply wanted to test the ad-hoc performance of using redis as a cache backend. The following lines simply demonstrate-this doesn't mean, it makes sense to use this particular cache backend. The example below uses only the Redis Backend and Namespaces.
<?php
/**
* We have to increse the database name. You could also have a meaningful name,
* but it has to be unique, so the caches do not interfere.
**/
$GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheConfigurations']['cache_pages']['backend'] = 'TYPO3\\CMS\\Core\\Cache\\Backend\\RedisBackend';
/**
* Options as per http://docs.typo3.org/typo3cms/CoreApiReference/CachingFramework/FrontendsBackends/Index.html#caching-backend-redis
**/
@cedricziel
cedricziel / dnsmasq.conf
Created October 24, 2013 12:23
Wildcard vhosts with nginx on a dev machine 1. Place wildcard.conf in /etc/nginx/sites-enabled or symlink it here 2. Place typo3 in /etc/nginx 3. Adjust the paths. I prefer to hold anything inside ~/public_html (needs adjustments. wire up www-data [or your systems flavor of that) and your current user group. Also let your php-fpm pool use your u…
address=/t3cmsdev/127.0.0.1
address=/l/127.0.0.1
address=/silex/127.0.0.1
address=/symfony2/127.0.0.1
address=/dev/127.0.0.1
@cedricziel
cedricziel / FacebookVideoHelper.php
Created October 7, 2016 14:27 — forked from spoonerWeb/FacebookVideoHelper.php
Facebook video integration in TYPO3 (needs some love for FE rendering)
<?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.
*