Skip to content

Instantly share code, notes, and snippets.

View htuscher's full-sized avatar

Hans Tuscher htuscher

View GitHub Profile
@bwaidelich
bwaidelich / DetectLanguageComponent.php
Last active August 31, 2018 13:04
A TYPO3 Flow HTTP component that detects the user agent language and redirects to the corresponding URL if no language has been requested explicitly.
<?php
namespace Wwwision\Test\Http;
/* *
* This script belongs to the TYPO3 Flow package "Wwwision.Test". *
* *
* */
use TYPO3\Flow\Annotations as Flow;
use TYPO3\Flow\Http\Component\ComponentChain;
@aertmann
aertmann / Article.html
Last active December 8, 2017 15:43
News with inline editable headline & lead & image, list view with ajax loading, overview, single view, tagging and RSS using News document node type and Elasticsearch for Neos – Included in https://speakerdeck.com/aertmann/tasty-recipes-for-every-day-neos
{namespace neos=TYPO3\Neos\ViewHelpers}
{namespace media=TYPO3\Media\ViewHelpers}
<f:layout name="Page" />
<f:section name="body">
<article itemscope="" itemtype="http://schema.org/Article" xmlns:f="http://www.w3.org/1999/html">
<header>
<f:if condition="{tags}">
<f:for each="{tags}" as="articleTag" iteration="iterator">
<f:if condition="{iterator.isFirst}">
@kitsunet
kitsunet / NodeTypes.yaml
Created July 31, 2014 12:19
references field example for TYPO3 Neos NodeTypes.yaml
'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:
@jrenggli
jrenggli / TYPO3.xml
Created June 10, 2014 04:38
PhpStorm CodeStyle for TYPO3
<?xml version="1.0" encoding="UTF-8"?>
<code_scheme name="TYPO3_jr">
<option name="OTHER_INDENT_OPTIONS">
<value>
<option name="INDENT_SIZE" value="4" />
<option name="CONTINUATION_INDENT_SIZE" value="8" />
<option name="TAB_SIZE" value="4" />
<option name="USE_TAB_CHARACTER" value="true" />
<option name="SMART_TABS" value="false" />
<option name="LABEL_INDENT_SIZE" value="0" />
@GUI
GUI / install_vagrant_sudoers.sh
Created June 3, 2012 19:13 — forked from beddari/install_vagrant_sudoers.sh
Allow Vagrant sudo-access without password for NFS-setup (for OS X)
#!/bin/bash
# Script for placing sudoers.d files with syntax-checking
# Making a temporary file to contain the sudoers-changes to be pre-checked
TMP=$(mktemp -t vagrant_sudoers)
cat /etc/sudoers > $TMP
cat >> $TMP <<EOF
# Allow passwordless startup of Vagrant when using NFS.
Cmnd_Alias VAGRANT_EXPORTS_ADD = /usr/bin/su root -c echo '*' >> /etc/exports