Skip to content

Instantly share code, notes, and snippets.

View NamelessCoder's full-sized avatar

Claus Due NamelessCoder

View GitHub Profile
@NamelessCoder
NamelessCoder / install_typo3_62_ft3.sh
Last active January 13, 2017 10:00
Bash script to install TYPO3 6.2 LTS (dev) and FluidTYPO3 extensions (dev)
#!/usr/bin/env bash
# phase one: core install
# Pro tip: edit the script and use this repository instead to try out the
# codename "Awesome Ocelot" project - which should be even faster than the
# bare 6.2 core: https://github.com/NamelessCoder/TYPO3.CMS.git
# Live demo of "Awesome Ocelot" is at http://staging.namelesscoder.net
git clone https://github.com/TYPO3/TYPO3.CMS.git --depth 1
<?php
$test = new ArrayIterator(array(1, 2, 3));
$exec = [];
foreach ($test as $l1) {
$exec[] = 'outer ' . $l1;
foreach ($test as $l2) {
$exec[] = 'inner' . $l2;
}
<?php
/**
* Content Element Definition Provider
*
* Contains methods to either remove/change or add
* content definitions to the new content wizard
* and content type selectors.
*
* Same instance is used for removing and adding
<?php
/***************************************************************
* Copyright notice
*
* (c) 2011 Claus Due <claus@wildside.dk>, Wildside A/S
* All rights reserved
*
* This script is part of the TYPO3 project. The TYPO3 project is
* free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
/**
* ## FooBar ViewHelper
*
* Blabla
*
* ### Argument: foo
*
* See: https://raw.github.com/bla/bla.md
*
* ### Argument: barFromParent
@NamelessCoder
NamelessCoder / Solarized Dark.icls
Created November 1, 2013 11:31
PHPStorm Color Scheme
<?xml version="1.0" encoding="UTF-8"?>
<scheme name="Solarized Dark" version="124" parent_scheme="Default">
<option name="LINE_SPACING" value="1.1" />
<font>
<option name="EDITOR_FONT_NAME" value="SourceCodePro-Regular" />
<option name="EDITOR_FONT_SIZE" value="13" />
</font>
<font>
<option name="EDITOR_FONT_NAME" value="Monaco" />
<option name="EDITOR_FONT_SIZE" value="13" />
@NamelessCoder
NamelessCoder / MyModel.php
Last active November 25, 2015 14:02
Example of using annotations to generate TCA configuration based on a Model class.
<?php
namespace FluidTYPO3\Demo\Domain\Model;
use TYPO3\CMS\Extbase\DomainObject\AbstractEntity;
use TYPO3\CMS\Extbase\Persistence\ObjectStorage;
/**
* Domain Model: Simple entry with tag relations.
*
* The annotations on the class-level doc comment define

5. It's a jungle up there

So now we have no shipped preferentially treated extensions and we lack some way of distributing these. We already have TER and it works wonderfully (but could use a performance checkup). But what TER doesn't have is an official way to indicate that an extension is worth while; a favourite of the community proven to add value. Twitter has the "verified" badge, Apple's App store has the "Featured Apps". TER has a download count and graph which by the way lacks a time scale.

Why don't we introduce a "recommended" and/or "official" flag on TER? Allow such extensions to be listed specially. Raise them as top priority for suggestions. Ship the core extensions from our Swiss army knife as "official" extensions. And let the community decide which ones will get that distinction; not some arbitrary number hits from an Apache log (sincerely, no offence! I realise exactly why the solution is the way it is and I respect it! I only wish to make it better).

There's another perspective here.

@NamelessCoder
NamelessCoder / fluid-vision.md
Created June 11, 2015 23:34
My vision for Fluid

My vision for Fluid

Estimated 15-20 minute read. Many perspectives included.

As some of you know: a while back I created a standalone version of the Fluid template engine and started banging the Twitter drums a bit about it. Since then, I have begun work on making this standalone version of Fluid a proper composer dependency of TYPO3. While this may not seem like a high priority task, it has far reaching implications in the vision I have for the future of Fluid.

Right from the start the goal has been not just to decouple Fluid from TYPO3/Flow - it has just as much been about extending and modernising the base Fluid so many, many adaptations become possible without modifying the engine itself. Humble brag: I spent a great amount of effort on making these things possible and the result is that by modifying implementations of classes that Fluid uses, one is able to modify nearly every aspect of how Fluid is processed - down to which arguments a ViewHelper supports and adding virtual

<f:if condition="0" else="0 === FALSE" />
<f:if condition="1" then="1 === TRUE" />
<f:if condition="(0)" else="(0) === FALSE" />
<f:if condition="(1)" then="(1) === TRUE" />
<f:if condition="0 && 0" else="0 && 0 === FALSE" />
<f:if condition="0 || 0" else="0 || 0 === FALSE" />
<f:if condition="1 && 0" else="1 && 0 === FALSE" />
<f:if condition="0 && 1" else="0 && 1 === FALSE" />
<f:if condition="1 || 0" then="1 || 0 === TRUE" />
<f:if condition="0 || 1" then="0 || 1 === TRUE" />