Skip to content

Instantly share code, notes, and snippets.

View urbantrout's full-sized avatar

Harald Atteneder urbantrout

View GitHub Profile
@einpraegsam
einpraegsam / MysqlXml.txt
Created October 2, 2019 07:25
MySQL: Read and write values from XML (e.g. TYPO3 FlexForm)
# Read: Show real path in sys_file_storage
select name, uid, ExtractValue(configuration, '//T3FlexForms/data/sheet[@index="sDEF"]/language/field[@index="basePath"]/value') path from sys_file_storage where uid > 0
# Write: Set a new value (in this case a detail pid) in FlexForm of a tt_news plugin
UPDATE tt_content SET pi_flexform = UpdateXML(pi_flexform, '//T3FlexForms/data/sheet[@index="s_misc"]/language/field[@index="PIDitemDisplay"]/value', CONCAT('<value index="vDEF">', 123, '</value>' )) WHERE uid=11107
@htuscher
htuscher / LanguageMenu.ts2
Created February 23, 2016 10:33
Neos TypoScript2 condition LanguageMenu if dimension exists
languageMenu = TYPO3.Neos:DimensionMenu {
dimension = 'language'
templatePath = 'resource://Vendor.Package/Private/Templates/TypoScriptObjects/LanguageMenu.html'
@if.condition = ${Type.className(q(node).context({'dimensions': {'language': ['en']}, 'targetDimensions': {'language': 'en'}}).get(0)) == 'TYPO3\TYPO3CR\Domain\Model\Node'}
}
@ahknight
ahknight / fix_timemachine_backup.sh
Last active August 9, 2023 20:25
When Time Machine asks you to delete your backups and start over, ignore it. Run this and then start a backup again.
#!/bin/bash -x
# Generally based on ideas found at:
# http://www.garth.org/archives/2011,08,27,169,fix-time-machine-sparsebundle-nas-based-backup-errors.html
#
# Reduced the ideas there down to their essentials.
# 1. Unlock the image.
# 2. Reset the saved failure in the backup metadata.
# 3. Verify/fix the filesystem.
@reflexxion
reflexxion / Caches.yaml
Last active May 2, 2018 12:45 — forked from aertmann/Caches.yaml
Flow configuration to avoid logout on flow:cache:flush
# Flow 3.0+
Flow_Session_Storage:
persistent: TRUE
Flow_Session_MetaData:
persistent: TRUE
# Flow 2.0-2.3
Flow_Session_Storage:
backendOptions: