Skip to content

Instantly share code, notes, and snippets.

View htuscher's full-sized avatar

Hans Tuscher htuscher

View GitHub Profile

Keybase proof

I hereby claim:

  • I am hhoechtl on github.
  • I am hhoechtl (https://keybase.io/hhoechtl) on keybase.
  • I have a public key whose fingerprint is 9EA4 C420 CADC 74D2 E618 303B 00B5 463C 906F CB33

To claim this, I am signing this object:

@htuscher
htuscher / strace_apache_open_files.sh
Created April 7, 2014 09:36
Use strace to show files opened by all apache processes
#!/bin/bash
ps auxw | grep sbin/apache | awk '{print"-p " $2}' | xargs strace -e open
<?php
namespace Vendor\Extension\Domain\Repository;
use TYPO3\CMS\Extbase\Configuration\ConfigurationManager;
use TYPO3\CMS\Extbase\Configuration\ConfigurationManagerInterface;
use TYPO3\CMS\Extbase\Persistence\QueryResultInterface;
class MyRepository extends \TYPO3\CMS\Extbase\Persistence\Repository {
/**
config.tx_extbase{
persistence{
enableAutomaticCacheClearing = 1
updateReferenceIndex = 0
classes{
Vendor\Extension\Domain\Model\Pages {
mapping {
tableName = pages
columns {
/**
* Equalizer for height of elements
*/
$('.equalizer').each(function() {
var heights = $(this).find('.watch').map(function() {
return $(this).height();
}).get(),
maxHeight = Math.max.apply(null, heights);
'Me.My:NodeType':
# superTypes and ui stuff here
properties:
yourProperty: #adjust to your needs
type: references
ui:
label: 'referenced stuff' #adjust to your needs
inspector:
group: general #adjust to your needs
editorOptions:
@htuscher
htuscher / AdditionalConfiguration.php
Last active August 29, 2015 14:09
Disable L10n Cache in TYPO3 6.2 using config files
<?php
use TYPO3\CMS\Core\Utility\GeneralUtility;
if (!defined('TYPO3_MODE')) {
die('Access denied.');
}
$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['restrictfe']['enable'] = TRUE;
/**
* !!! IMPORTANT !!!
@htuscher
htuscher / FallbackLanguageIndexer.php
Created February 12, 2015 15:55
TYPO3 Solr Custom language fallback per index queue
<?php
/**
* Copyright notice
*
* (c) Onedrop Solutions GmbH & Co. KG, www.1drop.de
*
* @author Hans Höchtl <hhoechtl@1drop.de>
*
* @license http://www.gnu.org/licenses/gpl.html GNU General Public License, version 3 or later
*/
@htuscher
htuscher / FluidResult.php
Created February 12, 2015 16:03
TYPO3 Solr using Fluid-Templating for results
<?php
/**
* Copyright notice
*
* (c) Onedrop Solutions GmbH & Co. KG, www.1drop.de
*
* @author Hans Höchtl <hhoechtl@1drop.de>
*
* @license http://www.gnu.org/licenses/gpl.html GNU General Public License, version 3 or later
*/
@htuscher
htuscher / PageView.php
Created April 26, 2015 12:52
TYPO3 Neos track PageViews
<?php
namespace Jhoechtl\MySite\Domain\Model;
/* *
* This script belongs to the TYPO3 Flow package "Jhoechtl.MySite". *
* *
* */
use TYPO3\Flow\Annotations as Flow;
use Doctrine\ORM\Mapping as ORM;