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
export function reduceToParams(elements) { | |
return elements.reduce((hash, node) => Object.assign(hash, { [node.name]: node.value }), {}) | |
} | |
export function stopEverything(e) { | |
e.preventDefault() | |
e.stopPropagation() | |
e.stopImmediatePropagation() | |
} |
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 // @codingStandardsIgnoreFile | |
namespace Helper; | |
use Exception; | |
// Select2 helpers for Codeception | |
// See: https://select2.org | |
// | |
// Works with Select2 version 4.0 or greater | |
// Which is a jQuery based replacement for select boxes. |
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
echo "$STRING" | iconv -t ascii//TRANSLIT | sed -r s/[^a-zA-Z0-9]+/-/g | sed -r s/^-+\|-+$//g | tr A-Z a-z |
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 App\Finite; | |
/** | |
* The FiniteAuditTrail Trait. | |
* This plugin, for the Finite package (see https://github.com/yohang/Finite), adds support for keeping an audit trail for any state machine. | |
* Having an audit trail gives you a complete history of the state changes in your stateful model. | |
* Prerequisites: | |
* 1. Install Finite package (https://github.com/yohang/Finite#readme) | |
* 2. Use FiniteStateMachine in your model (https://gist.github.com/tortuetorche/6365575) | |
* Usage: in your Stateful Class use this trait after FiniteStateMachine trait, like this "use FiniteAuditTrailTrait;". |
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 App\Repositories; | |
use Illuminate\Cache\Repository; | |
class CacheRepository extends Repository | |
{ | |
public function has($key) | |
{ |
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 Helper; | |
// Select2 helpers for the jQuery based replacement for select boxes. | |
// See: http://select2.github.io/select2 | |
// Author: Tortue Torche <[email protected]> | |
// License: MIT | |
// | |
// Installation: | |
// * Put this file in your 'tests/_support/Helper' directory |
- Download and extract the last Redis version (2.8.4)
- Copy all extracted binaries to
c:\redis\bin
- Create another folder at
c:\redis\inst1
- Download and extract the RedisWatcher binaries from the 2.4 branch
- Run
InstallWatcher.msi
with administrator rights. This should create a Windows service called Redis watcher.
Support for keeping an audit trail for any state machine, borrowed from the Ruby StateMachine audit trail gem. Having an audit trail gives you a complete history of the state changes in your model. This history allows you to investigate incidents or perform analytics, like: “How long does it take on average to go from state a to state b?”, or “What percentage of cases goes from state a to b via state c?”
- PHP >= 5.4
- Laravel 4 framework
Install runkit PHP PECL extension
sudo apt-get install gcc php-pear php5-dev
cd ~/Downloads
git clone https://github.com/zenovich/runkit.git
NewerOlder