Skip to content

Instantly share code, notes, and snippets.

View josefglatz's full-sized avatar
👨‍💻

Josef Glatz josefglatz

👨‍💻
View GitHub Profile
@mkhairi
mkhairi / gitcheats.txt
Created June 13, 2017 05:10 — forked from chrismccoy/gitcheats.txt
git cheats
# shortform git commands
alias g='git'
# push changes to an empty git repository for the first time
git push --set-upstream origin master
# Remove + and - from start of diff lines
git diff --color | sed "s/^\([^-+ ]*\)[-+ ]/\\1/" | less -r
# clear out git hooks
@Sebobo
Sebobo / Demo.html
Created May 3, 2017 17:17
TYPO3 pagination widget without a controller
<h1>{title}</h1>
<f:widget.paginate objects="{content}" as="paginatedContent" configuration="{itemsPerPage: 2}">
<ul>
<f:for each="{paginatedContent}" as="content">
<li>{content.data.uid} {content.data.CType}</li>
</f:for>
</ul>
</f:widget.paginate>
@judy2k
judy2k / parse_dotenv.bash
Created March 22, 2017 13:34
Parse a .env (dotenv) file directly using BASH
# Pass the env-vars to MYCOMMAND
eval $(egrep -v '^#' .env | xargs) MYCOMMAND
# … or ...
# Export the vars in .env into your shell:
export $(egrep -v '^#' .env | xargs)
@xperseguers
xperseguers / migration_helper.diff
Created February 22, 2017 10:54
TYPO3 TCA Migration helper
This patch was tested against TYPO3 v7.
Purpose is to *temporarily and quickly* let you export the migrated TCA to a file within typo3temp/migrated_TCA/<table_name>.migrated.php
so that you may then use any diff tool to compare the migrated TCA of a given table with your own definition.
To run it, just open backend module "Configuration -> TCA". This will automatically dump the whole (migrated) TCA to the disk.
This is not perfect but should help you a lot anyway to go through the various deprecation messages in typo3conf/deprecation_*.log.
Have fun!
@sebastianschrama
sebastianschrama / ImagesInside100PercentCol.html
Last active March 15, 2019 12:18
Responsive Images mit TYPO3 7.6 und Fluid Styled Content (FSC) unter Berücksichtigung mehrspaltiger Layouts
{namespace v=FluidTYPO3\Vhs\ViewHelpers}
<f:if condition="{verticalPosition} == 'intext'">
<f:then>
<f:if condition="{columnCount} == '1'">
<f:then>
<f:comment>1 col</f:comment>
<v:media.image
src="{column.media}"
width="400"
@fritz-c
fritz-c / git-hubdiff
Last active November 9, 2022 19:46
Open up diff on Github
#!/usr/bin/env bash
# Opens the comparison of two commits on Github (only for repositories on Github)
# Download this script as "git-hubdiff" (no extension), chmod it to be executable and put it in your
# path somewhere (e.g. /usr/bin). You can then use it via `git hubdiff` from inside any git repo.
usage()
{
echo "USAGE"
@StephenKing
StephenKing / reset.sh
Last active November 23, 2016 07:52
Network config reset
#!/bin/sh
##########################################
# Make sure that $FILE.$BACKUP_EXT exists!
# i.e. /etc/network/interfaces.bak
##########################################
FILE=/etc/network/interfaces
BACKUP_EXT=bak
@georgringer
georgringer / Gridelements Configuration
Last active August 7, 2020 09:07
TYPO3 Gridelements, configuration by files without any database involvement
# Page TSConfig:
tx_gridelements.setup {
# Identifier
2col {
title = 2 Spalten
config {
colCount = 2
rowCount = 1
rows {
1 {
@Sebobo
Sebobo / .gitlab-ci.yml
Last active September 13, 2018 04:02
TYPO3 v8 surf example
stages:
- build
- deploy
variables:
COMPOSER_PROCESS_TIMEOUT: "1200"
NODE_ENV: "production"
cache:
key: "$CI_BUILD_REF_NAME"
@oliverthiele
oliverthiele / CssStyledContent2FluidStyledContent.sql
Created September 14, 2016 10:26
TYPO3 DB Updates for switching from EXT:css_styled_conten to EXT:fluid_styled_content
UPDATE tt_content SET CType='textmedia' WHERE tt_content.CType='text';
UPDATE tt_content SET CType='textmedia' WHERE tt_content.CType='textpic';
UPDATE tt_content SET CType='textmedia' WHERE tt_content.CType='images';
UPDATE tt_content LEFT JOIN sys_file_reference ON sys_file_reference.uid_foreign=tt_content.uid AND sys_file_reference.tablenames='tt_content' AND sys_file_reference.fieldname='image' SET tt_content.CType='textmedia', tt_content.assets=tt_content.image, tt_content.image=0, sys_file_reference.fieldname='assets' WHERE tt_content.CType='textpic' OR tt_content.CType='image';
UPDATE be_groups SET explicit_allowdeny=CONCAT(explicit_allowdeny,',tt_content:CType:textmedia:ALLOW') WHERE (explicit_allowdeny LIKE '%tt\\_content:CType:textpic:ALLOW%' OR explicit_allowdeny LIKE '%tt\\_content:CType:image:ALLOW%' OR explicit_allowdeny LIKE '%tt\\_content:CType:text:ALLOW%') AND explicit_allowdeny NOT LIKE '%tt\\_content:CType:textmedia:ALLOW%';
UPDATE be_groups SET explicit_allowdeny=CONCAT(explicit_allowdeny