Skip to content

Instantly share code, notes, and snippets.

View sebastiansommer's full-sized avatar

Sebastian Sommer sebastiansommer

View GitHub Profile
@bwaidelich
bwaidelich / DispatchComponent.php
Last active March 23, 2017 14:58
A custom implementation of the default TYPO3.Flow DispatchComponent that allows for redirecting to a configurable URI upon access denied exceptions
<?php
namespace Wwwision\Test\Mvc;
/* *
* This script belongs to the TYPO3 Flow package "Wwwision.Test". *
* *
* */
use TYPO3\Flow\Annotations as Flow;
use TYPO3\Flow\Http\Component\ComponentChain;
<?php
use TYPO3\Surf\Domain\Model\Node;
use TYPO3\Surf\Domain\Model\SimpleWorkflow;
$application = new \TYPO3\Surf\Application\TYPO3\Flow();
$application->setOption('version', getenv('VERSION'));
$application->setOption('repositoryUrl', getenv('REPOSITORY'));
$application->setOption('localPackagePath', FLOW_PATH_DATA . 'Checkout' . DIRECTORY_SEPARATOR . $deployment->getName() . DIRECTORY_SEPARATOR . getenv('DEPLOYMENT_NAME') . DIRECTORY_SEPARATOR);
$application->setOption('composerCommandPath', getenv('COMPOSER_PATH') ? getenv('COMPOSER_PATH') : '/usr/bin/composer');
$application->setOption('transferMethod', 'rsync');
@Voles
Voles / datefilter.js
Created April 25, 2013 12:41
AngularJS daterange filter
RB.filter('daterange', function ()
{
return function(conversations, start_date, end_date)
{
var result = [];
// date filters
var start_date = (start_date && !isNaN(Date.parse(start_date))) ? Date.parse(start_date) : 0;
var end_date = (end_date && !isNaN(Date.parse(end_date))) ? Date.parse(end_date) : new Date().getTime();