Skip to content

Instantly share code, notes, and snippets.

View foertel's full-sized avatar

Felix Oertel foertel

  • Common-Link AG
  • Rendsburg, Germany
View GitHub Profile
@foertel
foertel / YourController.php
Created June 8, 2011 13:45
Turning Controller Method Argument Mapping into 404
<?php
/**
* @return void
*/
public function mapRequestArgumentsToControllerArguments() {
try {
parent::mapRequestArgumentsToControllerArguments();
} catch (Tx_Extbase_MVC_Exception_InvalidArgumentValue $exception) {
$GLOBALS['TSFE']->pageNotFoundAndExit();
}
@foertel
foertel / Typo3DbBackend.php
Created August 23, 2011 15:58 — forked from hlubek/Typo3DbBackend.php
Extbase Language Overlay Fix
<?php
/***************************************************************
* Copyright notice
*
* (c) 2009 Jochen Rau <jochen.rau@typoplanet.de>
* All rights reserved
*
* This class is a backport of the corresponding class of FLOW3.
* All credits go to the v5 team.
*
{
"repositories": [
{
"type": "composer",
"url": "http://composer.lightwerk.com/"
}
]
}
{
"require": {
"typo3/cms": "~6.1",
"typo3-ter/a1_ttnews": "*"
}
}
@foertel
foertel / composer.json
Created July 31, 2013 21:55
composer.json to test failover repository
{"name":"fo/failover","description":"Demonstrates composers failover capabilities.","repositories":[{"type":"composer","url":"http://composer.foertel.com"}, {"type":"composer","url":"http://composer-failover.foertel.com"}],"require":{"typo3-ter/linkhandler":"*"}}
@foertel
foertel / BackendConfigurationManager.php
Created January 7, 2014 14:51
BackendConfigurationManager->getCurrentPageId()
<?php
/**
* Returns the page uid of the current page.
* If no page is selected, we'll return the uid of the first root page.
*
* @return integer current page id. If no page is selected current root page id is returned
*/
protected function getCurrentPageId() {
$pageId = (integer) \TYPO3\CMS\Core\Utility\GeneralUtility::_GP('id');
if ($pageId > 0) {
@foertel
foertel / testinram.sh
Created March 11, 2014 13:37
Run TYPO3 functional tests in ramdisk for speeeeeed ...
#!/bin/bash
#
# This script will
# * fire up a ramdisk
# * start a mysql server using it as storage
# * copying your typo3 database to ram
# * run the tests
# * clean up
#
# use -k as parameter to clean-up after a failed run
@foertel
foertel / alfred2graphite.php
Created July 8, 2014 20:43
Hacky PHP Script to push alfred data to graphite
#!/usr/bin/php
<?php
function run() {
$macMapping = array(
'ed:de:' => 'Swartz',
'99:81:' => 'Swartz',
);
exec('sudo alfred-json -r 158', $alfredJson);
@foertel
foertel / testinram.sh
Created July 15, 2014 14:45
TYPO3 Functional Tests in Ram
#!/bin/bash
#
# This script will
# * fire up a ramdisk
# * start a mysql server using it as storage
# * copying your typo3 database to ram
# * run the tests
# * clean up
#
# use -k as parameter to clean-up after a failed run
@foertel
foertel / setupGateway.sh
Created July 18, 2014 15:24
setup gateway script from 18 july
#!/bin/bash
###
# gateway creator v0.1
# by wiflix
#
# just run as root, add your VPN credentials and reboot!
# please remove my name, if you wanna extend or alter this script!
###