Skip to content

Instantly share code, notes, and snippets.

View peterkraume's full-sized avatar

Peter Kraume peterkraume

View GitHub Profile
@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';
@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 =|
@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"
@beelbrecht
beelbrecht / SimpleSurfDeployScript.php
Created October 14, 2012 20:59
This is an example of a simple deployment script using with the great TYPO3 Surf. You can use this script with TYPO3 Surf to deploy a simple static website.
<?php
// Create a simple workflow based on the predefined 'SimpleWorkflow'.
$workflow = new \TYPO3\Surf\Domain\Model\SimpleWorkflow();
// Define a custom task for smoketesting based on the 'httptest' task.
// Be sure, that the document root of next.example.org points to
// '[deploymentPath]/releases/next'
$smokeTestOptions = array(
'url' => 'http://next.example.org',
@Mabahe
Mabahe / gist:6038018
Last active December 19, 2015 23:59
Solution for indexing sys_category in ext:solr in TYPO3 with unmerged https://review.typo3.org/#/c/22415/ and unfixed http://forge.typo3.org/issues/44961
plugin.tx_solr.index.queue {
pages.fields {
tags_textM = SOLR_MULTIVALUE
tags_textM {
cObject = CONTENT
cObject {
table = pages
select {
uidInList = this
pidInList = 0
<?php
namespace Smichaelsen\MyExt\ViewHelpers;
use TYPO3\CMS\Extbase\Utility\LocalizationUtility;
use TYPO3\CMS\Fluid\Core\ViewHelper\AbstractViewHelper;
/**
* Class TimeSpanViewHelper
*
@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';
@waja
waja / php54_deprecated_functions
Last active March 11, 2016 13:18
This shell script could be used to parse DocumentRoots for functions and ini directives problematic with PHP 5.4
#!/bin/bash
#
# PHP 5.4 Deprecated function checker
#
# Version: 0.0.3
#
# Original Author: Michiel Roos <michiel@donationbasedhosting.org>
#
# http://www.php.net/manual/de/migration54.incompatible.php
# http://www.php.net/manual/en/migration54.deprecated.php
@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.

@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.