This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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" ] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
declare(strict_types=1); | |
namespace Vendor\Extension\Routing\Aspect; | |
use TYPO3\CMS\Core\Routing\Aspect\StaticRangeMapper; | |
/** | |
* Class StaticPaddedRangeMapper | |
* @package Vendor\Extension\Routing\Aspect |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function getAspectRatio(int $width, int $height) | |
{ | |
// search for greatest common divisor | |
$greatestCommonDivisor = static function($width, $height) use (&$greatestCommonDivisor) { | |
return ($width % $height) ? $greatestCommonDivisor($height, $width % $height) : $height; | |
}; | |
$divisor = $greatestCommonDivisor($width, $height); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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 | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
declare(strict_types=1); | |
namespace Vendor\MyExtenstion\Test\Functional\Service; | |
use … | |
use TYPO3\TestingFramework\Core\Functional\FunctionalTestCase; | |
class ConcreteSomethingImportServiceTest extends FunctionalTestCase | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
… | |
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$contentObjectRenderer = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::class); | |
$filesContent = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\TYPO3\CMS\Frontend\ContentObject\FilesContentObject::class, | |
$contentObjectRenderer); | |
$filesConfiguration = [ | |
'references' => '50', // this is a UID from sys_file_reference | |
'renderObj' => 'IMAGE', | |
'renderObj.' => [ | |
'file' => '50', // this is the same UID as above |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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 |
OlderNewer