Skip to content

Instantly share code, notes, and snippets.

View akiessling's full-sized avatar

Andreas Kießling akiessling

View GitHub Profile
@akiessling
akiessling / sitemap.txt
Last active November 26, 2022 17:04
Plaintext list of pages urls in TypoScript
txtsitemap = PAGE
txtsitemap {
typeNum = 77
config {
disableAllHeaderCode = 1
additionalHeaders.10.header = Content-type:text/plain
debug = 0
}
10 = HMENU
@akiessling
akiessling / docker-local-hosts.sh
Created March 22, 2019 21:11 — forked from djdevin/docker-local-hosts.sh
docker-local-hosts.sh
#!/bin/bash -e
# Usage: ./docker-local-hosts.sh containername mylocalname
# Get IP of container and strip newlines.
INSPECT=$(docker inspect -f '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' $1)
IP=${INSPECT//[$'\t\r\n']}
if test -z "$IP"; then
echo "Container IP for $1 not found."
exit
charset = utf-8
end_of_line = lf
indent_style = space
indent_size = 4
insert_final_newline = true
trim_trailing_whitespace = true
# Makefile
[{Makefile,*.mk}]
indent_style = tab
@akiessling
akiessling / docker-compose.yml
Last active May 30, 2018 00:58
docker-compose setup for Redmine with MySQL Database
# login under http://localhost:8080 with admin/admin
version: '2'
services:
redmine:
image: redmine
ports:
- '8080:3000'
@akiessling
akiessling / ArrayChunkViewHelper.php
Created May 9, 2017 06:07
Array Chunk ViewHelper
<?php
namespace AndreasKießling\AkViewHelpers\ViewHelpers;
/**
* This class is a view helper for fluid to call array_chunk from a template
*/
class ArrayChunkViewHelper extends \TYPO3\CMS\Fluid\Core\ViewHelper\AbstractViewHelper
{
/**
* @param integer $size
@akiessling
akiessling / 0_reuse_code.js
Created May 4, 2016 10:19
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@akiessling
akiessling / fl
Last active August 29, 2015 14:17 — forked from McNull/fl
#!/bin/bash
# Open current directory in forklift
# Adapted from https://gist.github.com/elentok/6218781
# Adapted from comment https://gist.github.com/elentok/6218781#comment-891115
# Added optional path argument and removed using the clipboard buffer.
set -e
if [ -z "$@" ]; then
@akiessling
akiessling / objectmanagerexample.php
Last active January 9, 2022 20:10
Using TYPO3 extbase classes from hooks
<?php
/** @var $extbaseObjectManager \TYPO3\CMS\Extbase\Object\ObjectManager */
$extbaseObjectManager = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Extbase\\Object\\ObjectManager');
/** @var $newsRepository \Tx_News_Domain_Repository_NewsRepository */
$newsRepository = $extbaseObjectManager->get('Tx_News_Domain_Repository_NewsRepository');
/** @var $newsRecord \Tx_News_Domain_Model_News */
$newsRecord = $newsRepository->findByUid($newsParams['news']);