This file contains hidden or 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
/** | |
* Authenticate a user (Check various conditions for the user that might invalidate its authentication, eg. password match, domain, IP, etc.) | |
* | |
* @param array $user Data of user. | |
* | |
* @return integer >= 200: User authenticated successfully. | |
* No more checking is needed by other auth services. | |
* >= 100: User not authenticated; this service is not responsible. | |
* Other auth services will be asked. | |
* > 0: User authenticated successfully. |
This file contains hidden or 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 | |
# /usr/lib/systemd/system-sleep/auto-hibernate.sh | |
# Go to hibernate in 30 minutes | |
autohibernate=1800 | |
if [ "$1" = "pre" ] && [ "$2" = "suspend" ] | |
then | |
# Suspending, set RTC wake alarm | |
rtcwake -m no -s $autohibernate | |
fi |
This file contains hidden or 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 | |
interface Foo { | |
public function things(Bar $bar); | |
} | |
class Bar {} | |
class Baz extends Bar {} | |
class Möp implements Foo { |
This file contains hidden or 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
<!-- | |
The following li tag needs the class 'active' if the route is within 'some.*' | |
--> | |
<li class="has-sub"> | |
<a> | |
<b class="caret pull-right"></b> | |
<i class="fa fa-users"></i> | |
<span>Thins</span> | |
</a> | |
<ul class="sub-menu"> |
This file contains hidden or 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
$messageMappingConf = $this->arguments['newMessage']->getPropertyMappingConfiguration(); // there should be a getArgument as well | |
//$messageMappingConf->allowProperties('examdate'); shouldn't be needed | |
$messageMappingConf->forProperty('examdate')->setTypeConverterOption( | |
'TYPO3\CMS\Extbase\Property\TypeConverter\DateTimeConverter', | |
\TYPO3\CMS\Extbase\Property\TypeConverter\DateTimeConverter::CONFIGURATION_DATE_FORMAT, | |
'd/m/Y' | |
); |
This file contains hidden or 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
/** | |
* @var Reviewer | |
* @ORM\ManyToOne | |
*/ | |
protected $reviewer; |
This file contains hidden or 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
/** | |
* @Flow\Scope("singleton") | |
*/ | |
class ApiProductionExceptionHandler extends ProductionExceptionHandler { | |
/** | |
* Only sends the HTTP header | |
* | |
* @param \Exception $exception The exception | |
* @return void |
This file contains hidden or 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
$query->matching( | |
$query->logicalAnd( | |
$query->getConstraint(), | |
$yourOtherConstraints | |
) | |
) |