Skip to content

Instantly share code, notes, and snippets.

View Tobi77's full-sized avatar

Tobias Nussbaum Tobi77

View GitHub Profile
@Tobi77
Tobi77 / vagrant_php.txt
Created June 26, 2018 13:37
Vagrant config
SetEnv APPLICATION_ENV tnussbaum
php_admin_value max_execution_time 240
php_admin_value post_max_size 12M
php_admin_value upload_max_filesize 12M
php_admin_value display_errors 1
SetEnv TYPO3_CONTEXT Development
@Tobi77
Tobi77 / phpmd.txt
Created June 26, 2018 13:36
PHP Mess detector (PhpStorm)
Mess Detector herunterladen
$ cd ~/bin
$ git clone git://github.com/phpmd/phpmd.git
$ cd pmpmd
$ git submodule update --init
$ composer install
Pfad zur Bibliothek angeben:
PHPStorm > Settings > Languages & Frameworks > PHP > Mess Detector
@Tobi77
Tobi77 / phpcs.txt
Last active June 26, 2018 13:36
PHP Code Sniffer (PhpStorm)
$ curl -OL https://squizlabs.github.io/PHP_CodeSniffer/phpcs.phar
$ php phpcs.phar -h
Pfad zur Bibliothek angeben:
PHPStorm > Settings > Languages & Frameworks > PHP > Code Sniffer
Development environment: Local [...] bearbeiten
PHP Code Sniffer (phpcs) path: /Users/tnussbaum/bin/phpcs/vendor/bin/phpcs
PHP Code Sniffer aktivieren:
@Tobi77
Tobi77 / fluid.html
Last active June 26, 2018 13:32
TYPO3 Fluid
{page.{lang.uid}.available}
===> ArrayKeyViewHelper
{tui:arrayKey(obj:'{page}', prop:'{lang.uid}', append:'available')}
<f:link.action action="translatedContent"
arguments="{
uid:page.row.uid,
@Tobi77
Tobi77 / clearVarnish.sh
Created June 26, 2018 13:30
Clear Varnish
#!/bin/bash
echo "++++++++++++++++++++++++++++++++++++++"
echo "+++ BAN varnish ++++++++++++++++++++++"
echo "++++++++++++++++++++++++++++++++++++++"
curl -X BAN -H 'Application-Ban-All: 1' -I http://xxxxxxxxx.lan:80
exit 0
@Tobi77
Tobi77 / php_codesniffer.txt
Created June 26, 2018 13:27
squizlabs/php_codesniffer
composer require squizlabs/php_codesniffer
vendor/bin/phpcs --standard=PSR2 --report=checkstyle --report-file=../test/phpcs.xml --extensions=php typo3conf/ext/dw_* typo3conf/ext/xyz_* || echo "PHPCS found errors"
<phpunit
backupGlobals="true"
backupStaticAttributes="false"
bootstrap="../htdocs/vendor/typo3/testing-framework/Resources/Core/Build/UnitTestsBootstrap.php"
colors="true"
convertErrorsToExceptions="true"
convertWarningsToExceptions="true"
forceCoversAnnotation="false"
processIsolation="false"
stopOnError="false"