Skip to content

Instantly share code, notes, and snippets.

@aertmann
aertmann / mount.md
Last active August 22, 2019 09:07
Problem: NFS mount not working in Finder, but works in Terminal – OS X El Capitan (10.11)

Solution

Add vers=4 to the mount command.

sudo mount -o vers=4,resvport,rw -t nfs x.x.x.x:/home mount
@aertmann
aertmann / Routes.yaml
Created September 21, 2015 12:57
Neos custom plugin routing
-
name: 'Event single'
uriPattern: '{node}/events/{--acme_calendar-calendar.event}'
defaults:
'@package': 'TYPO3.Neos'
'@controller': 'Frontend\Node'
'@action': 'show'
'@format': 'html'
'--acme_calendar-calendar':
'@package': 'Acme.Calendar'
@aertmann
aertmann / Page.ts2
Created July 20, 2015 18:54
Neos – Cache parts of page that are reused across pages
page.head.stylesheets {
main = TYPO3.TypoScript:Tag {
tagName = 'link'
attributes {
rel = 'stylesheet'
href = TYPO3.TypoScript:ResourceUri {
package = 'Acme.Demo'
path = 'Styles/Main.min.css'
}
}
@aertmann
aertmann / Main.js
Created July 20, 2015 18:52
Neos – Inline last visited node script to avoid inline scripts
(function($) {
$(function() {
try {
sessionStorage.setItem(
'TYPO3.Neos.lastVisitedNode',
document.querySelector('meta[name="neos-last-visited-node"]').getAttribute('content')
);
} catch (e) {
throw e;
}
@aertmann
aertmann / Slide.ts2
Last active August 29, 2015 14:24
Content slide for content collection in Neos
prototype(footer) < prototype(ContentCollection) {
nodePath = 'footer'
closestPageWithContent = ${q(node).add(q(node).parents().get()).has(this.nodePath + '[_numberOfChildNodes != 0]').get(0)}
@override.contentCollectionNode = ${Neos.Node.nearestContentCollection(this.closestPageWithContent ? this.closestPageWithContent : node, this.nodePath)}
}
@aertmann
aertmann / Controller.php
Created June 30, 2015 10:49
Token based authentication for Flow 3.x
<?php
namespace Acme\Demo\Controller;
/* *
* This script belongs to the TYPO3 Flow package "Acme.Demo". *
* *
* */
use TYPO3\Flow\Annotations as Flow;
use Acme\Demo\Domain\Model\Token;
@aertmann
aertmann / Settings.yaml
Created June 15, 2015 14:31
Enable TypoScript object tree cache in production context for improved performance in Neos
TYPO3:
Neos:
typoScript:
enableObjectTreeCache: TRUE
@aertmann
aertmann / Application.php
Last active August 29, 2015 14:22
TYPO3 Surf set PHP variable to avoid memory limit when deploying
<?php
class Application extends \TYPO3\Surf\Application\TYPO3\Neos {
/**
* Returns a workaround to set a PHP setting for the runtime
*
* @return string
*/
public function getFlowScriptName() {
return 'flow > /dev/null && FLOW_CONTEXT=' . $this->getContext() . ' php --define memory_limit=2G ./flow';
@aertmann
aertmann / overview.md
Created May 11, 2015 12:14
Neos 2.0 / Flow 3.0 feature overview
  • Google Analytics package – Display analytics data in the inspector for every page
  • Inspector data views – display tables, graphs etc. in the inspector using data views (used for the GA package)
  • SEO package – Official package with basic SEO features
  • ACLs
    • More flexibility
    • Constrain certain node paths
    • Frontend login now possible
  • Multi-site
    • Module improvements
  • Default asset collection for a site
@aertmann
aertmann / composer.json
Last active August 29, 2015 14:19
TYPO3 Neos 1.2 – reset composer.json to avoid pulling in unstable versions of some sub dependency packages
{
"name": "typo3/neos-base-distribution",
"description": "TYPO3 Neos Base Distribution",
"license": "GPL-3.0+",
"config": {
"vendor-dir": "Packages/Libraries",
"bin-dir": "bin"
},
"require": {
"typo3/neos": "1.2.*",