Skip to content

Instantly share code, notes, and snippets.

View Akii's full-sized avatar
🚀
To the Moon

Akii

🚀
To the Moon
View GitHub Profile
<table {{bind-attr class="tableClassNames"}}>
<thead>
<tr>
{{#each header in tableHeaders}}
{{#if header.sortKey}}
<th {{action "sortBy" header.sortKey}} {{bind-attr class="header.classNames header.sortKey:sorting"}}>{{header.title}}</th>
{{else}}
<th {{bind-attr class="header.classNames"}}>{{header.title}}</th>
{{/if}}
{{/each}}
/**
* @Flow\Scope("singleton")
*/
class ApiProductionExceptionHandler extends ProductionExceptionHandler {
/**
* Only sends the HTTP header
*
* @param \Exception $exception The exception
* @return void
$query->matching(
$query->logicalAnd(
$query->getConstraint(),
$yourOtherConstraints
)
)
public function createQuery() {
$query = parent::createQuery();
$constraintQuery = new ConstraintedQuery($query);
$constraintQuery->setDefaultConstraint(
$query->whatever()
)
return $constraintQuery;
}
@Akii
Akii / Video.txt
Last active August 29, 2015 14:19
Some thoughts about what you could cover in a video about eventstore.
If you have explained some things already, I'm sorry - even though I watched
all your videos, I might oversaw some details or forgot :D
- Stream Names
-> convention that you have aggregate type - identifier
-> what about renaming?
- Projections
-> you held a talk about that, but some short examples would be nice
@Akii
Akii / component.modal-dialog.js
Last active August 29, 2015 14:19
Really simple ember modal implementation
import Ember from 'ember';
export default Ember.Component.extend({
modal: undefined,
show: false,
setupModal: function() {
var modal = this.$('.modal').modal({
show: this.get('show'),
{{textarea value=markdown rows="10" class="form-control"}}
<?php
namespace Hypu;
class HypeConverter extends AbstractTypeConverter {
protected $sourceTypes = ['pre_13:37_Hype'];
protected $targetType = 'post_13:37_Hype';
}
<?php
namespace Akii\RememberMe\Security\Authentication\Aspect;
use Akii\RememberMe\Security\Authentication\Token\RememberMeToken;
use TYPO3\Flow\Annotations as Flow;
use TYPO3\Flow\Aop\JoinPointInterface;
use TYPO3\Flow\Configuration\ConfigurationManager;
use TYPO3\Flow\Http\Cookie;
use TYPO3\Flow\Http\Request;
use TYPO3\Flow\Http\Response;
def isSorted[A](as: Array[A], ordered: (A,A) => Boolean): Boolean = {
if (as.length <= 1) true
else {
@annotation.tailrec
def checkSort(n: Int): Boolean = {
if (n >= as.length) true
else if (!ordered(as(n - 1), as(n))) false
else checkSort(n+1)
}