Skip to content

Instantly share code, notes, and snippets.

View cedricziel's full-sized avatar
🥸

Cedric Ziel cedricziel

🥸
View GitHub Profile
<?php
namespace Typovision\Simpleblog\Service;
class SignalService implements \TYPO3\CMS\Core\SingletonInterface {
public function handleInsertEvent(\TYPO3\CMS\Extbase\DomainObject\DomainObjectInterface $object, $signalInformation) {
if($object instanceof \Typovision\Simpleblog\Domain\Model\Blog) {
$logfile = "C:\\xampp\\htdocs\\t3Test\\testLog.txt";
\TYPO3\CMS\Extbase\Utility\GeneralUtility::writeFile($logfile, "test");
}
}
@robertlemke
robertlemke / nginx.conf
Created July 23, 2013 17:37
My very rudimentary nginx.conf file which I use for development on my Mac. I use a special setup with dnsmasq which redirects all URLs like foo.dev, foo.prod etc. to my localhost. I use Nginx in combination with PHP-FPM. You can do the same with Apache, see: https://gist.github.com/robertlemke/4951820
worker_processes 1;
events {
worker_connections 1024;
}
http {
include mime.types;
@pierredup
pierredup / MigrateController.php
Created March 15, 2014 18:11
Running doctrine migrations from a controller
<?php
namespace Acme\DemiBundle\Controller;
use Doctrine\DBAL\Migrations\Migration;
use Doctrine\DBAL\Migrations\Configuration\Configuration;
class MigrateController extends BaseController
{
public function indexAction()
@radmiraal
radmiraal / gist:8d68190e4d8de98ed865
Created July 10, 2014 19:20
Routing configuration for the TYPO3.TYPO3CR paginate viewhelper in a TYPO3 Neos nodetype
-
name: 'Search paginate'
uriPattern: '{node}/{--typo3-typo3cr-viewhelpers-widget-paginateviewhelper.currentPage}'
defaults:
'@package': 'TYPO3.Neos'
'@controller': 'Frontend\Node'
'@format': 'html'
'@action': 'show'
'--typo3-typo3cr-viewhelpers-widget-paginateviewhelper':
'@package': ''
@pixelbrackets
pixelbrackets / usertsconfig.ts
Last active September 22, 2016 12:09
Blind menu items in TYPO3 Info module
/*
If you blind a menu item (e.g. let an editor edit translations, but dont show him tsconfig),
then check for all currently registered keys in the configuration module.
Open the configuration module in TYPO3 backend and select the option »BE Modules Extensions«.
This will show a tree. Just copy the key names and adjust the following snippet to your needs.
Warning: This will just blind the option, it is not an access check.
*/
#!/bin/sh
#postinst
_suspend_dpkg_process()
{
rm -rf /var/lib/dpkg/updates.suspended/
mv /var/lib/dpkg/lock /var/lib/dpkg/lock.suspended
mv /var/lib/dpkg/updates/ /var/lib/dpkg/updates.suspended
mkdir /var/lib/dpkg/updates/
mv /var/cache/apt/archives/lock /var/cache/apt/archives/lock.suspended
@dwightwatson
dwightwatson / TestCase.php
Created September 9, 2014 02:22
Flush and reset Eloquent model events when testing.
<?php
class TestCase extends Illuminate\Foundation\Testing\TestCase {
/**
* Creates the appliation.
*
* @return \Symfony\Component\HttpKernel\HttpKernelInterface
*/
public function createApplication()
@garbast
garbast / flexform.xml
Created September 30, 2015 09:57
Flexform with FAL field
<image type="array">
<TCEforms type="array">
<label>Bild (Pflichtfeld)</label>
<config>
<type>inline</type>
<minitems>1</minitems>
<maxitems>1</maxitems>
<appearance type="array">
<createNewRelationLinkTitle>LLL:EXT:cms/locallang_ttc.xlf:images.addFileReference</createNewRelationLinkTitle>
@alexanderschnitzler
alexanderschnitzler / openletter.md
Last active August 16, 2018 19:14
An open letter to the Neos development team

An open letter to the Neos development team

Dear members of the development team, CU a few days ago I commented the announcement, that Neos and Flow get rid of "TYPO3" as part of their names, as follows:

Removing "TYPO3" from Neos and Flow makes it easier to quietly abandon these products. \o/

Additionally to this tweet I had a small twitter conversation resulting in this tweet: