Skip to content

Instantly share code, notes, and snippets.

View peterkraume's full-sized avatar

Peter Kraume peterkraume

View GitHub Profile
@ohader
ohader / .htaccess
Last active June 2, 2021 22:15
Apache HTML, SVG, PHP restricted handlers
# Additions to existing Apache's .htaccess rules
# Security: Enforce file types matching at end of filename only
# see https://docs.typo3.org/m/typo3/reference-coreapi/10.4/en-us/Security/GuidelinesAdministrators/Index.html#file-extension-handling
# see https://httpd.apache.org/docs/2.4/mod/mod_mime.html#multipleext
<IfModule mod_mime.c>
RemoveType .html .htm
<FilesMatch ".+\.html?$">
AddType text/html .html
AddType text/html .htm
@spoonerWeb
spoonerWeb / HelpfulToolsToConcentrate.md
Last active October 2, 2019 09:16
Helpful tools to concentrate on important things

Helpful tools to concentrate on important things

devdocs.io

It's a bundle of documentation of languages, projects and other stuff. Easily searchable and can be used offline.

Download: https://devdocs.io

postman

@srotsch
srotsch / git_changelog_from_history.md
Created March 29, 2016 21:22
Generate a basic changelog from Git history

Render a simple list of all changes committed to a Git repository since the last tag

git --no-pager log --date=short --no-merges --pretty="%<(12)%ad%<(9)%h%s" `git describe --abbrev=0 --tags`..HEAD

Explaining the options

--no-pager Do not pipe Git output into a pager.

--date=short Show only the date, but not the time, in YYYY-MM-DD format.

@helhum
helhum / install.sh
Last active January 10, 2023 15:38
Unattended TYPO3 7LTS installation (including introduction package)
composer create-project typo3/cms-base-distribution='^7.6.0' my-test-typo3 --no-interaction
cd my-test-typo3/
composer require helhum/typo3-console
# This will only work with PHP < 7 as realurl need PHP 5.x
composer require typo3-ter/introduction
cp web/typo3conf/ext/typo3_console/Scripts/typo3cms .
cp web/typo3conf/ext/bootstrap_package/Configuration/Apache/.htaccess web/
chmod +x typo3cms
./typo3cms install:setup --non-interactive --database-user-name="root" --database-user-password="root" --database-host-name="localhost" --database-port="3306" --database-name="t3_my_test" --admin-user-name="admin" --admin-password="password" --site-name="Auto Install"
./typo3cms database:updateschema '*.*'
@pgampe
pgampe / menu.ts
Last active August 4, 2020 12:51
Fully cached menu with TypoScript
page.10 >
page.10 = COA
page.10 {
cache {
key = main-menu
}
10 = TEXT
10 {
@skywinder
skywinder / idea_native_clipboard_support
Last active August 29, 2015 14:15
idea_native_clipboard_support - for quickly fix idea.properties file
#!/usr/bin/env bash
if [ -n "$1" ]
then
if grep "ide.mac.useNativeClipboard=" "$1"/Contents/bin/idea.properties > /dev/null
then
if grep "ide.mac.useNativeClipboard=false" "$1"/Contents/bin/idea.properties > /dev/null
then
echo "ide.mac.useNativeClipboard=false found -> change to true"
@katzefudder
katzefudder / tt_content_category.ts
Last active August 29, 2015 14:05
Category wrapped in tt_content div
# wrap layout, language and tt_content uid around
tt_content.stdWrap.innerWrap.cObject.default.20.stdWrap.noTrimWrap = | class="| layout-{field:layout} language-{field:sys_language_uid} uid-{field:uid}"|
tt_content.stdWrap.innerWrap.cObject.default.20.stdWrap.insertData = 1
# wrap content category around
tt_content.stdWrap.innerWrap.cObject.default.20 = COA
tt_content.stdWrap.innerWrap.cObject.default.20 {
10 = CONTENT
10 {
wrap =|
@mhuber84
mhuber84 / AdditionalConfiguration.php
Last active August 29, 2015 14:03
TYPO3 Surf deployment for TYPO3 CMS with 4 target nodes
<?php
$GLOBALS['TYPO3_CONF_VARS']['BE']['installToolPassword'] = '$P$CEF2NP3kCoIHwDupr8RiYUMQ7/Rp.j.';
$GLOBALS['TYPO3_CONF_VARS']['DB']['database'] = 'projects_my_multiplenodes';
$GLOBALS['TYPO3_CONF_VARS']['DB']['username'] = 'user';
$GLOBALS['TYPO3_CONF_VARS']['DB']['password'] = 'secret';
$GLOBALS['TYPO3_CONF_VARS']['SYS']['sitename'] = 'My MultipleNodes';
@mhuber84
mhuber84 / AdditionalConfiguration.php
Last active January 28, 2016 13:57
TYPO3 Surf deployment for TYPO3 CMS with one target node
<?php
$GLOBALS['TYPO3_CONF_VARS']['BE']['installToolPassword'] = '$P$CEF2NP3kCoIHwDupr8RiYUMQ7/Rp.j.';
$GLOBALS['TYPO3_CONF_VARS']['DB']['database'] = 'projects_my_onenode';
$GLOBALS['TYPO3_CONF_VARS']['DB']['username'] = 'user';
$GLOBALS['TYPO3_CONF_VARS']['DB']['password'] = 'secret';
$GLOBALS['TYPO3_CONF_VARS']['SYS']['sitename'] = 'My OneNode';
@hlubek
hlubek / gist:7889386
Created December 10, 2013 11:45
TypoScript 2 guide

Hitchhikers guide to TypoScript 2

The old days

Do you remember the good old days?

What is TypoScript? Various myths and speculations exist about that, well, programming language? No, it never was a programming language. Though it could be used to express logic. Is it a configuration language then? It's often used to configure settings, but the scope is certainly blurry.

The power of TypoScript - if used well - is the declarative approach of expressing the rendering and execution of various parts of the system. And a declaration in TypoScript is never final, but can be changed at a later time by another extension or template.