Skip to content

Instantly share code, notes, and snippets.

View kitzberger's full-sized avatar

Philipp Kitzberger kitzberger

View GitHub Profile
@kitzberger
kitzberger / .bashrc
Last active January 29, 2020 23:16
Git Replace
# --------------------------------------------------------------------
# 1st parameter: regex search string
# - if you wanna match brackets (, ), [, ] you need to escape them
# - otherwise they are handled as capture groups and character classes
# 2nd parameter: regex replace string (can be empty as well)
# - don't escape anything
# - back references to the first 3 capture groups can be used here: \1, \2 and \3
# --------------------------------------------------------------------
function gitreplace() {
@kitzberger
kitzberger / gist:703ebd59ee4d471f7864e60e41712550
Last active August 22, 2019 07:38
List of german PLZs per state
Derived from OpenGeoDB
# Bayern
86984,63897,84164,86975,85309,93449,84177,93155,91286,89290,87700,83737,83739,95185,84437,95180,95463,83308,94262,96337,96120,94133,87760,94419,91241,92272,92548,92262,85293,86660,96160,93499,85457,95709,95686,97488,95444,95445,95447,95448,85386,97318,95615,92263,87637,83623,83543,86450,94431,84061,83339,87490,96361,95365,94372,94428,92366,84174,83075,82281,83093,94553,87653,83512,91278,86568,97199,83119,93489,83670,86551,93482,97450,84367,94548,95355,92703,94136,96155,93462,84568,83703,85625,63906,93186,92342,95336,94110,92723,88138,94526,85229,84166,92637,86529,83071,86754,84570,83564,88178,84175,83365,92277,83129,85072,83115,87549,96264,84168,94094,93133,95152,91456,93343,85643,87538,94140,96317,95700,86971,94541,86736,87764,84332,94501,94363,94269,91177,94348,85461,93047,93049,93051,93053,93055,93057,93059,95179,97892,85406,94571,84079,97494,95506,92705,92278,84149,94267,92431,84144,83139,87527,92284,95682,86643,93182,89284,94149,94532,84574,84494,92676,91589,93437,83483,9
@kitzberger
kitzberger / howto.md
Last active October 27, 2020 10:34
Cherry-pick commits from one git repo to the other
@kitzberger
kitzberger / Default.yaml
Last active July 7, 2020 00:50
TYPO3 CKEditor: Support for certain tags
# allow <q> tags
editor:
config:
extraAllowedContent: "*(*)[data-*];q"
# allow <s> tags
processing:
allowTags:
- s
@kitzberger
kitzberger / Scratch-Animation.md
Last active March 11, 2020 15:48
Bauplan für gut strukturierte Filmchen in Scratch, mit dem Focus auf Szenenwechsel und Modularität.

Animationen

Bauplan für gut strukturierte Filmchen in Scratch, mit dem Focus auf Szenenwechsel und Modularität.

Bühnenbilder

  • Alle Bühnenbilder (oder Platzhalter dafür!) definieren und in Reihenfolge der Geschichte bringen
  • Namen der Bühnenbilder nach Schema: "Szene 1: Vor dem Haus"

Skript der Bühnenbilder

@kitzberger
kitzberger / export-powermails.sh
Last active September 15, 2021 08:02
Export powermail records since a given date
DB=xxx
PID=123
SINCE=2020-05-08
# Or with time
#SINCE=2020-05-08 16:00
mysqldump $DB --no-create-info --complete-insert \
tx_powermail_domain_model_mail \
tx_powermail_domain_model_answer \
@kitzberger
kitzberger / gist:a8304be3acf8994e84d1b7960e46c2a2
Last active October 26, 2020 14:30
TYPO3 PageTs Hack for gridelement backend layouts
--- a/typo3/sysext/backend/Classes/Form/FormDataProvider/PageTsConfigMerged.php 2020-10-26 14:41:48.000000000 +0100
+++ b/typo3/sysext/backend/Classes/Form/FormDataProvider/PageTsConfigMerged.php 2020-10-26 14:56:45.000000000 +0100
@@ -53,6 +53,21 @@
if (!empty($typeSpecificConfiguration[$type . '.']) && is_array($typeSpecificConfiguration[$type . '.'])) {
ArrayUtility::mergeRecursiveWithOverrule($newFieldConfiguration, $typeSpecificConfiguration[$type . '.']);
}
+ // hack for gridelements begins
+ if ($type === 'gridelements_pi1') {
+ if (!empty($fullFieldConfiguration['types.']['gridelements_pi1.']) &&
+ is_array($fullFieldConfiguration['types.']['gridelements_pi1.']) &&
@kitzberger
kitzberger / Known Bugs.md
Last active April 6, 2023 09:11
Ubuntu (customizations)
@kitzberger
kitzberger / update.sql
Created November 9, 2020 20:00
Update SQL table with count of child elements
-- Updates tt_content.tx_mask_items with the number of child elements that refer to this record.
UPDATE tt_content parent
INNER JOIN (SELECT count(*) as count, tx_mask_items_parent FROM tt_content GROUP BY tx_mask_items_parent) children
ON children.tx_mask_items_parent = parent.uid AND parent.CType = 'mask_accordion'
SET parent.tx_mask_items=children.count
@kitzberger
kitzberger / .bashrc
Last active February 18, 2021 13:25
PHP CS Fixer
function git-php-cs-fixer() {
files=$(git ls-files \*.php)
for file in $files
do
php-cs-fixer fix --rules=@PSR12 -- $file
done
}