Skip to content

Instantly share code, notes, and snippets.

View mneuhaus's full-sized avatar

Marc Neuhaus mneuhaus

View GitHub Profile
@mneuhaus
mneuhaus / NumberGenerator.php
Created October 14, 2015 20:26
Eel NumberGenerator
<?php
namespace CE\Devis\Invoice;
/* *
* This script belongs to the TYPO3 Flow framework. *
* *
* It is free software; you can redistribute it and/or modify it under *
* the terms of the GNU Lesser General Public License, either version 3 *
* of the License, or (at your option) any later version. *
* *
<?php
namespace AWESOME\Translation\ViewHelpers;
/* *
* This script belongs to the TYPO3 Flow package "Flowpack.Expose". *
* *
* It is free software; you can redistribute it and/or modify it under *
* the terms of the GNU Lesser General Public License, either version 3 *
* of the License, or (at your option) any later version. *
* *
<?php
namespace Famelo\Soup\ViewHelpers;
/*
* This file belongs to the package "TYPO3 Fluid".
* See LICENSE.txt that was shipped with this package.
*/
use TYPO3Fluid\Fluid\Core\ViewHelper\AbstractViewHelper;
@mneuhaus
mneuhaus / ssh-copy-id
Created September 28, 2015 09:13
Shell Script to copy local pub key to remote ssh server
#!/bin/sh
# Shell script to install your public key on a remote machine
# Takes the remote machine name as an argument.
# Obviously, the remote machine must accept password authentication,
# or one of the other keys in your ssh-agent, for this to work.
#
# http://www.devthought.com/2009/09/19/get-ssh-copy-id-in-mac-os-x/
#
@mneuhaus
mneuhaus / foo.php
Created August 28, 2015 07:56
function to remove process variants of an fal image
<?php
public function clearProcessedImages($fileUid) {
$processedFiles = $GLOBALS['TYPO3_DB']->exec_SELECTgetRows('*', 'sys_file_processedfile', 'original = ' . $fileUid, 'identifier');
foreach ($processedFiles as $processedFile) {
$storage = $this->storageRepository->findByUid($processedFile['storage']);
$configuration = $storage->getConfiguration();
$path = realpath($configuration['basePath'] . $processedFile['identifier']);
unlink($path);
<?php
namespace Famelo\Cider\Fluid;
/*
* This file belongs to the package "TYPO3 Fluid".
* See LICENSE.txt that was shipped with this package.
*/
use NamelessCoder\Fluid\Core\Parser;
use NamelessCoder\Fluid\Core\Parser\SyntaxTree\Expression\AbstractExpressionNode;
// Set some useful classes on the html tag to identify crappy ie versions
config.htmlTag_setParams = class="no-js"
[browser = < msie7]
config.htmlTag_setParams = class="no-js ie6 oldie"
[global]
[browser = msie7]
config.htmlTag_setParams = class="no-js ie7 oldie"
[global]
[browser = msie8]
config.htmlTag_setParams = class="no-js ie8 oldie"
<?php
if (!isset($GLOBALS['TCA']['tx_famelolocation_domain_model_location']['ctrl']['type'])) {
if (file_exists($GLOBALS['TCA']['tx_famelolocation_domain_model_location']['ctrl']['dynamicConfigFile'])) {
require_once($GLOBALS['TCA']['tx_famelolocation_domain_model_location']['ctrl']['dynamicConfigFile']);
}
// no type field defined, so we define it here. This will only happen the first time the extension is installed!!
$GLOBALS['TCA']['tx_famelolocation_domain_model_location']['ctrl']['type'] = 'tx_extbase_type';
$tempColumnstx_mfshvcore_tx_famelolocation_domain_model_location = array();
$tempColumnstx_mfshvcore_tx_famelolocation_domain_model_location[$GLOBALS['TCA']['tx_famelolocation_domain_model_location']['ctrl']['type']] = array(
@mneuhaus
mneuhaus / ex_tables.php
Created July 6, 2015 21:05
Extend TYPO3 Table
<?php
if (!defined('TYPO3_MODE')) {
die('Access denied.');
}
$temporaryColumns = array (
'tx_mfshvcore_icon' => array (
'exclude' => 0,
'label' => 'LLL:EXT:mfshvcore/Resources/Private/Language/locallang_db.xlf:tx_mfshvcore_icon',
'config' => array (
@mneuhaus
mneuhaus / RealUrlAutoConfiguration
Last active August 29, 2015 14:23
extbase realurl
<?php
namespace Famelo\MelosRtb\Hooks;
/***************************************************************
*
* Copyright notice
*
* (c) 2014 Marc Neuhaus <[email protected]>, Famelo
*
* All rights reserved