Skip to content

Instantly share code, notes, and snippets.

View NamelessCoder's full-sized avatar

Claus Due NamelessCoder

View GitHub Profile
@NamelessCoder
NamelessCoder / _README.md
Last active April 17, 2024 15:03
Sixty-Four Mods

Sixty-Four Mod Collection

These are mods for the game Sixty-Four, an idle/clicker/factory game. You can find the game on Steam: https://store.steampowered.com/app/2659900/Sixty_Four/

All of the mods in this collection require the "Mod Autoloader" as manager. That is the mod provided in the file autoloader.js. To install that mod, follow the official guide on the link above, place the autoloader.js file in the mods folder and include that mod - and only that mod! - in the index.html file. The other mods are then loaded automatically.

@NamelessCoder
NamelessCoder / FluidSequencerSyntax.md
Last active May 29, 2019 16:35
Fluid syntax possibilities with new Sequencer

simple open+close non-active tag in root context:

  • <tag>x</tag>

simple open+close non-active tag with hardcoded attribute in root context:

  • <tag attr="foo">x</tag>

simple open+close non-active tag with object accessor attribute value in root context:

Idea: Content Types API for TYPO3

This brief aims to outline an idea I had for TYPO3: an API for registering various content types that can then be used by editors. Currently we have a multitude of different ways such content types can be achieved, even with sub-types for plugins and sub-sub-types in the form of Extbase-based plugins.

It would make sense to have a common API for all this.

First part of solution: autoloaded configuration file returning objects

@NamelessCoder
NamelessCoder / LexerBasedFluid.md
Last active June 25, 2018 13:12
Research into Lexer-based Fluid tokenisation for improved syntax

The following are examples of new syntax capabilities that will/may become possible if switching Fluid away from regular expression parsing, to a lexer yielding a stream of tokens that can then be parsed to become a Fluid "syntax tree".

The lexer is a research project, in progress, but nearing completion. I plan to combine it with a "streaming node parser" which only processes the tokens it must, as opposed to processing everything like the current Fluid parser does.

Some of these already work - most of them are being researched

@NamelessCoder
NamelessCoder / TheTYPO3PSR6CacheAdventure.md
Created June 6, 2017 20:33
Mini-article about how I am replacing the TYPO3 caching framework with PSR-6 / Doctrine caches

Dear reader,

This is a small article to explain the vision and strategy for replacing the TYPO3 caches with a PSR-6 implementation. In the article I will explain the background of caches in TYPO3, the similarity it has to the PSR-6 standard, and the strategy for replacing such a vital component with as few problems as possible.

Current status: framework is almost entirely replaced and the vision described here is being prepared as merge requests.

Note, I have intentionally put the references to chosen framework last in this article. Please read the article before you check the foot note references - that way you will keep in mind all my decisions when reading the capabilities of the

@NamelessCoder
NamelessCoder / AdditionalConfiguration.php
Created March 12, 2017 18:17
Using namelesscoder/typo3-cms-multilevel-cache
<?php
/*
* Demonstrates how to configure `namelesscoder/typo3-cms-multilevel-cache` for
* added L1 (runtime) and L2 (memcached) caches on existing database-backed caches.
*
* Tip: if your site changes frequently, consider assigning a low expiration time
* on the "default_memcached" cache configuration.
*/
@NamelessCoder
NamelessCoder / injectionmethods.md
Last active February 12, 2020 15:59
Why you should never use @Inject in TYPO3 Extbase

This mini-article describes the methods of dependency injection, what each method implies in terms of both performance and simplicity.

  1. Constructor injection

This method is half manual and quite well known. Declare your classes' dependencies as constructor and pass the dependencies when you construct your instances. This approach completely skips the automation around detection of injections - but performs the best of all methods.

<?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