Skip to content

Instantly share code, notes, and snippets.

View Sebobo's full-sized avatar
:shipit:
Thinking about things

Sebastian Helzle Sebobo

:shipit:
Thinking about things
View GitHub Profile
@Sebobo
Sebobo / SSL-certs-OSX.md
Created June 26, 2018 21:52 — forked from croxton/SSL-certs-OSX.md
Generate ssl certificates with Subject Alt Names

Generate ssl certificates with Subject Alt Names on OSX

Open ssl.conf in a text editor.

Edit the domain(s) listed under the [alt_names] section so that they match the local domain name you want to use for your project, e.g.

DNS.1   = my-project.dev

Additional FQDNs can be added if required:

@Sebobo
Sebobo / InstanceUserService.php
Created April 26, 2018 14:39
Dynamic Policies
<?php
namespace Foo\Bar\Service;
use Neos\Cache\CacheAwareInterface;
use Neos\Flow\Annotations as Flow;
use Neos\Neos\Domain\Model\User;
/**
* The user service provides general context information about the currently
* authenticated backend user.
@Sebobo
Sebobo / Debug.fusion
Last active March 28, 2018 15:18
Neos Fusion Console debug helper for Neos 3.x
##
# This object will output fusion variables to the browser console.
#
# Example usage:
#
# @process.addDebugOutput = Shel.Helper:Debug {
# output = ${node.identifier}
# }
#
# Which will prepend the current node oder document node label by default.
@Sebobo
Sebobo / FrontendNodeRoutePartHandler.php
Last active February 21, 2018 11:16
Modified node route part handler for Neos 2.* for hiding url path segments of specific pages in the frontend url generation
<?php
namespace Vendor\Package\Routing;
use TYPO3\Flow\Annotations as Flow;
use TYPO3\Neos\Domain\Service\SiteService;
use TYPO3\TYPO3CR\Domain\Model\NodeInterface;
use TYPO3\Neos\Routing\Exception as Exception;
/**
* A route part handler for finding nodes specifically in the website's frontend.
@Sebobo
Sebobo / Demo.html
Created May 3, 2017 17:17
TYPO3 pagination widget without a controller
<h1>{title}</h1>
<f:widget.paginate objects="{content}" as="paginatedContent" configuration="{itemsPerPage: 2}">
<ul>
<f:for each="{paginatedContent}" as="content">
<li>{content.data.uid} {content.data.CType}</li>
</f:for>
</ul>
</f:widget.paginate>
@Sebobo
Sebobo / ResourceModificationTimeAspect.php
Created March 30, 2017 15:31
Cache busting for Neos resources
<?php
namespace Foo\Bar\Aspects;
use TYPO3\Flow\Annotations as Flow;
use TYPO3\Flow\Aop\JoinPointInterface;
use TYPO3\Flow\Resource\ResourceManager;
use TYPO3\TypoScript\TypoScriptObjects\ResourceUriImplementation;
/**
@Sebobo
Sebobo / Form.fusion
Last active January 31, 2017 19:14
Wiki style links in Neos CMS Forms
prototype(Neos.NodeTypes:Form) {
@context {
privacyLink = Neos.Neos:NodeUri {
node = ${q(site).property('privacyNode')}
}
}
@process {
replacePrivacyLink = ${String.pregReplace(value, '/\[\[privacyLink\|(.*)\]\]/', '<a href="' + privacyLink + '" title="$1" target="_blank">$1</a>')}
}
@Sebobo
Sebobo / .gitlab-ci.yml
Last active September 13, 2018 04:02
TYPO3 v8 surf example
stages:
- build
- deploy
variables:
COMPOSER_PROCESS_TIMEOUT: "1200"
NODE_ENV: "production"
cache:
key: "$CI_BUILD_REF_NAME"
@Sebobo
Sebobo / Settings.yaml
Created April 6, 2016 05:25
Disable session timeout in development context
##
# Development/Settings.yaml
#
TYPO3:
Flow:
security:
session:
inactivityTimeout: 0 # Disable session timeout while developing
@Sebobo
Sebobo / backend.js
Created March 7, 2016 09:32
Detect backendlayout in Neos and reload page
(function () {
/**
* Backend specific scripts
*/
"use strict";
var lastPageLayout,
layouts = {
newsletter: 'typo3:Vendor.Package:Newsletter'
};