Skip to content

Instantly share code, notes, and snippets.

View kitsunet's full-sized avatar
:octocat:

Christian Müller kitsunet

:octocat:
View GitHub Profile
@kitsunet
kitsunet / configure
Created July 16, 2014 00:08
phpng configure Mac OSX homebrew
YACC=/usr/local/opt/bison27/bin/bison ./configure \
--prefix=/usr/local/opt/phpng \
--with-config-file-path=/usr/local/etc/phpng \
--enable-mbstring \
--enable-zip \
--enable-bcmath \
--enable-pcntl \
--enable-ftp \
--enable-exif \
--enable-calendar \
@kitsunet
kitsunet / basic-deployment.php
Created July 2, 2014 14:30
example surf deployment script. Belongs into Build/Surf and then can be invoked by ./flow surf:deploy basic-deployment
<?php
$repository = getenv('REPO');
$branch = getenv('BRANCH');
use \TYPO3\Surf\Domain\Model\Node;
use \TYPO3\Surf\Domain\Model\SimpleWorkflow;
$application = new \TYPO3\Surf\Application\TYPO3\Neos();
$application->setOption('repositoryUrl', 'git://some.url.here/' . $repository);
@kitsunet
kitsunet / autoload_files.php
Created June 30, 2014 10:46
autoload_files.php
<?php
// autoload_files.php @generated by Composer
$vendorDir = dirname(dirname(__FILE__));
$baseDir = dirname(dirname($vendorDir));
return array(
$vendorDir . '/swiftmailer/swiftmailer/lib/swift_required.php',
);
prototype(YourVendor.YourPackage:DefaultFooter) < TYPO3.Neos:ContentCollection {
nodePath = ${q(site).find('Footer').property('_path')}
collection = ${q(site).children('Footer').children()}
}
prototype(YourVendor.YourPackage:GermanFooter) < TYPO3.Neos:ContentCollection {
nodePath = ${q(site).children('de').find('Footer').property('_path')}
collection = ${q(site).children('de').children('Footer').children()}
}
protected function decodeBodyArguments($body, $mediaType) {
switch (MediaTypes::trimMediaType($mediaType)) {
case 'application/json':
case 'application/x-javascript':
case 'text/javascript':
case 'text/x-javascript':
case 'text/x-json':
$arguments = array();
$decoded_json_body = json_decode($body, TRUE);
if ($decoded_json_body !== NULL) {
'Foo.Bar:Baz':
constraints:
'TYPO3.Neos:Content':
allowed: TRUE
'TYPO3.Neos.NodeTypes:Text'
allowed: FALSE
{namespace neos=TYPO3\Neos\ViewHelpers}
<div>
{postList -> f:format.raw()}
</div>
@kitsunet
kitsunet / TypoScript
Created April 28, 2014 20:01
Rendering content of subpages in Neos
subPageContent = TYPO3.TypoScript:Collection {
collection = ${q(node).children('[instanceof TYPO3.Neos:Document]')}
itemRenderer = TYPO3.Neos:ContentCollection {
nodePath = 'main'
}
itemName = 'node'
}
@kitsunet
kitsunet / theme.inc
Last active August 29, 2015 14:00 — forked from mortendk/theme.inc
function mergeAttributes($array) {
$mergedAttributes = array();
foreach(func_get_args() as $argument) {
foreach($argument as $key => $value) {
if (!isset($mergedAttributes[$key]) {
$mergedAttributes[$key] = array();
}
if (is_array($value)) {
foreach($value as $innerValue) {
$mergedAttributes[$key][] = $innerValue;
@kitsunet
kitsunet / Events.ts2
Last active August 29, 2015 14:00 — forked from nezaniel/Events.ts2
prototype(CORE4.EventBase:Event) >
prototype(CORE4.EventBase:Event) < prototype(TYPO3.Neos:Page) {
body {
templatePath = 'resource://CORE4.EventBase/Private/Templates/NodeTypes/Event.html'
sectionName = 'body'
content {
images = ContentCollection {
nodePath = 'images'
}
description = PrimaryContent {