Skip to content

Instantly share code, notes, and snippets.

View wazum's full-sized avatar
😼
I may be slow to respond.

Wolfgang Klinger wazum

😼
I may be slow to respond.
View GitHub Profile
@wazum
wazum / checkpoint.sh
Last active November 25, 2017 17:48 — forked from bubenkoff/checkpoint.sh
Endpoint Security VPN FULL start/stop script for Mac OS X
#!/bin/bash
#
# The reason of creating this script is that Endpoint Security VPN installs it's own application firewall kext cpfw.kext
# which prevents for example PPTP connections from this computer, which is not appropriate if you need subj connection just
# from time to time
# Usage: checkpoint.sh load|unload
# You will need sudo power, of course
#
if [ $1 == "unload" ]
rofi -help
rofi usage:
rofi [-options ...]
Command line only options:
-no-config Do not load configuration, use default values.
-v,-version Print the version number and exit.
-dmenu Start in dmenu mode.
-display [string] X server to contact.
${DISPLAY}
<?php
declare(strict_types=1);
namespace Vendor\MyExtension\Test\Unit\Service;
use Vendor\MyExtension\Service\AbstractSomethingService;
use TYPO3\TestingFramework\Core\Unit\UnitTestCase;
class AbstractSomethingServiceTest extends UnitTestCase
{
<?php
declare(strict_types=1);
namespace Vendor\MyExtenstion\Test\Functional\Service;
use …
use TYPO3\TestingFramework\Core\Functional\FunctionalTestCase;
class ConcreteSomethingImportServiceTest extends FunctionalTestCase
{
<?php
declare(strict_types=1);
namespace Vendor\Extension\Database\Query;
class QueryBuilder extends \TYPO3\CMS\Core\Database\Query\QueryBuilder
{
/**
* Specifies an ordering for the query results.
* Replaces any previously specified orderings, if any.
@wazum
wazum / EventLinkViewHelper.php
Last active February 10, 2020 11:52
TYPO3 9.5+ routing for news (TypoScript hrDate = 0) and eventnews (TypoScript hrDate = 1)
class EventLinkViewHelper extends LinkViewHelper
{
/**
* Render link to news item or internal/external pages.
*
* Adds the hrDate settings to create links with a date.
*
* @return string link
@wazum
wazum / EventLinkViewHelper.php
Created June 9, 2020 07:43
TYPO3 news ViewHelper to add hrDate setting
<?php
namespace Vendor\MyExtension\ViewHelpers;
use GeorgRinger\News\Domain\Model\News;
use GeorgRinger\News\ViewHelpers\LinkViewHelper;
use TYPO3\CMS\Core\Utility\ArrayUtility;
use TYPO3\CMS\Core\Utility\GeneralUtility;
class EventLinkViewHelper extends LinkViewHelper
@wazum
wazum / Template.html
Created July 22, 2020 10:51
ViewHelper for language menu and news
<f:section name="LanguageMenu">
<f:if condition="({menu.0.active} && {menu.1.available} && {n:translationAvailable(languageId: 1)}) || ({menu.1.active} && {menu.0.available} && {n:translationAvailable(languageId: 0)})">
<div class="language-switch">
<ul>
@wazum
wazum / StaticPaddedRangeMapper.php
Created January 28, 2019 13:40
TYPO3 CMS 9.5 StaticPaddedRangeMapper Routing Aspect
<?php
declare(strict_types=1);
namespace Vendor\Extension\Routing\Aspect;
use TYPO3\CMS\Core\Routing\Aspect\StaticRangeMapper;
/**
* Class StaticPaddedRangeMapper
* @package Vendor\Extension\Routing\Aspect
@wazum
wazum / Person.php
Created November 14, 2020 10:36
Person entity with nullable EmailAddress value object
<?php
declare(strict_types=1);
namespace App\Something\Domain\Entity;
/**
* @ORM\Entity
*/
class Person extends DomainEntity