Skip to content

Instantly share code, notes, and snippets.

View josefglatz's full-sized avatar
👨‍💻

Josef Glatz josefglatz

👨‍💻
View GitHub Profile
@josefglatz
josefglatz / ErrorPages.yaml
Last active December 28, 2020 23:28 — forked from bmack/LocalPageErrorHandler.php
Local Error Handler for TYPO3 (works also if your TYPO3 website is behind a basic auth)
errorHandling:
-
errorCode: '404'
errorContentSource: 't3://page?uid=316'
errorHandler: PHP
errorPhpClassFQCN: B13\AnyProject\PageErrorHandler\LocalPageErrorHandler
@josefglatz
josefglatz / SrcsetImage.html
Created September 25, 2016 20:24
Typo3 Fluid sourceset image partial with VHS
<div xmlns="http://www.w3.org/1999/xhtml" lang="en"
xmlns:v="http://typo3.org/ns/FluidTYPO3/Vhs/ViewHelpers"
xmlns:f="http://xsd.helhum.io/ns/typo3/cms-fluid/master/ViewHelpers"
data-namespace-typo3-fluid="true">
<f:section name="SrcsetImage">
<f:if condition="{image}">
<v:variable.set name="imgurl" value="{f:uri.image(image: image,maxWidth: '{maxWidth}')}" />
<v:variable.set name="imgsize" value="{v:media.image.width(src:'{imgurl}')}" />
<v:variable.set name="img480" value="{f:uri.image(image: image,maxWidth:'480')} 480w," />
#!/bin/bash
# Script for placing sudoers.d files with syntax-checking
# Making a temporary file to contain the sudoers-changes to be pre-checked
TMP=$(mktemp -t vagrant_sudoers)
cat /etc/sudoers > $TMP
cat >> $TMP <<EOF
# Allow passwordless startup of Vagrant when using NFS.
Cmnd_Alias VAGRANT_EXPORTS_ADD = /usr/bin/su root -c echo '*' >> /etc/exports