Skip to content

Instantly share code, notes, and snippets.

@bwaidelich
bwaidelich / Index.html
Created April 30, 2016 12:27
Upload multiple resources in Neos Flow
<f:form action="upload" enctype="multipart/form-data">
<f:form.upload name="resources[]" additionalAttributes="{multiple: true}" />
<f:form.submit value="Upload new resources"/>
</f:form>
@pascalbaljet
pascalbaljet / imagick-3.4.0-PHP7-forge.sh
Last active November 26, 2020 09:10
Install Imagick 3.4.0 on PHP 7.0 server (Laravel Forge)
#!/bin/bash
if [ "$EUID" -ne 0 ]
then echo "Please run as root"
exit
fi
apt-get install pkg-config libmagickwand-dev -y
cd /tmp
wget https://pecl.php.net/get/imagick-3.4.0.tgz
tar xvzf imagick-3.4.0.tgz
@aertmann
aertmann / Caches.yaml
Last active June 22, 2018 09:28
Use Redis or Memcached cache backends for optimizing certain caches that has tags which become slow with lots of content in Neos – Included in https://speakerdeck.com/aertmann/tasty-recipes-for-every-day-neos
# Redis (has to be configured to different databases on shared hosting)
TYPO3_TypoScript_Content:
backend: TYPO3\Flow\Cache\Backend\RedisBackend
backendOptions:
defaultLifetime: 0
Flow_Mvc_Routing_Resolve:
backend: TYPO3\Flow\Cache\Backend\RedisBackend
backendOptions:
defaultLifetime: 0
@aertmann
aertmann / Images.html
Last active August 17, 2016 08:34
Image partial for responsive images in Neos – Included in https://speakerdeck.com/aertmann/tasty-recipes-for-every-day-neos
{namespace media=TYPO3\Media\ViewHelpers}
<media:image
additionalAttributes="{srcset: '{media:uri.image(image: image, maximumWidth: 400)} 2x,
{media:uri.image(image: image, maximumWidth: 200)} 1x'}"
asset="{image}"
alt="{alternativeText}"
title="{title}"
maximumWidth="200" />
@aertmann
aertmann / Root.ts2
Created March 27, 2015 00:05
Optimize the editor experience with custom JavaScript & CSS in Neos – Included in https://speakerdeck.com/aertmann/tasty-recipes-for-every-day-neos
prototype(Page) {
head.stylesheets.backend = TYPO3.TypoScript:Tag {
tagName = 'link'
attributes {
rel = 'stylesheet'
href = TYPO3.TypoScript:ResourceUri {
package = 'Venstre.VenstreDk'
path = 'Styles/Backend.css'
}
}
function reloadCards() {
var cardsContainer = $('.cards');
if (cardsContainer.data('masonry')) {
cardsContainer.masonry('reloadItems').masonry('layout');
}
}
function initializeResize(elements) {
elements.resize(function() {
var cardsContainer = $('.cards');
@aertmann
aertmann / gist:42b81d816b1f265f101e
Created August 1, 2014 11:42
TYPO3 Neos create links to nodes in TypoScript
a = TYPO3.TypoScript:UriBuilder {
package = 'TYPO3.Neos'
controller = 'Frontend\\Node'
action = 'show'
arguments.node = ${node}
}
b = ${'node://' + node.identifier}
b.@process.convertUris = TYPO3.Neos:ConvertUris