Skip to content

Instantly share code, notes, and snippets.

@jrenggli
jrenggli / move-flow-resources-to-folder.sh
Created Oct 2, 2018
Move Resources to appropriate subfolder in folder structure (Flow Framework)
View move-flow-resources-to-folder.sh
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 Feb 13, 2018
typo3-cms-linkhandler-record-link-migration.patch
View typo3-cms-linkhandler-record-link-migration.patch
@jrenggli
jrenggli / updateTerTranslations.sh
Last active Nov 27, 2020
Update translation files for all TYPO3 extensions present in the filesystem. Ideally for continuous integration. No database required
View updateTerTranslations.sh
#!/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
View homematic_hue_toogle.sh
!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 Jan 13, 2017
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/)
View statuscake_pagespeed_ip.regex
^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 Jul 23, 2021
Fix homebrew permissions
View homebrew-permissions.sh
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 Dec 2, 2016
Sample composer.json for TYPO3 projects.
View composer.json
{
"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 Nov 23, 2016
Content Deployment for TYPO3 CMS from production/live to local development system. Could be adjusted to several systems.
View content-deploy-live-local.sh
#!/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 Aug 11, 2016
Content Deployment for TYPO3 CMS from production/live to latest system. Could be adjusted to several systems.
View content-deploy-live-latest.sh
#!/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 Aug 11, 2016
CDATA ViewHelper for Fluid: Only wrapping if CDATA is necessary
View FormatCdataViewHelper.php
<?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". *
* *