Skip to content

Instantly share code, notes, and snippets.

View dfeyer's full-sized avatar

Dominique Feyer dfeyer

View GitHub Profile
# Base class for all "Plugins"; that are PHP controllers being called during the rendering.
'TYPO3.Neos:Plugin':
superTypes: ['TYPO3.Neos:Content']
abstract: TRUE
ui:
label: 'Plugin'
group: 'plugins'
icon: 'icon-puzzle-piece'
inspector:
groups:
@dfeyer
dfeyer / Settings.yaml
Created March 8, 2014 11:52
Change PHP extension used by TYPO3.Imaging to render image
# Use PHP GD php extension
TYPO3:
Imagine:
driver: 'Gd'
# Use PHP Gmagick php extension
TYPO3:
Imagine:
driver: 'Gmagick'
#!/bin/bash
EXIT_STATUS=0
echo "#!/bin/bash" > ./docker-travis-test.sh
cat .travis.yml | shyaml get-values before_script >> ./docker-travis-test.sh
cat .travis.yml | shyaml get-values script >> ./docker-travis-test.sh
PHP_VERSIONS=`cat .travis.yml | shyaml get-values php`
for PHP_VERSION in $PHP_VERSIONS
@dfeyer
dfeyer / Menu.ts2
Last active August 29, 2015 14:17
A simple menu in TypoScript2 for Neos
mainMenu = TYPO3.TypoScript:Menu {
templatePath = 'resource://Your.Package/Private/Templates/NodeTypes/Menu.html'
entryLevel = 1
maximumLevels = 1
active.attributes {
class = 'nav-link active'
id = 'navigation-menu'
role = 'navigation'
@dfeyer
dfeyer / gist:44a75fba60d8cceba440
Last active August 29, 2015 14:17
Simple Neos Menu to list 4 recent news in a Menu (require EEL sort opertation)
# Solution 1
# Based on the default TypoScript2 Menu implementation
recentNewsMenu = TYPO3.TypoScript:Menu {
templatePath = 'resource://Your.Package/Private/Templates/NodeTypes/Menu.html'
filter = 'Your.Package:News'
items.@process.sort = ${q(value).count() > 0 ? q(value).sort('publishedDate', 'DESC').get() : value}
items.@process.slice = ${q(value).count() > 0 ? q(value).slice(0, 4).get() : value}
}
@dfeyer
dfeyer / keybase.md
Created March 20, 2015 22:40
keybase.md

Keybase proof

I hereby claim:

  • I am dfeyer on github.
  • I am dfeyer (https://keybase.io/dfeyer) on keybase.
  • I have a public key whose fingerprint is 5BC1 85CD 5BA5 B268 810B EE49 0881 5033 4C62 18FB

To claim this, I am signing this object:

@dfeyer
dfeyer / host-manager
Created November 16, 2011 10:17 — forked from nddrylliog/host-manager
A command-line utility to manage the /etc/hosts file.
#!/bin/bash
# Idea and interface taken from https://github.com/macmade/host-manager
path="/etc/hosts"
addusage="Usage: `basename $0` --add host address"
remusage="Usage: `basename $0` --remove host"
listusage="Usage: `basename $0` --list [127.]"
case "$1" in
--add)
if [ $# -eq 3 ]; then
@dfeyer
dfeyer / gist:3143282
Created July 19, 2012 11:52
Add LOAD_REGISTER to Tx_Fed_ViewHelpers_Page_RenderContentViewHelper
<?php
/**
* ViewHelper used to render content elements in Fluid page templates
*
* @author Claus Due, Wildside A/S
* @author Dominique Feyer <dfeyer@ttree.ch>
* @package Fed
* @subpackage ViewHelpers/Page
*/
<f:layout name="Backoffice"/>
<f:section name="PageHeader">
<f:render partial="Backoffice/PageHeader" arguments="{module: 'domainPreferences', configuration: settings.backoffice.domainPreferences.actionMenu}"/>
</f:section>
<f:section name="Content">
<div class="container">
<f:form action="update" object="{domain}" name="domain" class="form-horizontal well" enctype="multipart/form-data">
<f:render partial="Model/Domain/PreferencesProperty" arguments="{_all}"/>
<?php
namespace Ttree\Medialib\Core\Security;
/* *
* This script belongs to the FLOW3 package "Ttree.Medialib". *
* *
* It is free software; you can redistribute it and/or modify it under *
* the terms of the GNU Lesser General Public License, either version 3 *
* of the License, or (at your option) any later version. *
* *