Instantly share code, notes, and snippets.

View mysqlDateUpdate.sql
update `mytable`
set `created` = null
where cast(`created` as char(20)) = '0000-00-00 00:00:00';
View Cors.php
<?php
namespace App\Http\Middleware;
use Closure;
use Illuminate\Contracts\Routing\Middleware;
use Illuminate\Http\Response;
class Cors implements Middleware
{
View watch.sh
#!/bin/sh
#
# Configuration
#
# sass source
SASS_SOURCE_PATH="resources/scss"
SASS_SOURCE_FILE="main.scss"
View CleanSource.php
<?php
namespace Your\Extension\Namespace\Hooks;
/**
* Clean up source
*/
class CleanSource extends \TYPO3\CMS\Frontend\Plugin\AbstractPlugin
{
/**
View PageLayoutView.php
<?php
namespace Your\Extension\Namespace\Hooks;
class PageLayoutView implements \TYPO3\CMS\Backend\View\PageLayoutViewDrawItemHookInterface
{
/**
* Preprocesses the preview rendering of a content element.
*