Skip to content

Instantly share code, notes, and snippets.

Avatar

Claus Due NamelessCoder

View GitHub Profile
View Solarized Dark.icls
<?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" />
View gist:7267604
/**
* ## FooBar ViewHelper
*
* Blabla
*
* ### Argument: foo
*
* See: https://raw.github.com/bla/bla.md
*
* ### Argument: barFromParent
View gist:7283729
<?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
@NamelessCoder
NamelessCoder / install_typo3_62_ft3.sh
Last active Jan 13, 2017
Bash script to install TYPO3 6.2 LTS (dev) and FluidTYPO3 extensions (dev)
View install_typo3_62_ft3.sh
#!/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
View CustomForm.php
<?php
namespace MyVendor\MyExt\Form;
class CustomForm extends \FluidTYPO3\Flux\Form {
/**
* Creates objects inserted into this Form, resulting in
* a nested set of PHP objects that correspond exactly
* to what would come out of parsing a Flux template
*/
@NamelessCoder
NamelessCoder / Menu.html
Last active May 13, 2018
Rendering manual menus with VHS
View Menu.html
<div xmlns:v="http://typo3.org/ns/FluidTYPO3/Vhs/ViewHelpers"
xmlns:f="http://typo3.org/ns/fluid/ViewHelpers">
<!-- By setting the "as" argument, we create a new variable accessible inside tag content -->
<v:page.menu as="myMenuVariable">
<ol class="mySpecialMenu">
<f:for each="{myMenuVariable}" as="menuPage">
<li>
<!-- A few key properties are added on {menuPage} for user friendliness -->
<!-- These are: "linktext", "link", "active", "current", "hasSubPages" -->
<f:if condition="{menuPage.current}">
@NamelessCoder
NamelessCoder / Or.html
Created Aug 24, 2014
Usage of v:or for multiple else-style conditions
View Or.html
<div xmlns:v="http://typo3.org/ns/FluidTYPO3/Vhs/ViewHelpers"
xmlns:f="http://typo3.org/ns/fluid/ViewHelpers">
<!-- v:or can be used for long chains of conditions where the first
not-empty value gets used -->
<!-- If {person} for example can have three different email addresses'
but you only wish to display one of them: -->
Email: {person.workEmail -> v:or(alternative: person.secretaryEmail) -> v:or(alternative: person.homeEmail)}
@NamelessCoder
NamelessCoder / MyModel.php
Last active Nov 25, 2015
Example of using annotations to generate TCA configuration based on a Model class.
View MyModel.php
<?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
View gist:7ada460801fcec5fea6d
{
"NamelessCoder\\GizzleGitPlugins\\GizzlePlugins\\ClonePlugin:0000000018505d7f000000009d399b86": [
"Executing Git clone command: \/usr\/bin\/git clone --depth 1 --single-branch --branch 'master' 'https:\/\/github.com\/NamelessCoder\/uploadtesting' \/tmp\/4fc7d7786ecbee5cb123235e1223753337b4265c\/uploadtesting",
"Cloning into '\/tmp\/4fc7d7786ecbee5cb123235e1223753337b4265c\/uploadtesting'..."
],
"NamelessCoder\\GizzleTYPO3Plugins\\GizzlePlugins\\ExtensionRepositoryReleasePlugin:0000000018505d7c000000009d399b86": {
"resultCode": "10504",
"resultMessages": [
"Please note that it might take a while (up to an hour) until your extension and the documentation appear on TYPO3.org."
],
View gist:3fb6b6fca4efdffd94b8
$var = '...';
$var .= '...';
$var .= '...';
$var = '...' .
'...' .
'...';