Skip to content

Instantly share code, notes, and snippets.

@jrenggli
jrenggli / move-flow-resources-to-folder.sh
Created October 2, 2018 12:58
Move Resources to appropriate subfolder in folder structure (Flow Framework)
ls -1 | while read F; do
mkdir -p ${F:0:1}/${F:1:1}/${F:2:1}/${F:3:1}
mv ${F} ${F:0:1}/${F:1:1}/${F:2:1}/${F:3:1}/
done
@jrenggli
jrenggli / typo3-cms-linkhandler-record-link-migration.patch
Last active February 13, 2018 21:29
typo3-cms-linkhandler-record-link-migration.patch
@jrenggli
jrenggli / updateTerTranslations.sh
Last active November 27, 2020 08:11
Update translation files for all TYPO3 extensions present in the filesystem. Ideally for continuous integration. No database required
#!/usr/bin/env bash
# Fetch translation files for all TYPO3 extensions present in the filesystem
#
# In contrast to the TYPO3 CLI command to retrieve translations, this script
# can be executed without having a DB connection available. This is useful to
# fetch all translations in the build step without any TYPO3 dependencies.
#
# Adjust the variables below if necessary
@jrenggli
jrenggli / homematic_hue_toogle.sh
Last active November 20, 2018 12:47
Toggle Philips Hue Lights with Homematic Script. Credits: https://www.technikkram.net/2017/04/philips-hue-per-homematic-steuern
!Hue Lampe ein-/ausschalten
!------------------------------
!__IP Adresse der Hue Bridge
string ip_address = "192.168.2.172";
!__User ID in der Bridge
string api_key="9YqN4igBFdRpXo8kw3lhzzNIzPXFFSoJSn6488bV";
!__Auswahl der Lampe
string lamp ="1";
@jrenggli
jrenggli / statuscake_pagespeed_ip.regex
Created January 13, 2017 12:41
Regex for filtering StatusCake Page Speed test traffic. Can be used in Google Analytics (see https://www.statuscake.com/kb/knowledge-base/how-do-i-exclude-statuscake-from-google-analytics/)
^46\.101\.(86\.253|172\.39|227\.232)|128\.199\.(230\.46|252\.83)|139\.(59\.((6\.165|170\.38)|203\.60\.219))|159\.203\.60\.219|178\.62\.47\.83|188\.166\.170\.233|192\.(34\.63\.77|241\.151\.177)|198\.(199\.(91\.(32|244)|126\.66)|211\.104\.10)$
@jrenggli
jrenggli / homebrew-permissions.sh
Last active April 3, 2022 23:32
Fix homebrew permissions
sudo chown -R $(whoami) /usr/local/Cellar
sudo chown -R $(whoami) /usr/local/Homebrew
sudo chown -R $(whoami) /usr/local/var/homebrew
sudo chown -R $(whoami) ${HOME}/Library/Caches/Homebrew
sudo chown -R $(whoami) ${HOME}/Library/Logs/Homebrew
sudo chown -R $(whoami) /usr/local/etc
sudo chown -R $(whoami) /usr/local/opt
sudo chown -R $(whoami) /usr/local/bin
sudo chown -R $(whoami) /usr/local/var
sudo chown -R $(whoami) /usr/local/share/man/man1
@jrenggli
jrenggli / composer.json
Created December 2, 2016 16:04
Sample composer.json for TYPO3 projects.
{
"name": "",
"description" : "TYPO3 CMS Distribution for example.org",
"license": "GPL-2.0+",
"repositories": [
{
"type": "composer",
"url": "https://composer.typo3.org/"
}
],
@jrenggli
jrenggli / content-deploy-live-local.sh
Created November 23, 2016 09:43
Content Deployment for TYPO3 CMS from production/live to local development system. Could be adjusted to several systems.
#!/bin/bash
PWD=`pwd`
SOURCEPATH="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && cd .. && pwd )"
WORKSPACEPATH="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && cd ../.. && pwd )"
TARGET_PATH=${SOURCEPATH}/
TARGET_DBNAME=t3_dev
TARGET_DBUSER=t3_dev
TARGET_DBHOST=127.0.0.1
@jrenggli
jrenggli / content-deploy-live-latest.sh
Created August 11, 2016 18:15
Content Deployment for TYPO3 CMS from production/live to latest system. Could be adjusted to several systems.
#!/bin/bash
PWD=`pwd`
SOURCEPATH="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && cd .. && pwd )"
WORKSPACEPATH="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && cd ../.. && pwd )"
TARGET_HOST=latest.example.org
TARGET_PORT=22
TARGET_USER=www-data
TARGET_PATH=/home/www-data/typo3-latest/releases/current/
@jrenggli
jrenggli / FormatCdataViewHelper.php
Created August 11, 2016 16:26
CDATA ViewHelper for Fluid: Only wrapping if CDATA is necessary
<?php
namespace Swisscom\Finapp\ViewHelpers;
// Credits: https://git.typo3.org/Packages/TYPO3.CMS.git/blob_plain/HEAD:/typo3/sysext/fluid/Classes/ViewHelpers/Format/CdataViewHelper.php
// Extended with functionality to only wrap if CDATA is necessary.
// See $predeclaredCharacters
/* *
* This script is backported from the TYPO3 Flow package "TYPO3.Fluid". *
* *