Skip to content

Instantly share code, notes, and snippets.

@liayn
liayn / GrayImageViewHelper.php
Created May 14, 2017 10:45
Grayscale Image
<?php declare(strict_types=1);
/*
*
* This file is part of the "Skill Display" Extension for TYPO3 CMS.
*
* For the full copyright and license information, please read the
* LICENSE.txt file that was distributed with this source code.
*
* Copyright (c) Reelworx GmbH
*
@liayn
liayn / LaTexParser.php
Last active September 22, 2016 10:16
LaTex Fluid Parser
<?php
/**
* (c) by Reelworx GmbH, Markus Klein <markus.klein@reelworx.at>
*
* License GPL 3
*/
namespace Reelworx\LatexFluid;
use TYPO3\CMS\Fluid\Core\Parser\SyntaxTree\AbstractNode;
<?php
/**
* Merges two arrays recursively and "binary safe" (integer keys are
* overridden as well), overruling similar values in the first array
* ($arr0) with the values of the second array ($arr1)
* In case of identical keys, ie. keeping the values of the second.
*
* @param array $arr0 First array
* @param array $arr1 Second array, overruling the first array
* @param boolean $notAddKeys If set, keys that are NOT found in $arr0 (first array) will not be set.
@liayn
liayn / link.c
Last active October 18, 2015 13:31
Modified link.c for kernel 4.2 based on VMwareTools-10.0.0-2977863
@liayn
liayn / gist:b09fa61878244f273493
Created June 8, 2015 17:25
Create Fake FE in TYPO3 Backend for proper FE link generation from BE
<?php
class Foo {
protected function buildFakeFE($pageUid) {
// clear session key to avoid FE cookies
$oldGETSessionKey = '';
if (isset($GLOBALS['_GET']['FE_SESSION_KEY'])) {
$oldGETSessionKey = $GLOBALS['_GET']['FE_SESSION_KEY'];
}
$oldPOSTSessionKey = '';
if (isset($GLOBALS['_POST']['FE_SESSION_KEY'])) {
@liayn
liayn / update_typo3.sh
Last active October 27, 2017 09:43
TYPO3 Instance Upgrade Script
#!/bin/bash
#
# TYPO3 CMS Upgrade script
#
# (c) Reelworx GmbH, http://reelworx.at
#
# Date: 2016-05-17
# Licence: MIT
#