<?php | |
/** | |
* Get list of timezones translated in given language | |
* | |
* Requires PHP Intl extension to be present & active in your PHP setup | |
* | |
* @param string $langcode - an ISO 639-1 language code | |
* @return array | |
*/ |
<?php | |
trait ArrayTestCaseTrait | |
{ | |
/** | |
* Asserts that two associative arrays are similar. | |
* | |
* Both arrays must have the same indexes with identical values | |
* without respect to key ordering | |
* |
For every application I have worked on, CQRS has not made sense, nor have commands/handlers. This Gist is here so I can compile a large quantity of relevant articles regarding those patterns and practices, and ideally come back to write about the topic from a "YAGNI" perspective.
- https://lostechies.com/jimmybogard/2013/12/19/put-your-controllers-on-a-diet-posts-and-commands/
- https://lostechies.com/jimmybogard/2013/10/29/put-your-controllers-on-a-diet-gets-and-queries/
- https://lostechies.com/jimmybogard/2013/10/10/put-your-controllers-on-a-diet-redux/
- https://lostechies.com/jimmybogard/2013/10/22/put-your-controllers-on-a-diet-defactoring/
- https://lostechies.com/jimmybogard/2013/10/23/put-your-controllers-on-a-diet-a-survey/
- http://paulstovell.com/blog/clean-aspnet-mvc-controllers
- http://www.adamtibi.net/06-2013/implementing-a-cqrs-based-architecture-with-mvc-and-document-db
- http://blog.architexa.com/2010/06/commands-and-the-mvc-architecture/
<?php | |
namespace App\Console; | |
use Illuminate\Console\Scheduling\Schedule; | |
use Illuminate\Foundation\Console\Kernel as ConsoleKernel; | |
class Kernel extends ConsoleKernel | |
{ | |
/** |
*! | |
* jQuery QueryBuilder ElasticSearch Filter Support | |
* Allows to convert exported rules as a ElasticSearch filter query object. | |
* Copyright 2015 Esat Emre Demirel (http://blog.esatemre.com) | |
*/ | |
function getRawFilter(data) { | |
var hede = parse(data); | |
return JSON.stringify(hede); | |
} | |
function parse(data) { |
This page provides a full overview of PHP's SessionHandler
life-cycle - this was generated by a set of test-scripts, in order to provide an exact overview of when and
what you can expect will be called in your custom SessionHandler
implementation.
Each example is a separate script being run by a client with cookies enabled.
To the left, you can see the function being called in your script, and to the right, you can see the resulting calls being made to a custom session-handler registed using session_set_save_handler().
<?php | |
namespace PHPSTORM_META { | |
/** | |
* PhpStorm Meta file, to provide autocomplete information for PhpStorm | |
* Generated on 2017-09-28. | |
* | |
* @author Barry vd. Heuvel <barryvdh@gmail.com> | |
* @see https://github.com/barryvdh/laravel-ide-helper | |
*/ |
#!/bin/bash | |
# Bash script to install latest version of ffmpeg and its dependencies on Ubuntu 12.04 or 14.04 | |
# Inspired from https://gist.github.com/faleev/3435377 | |
# Remove any existing packages: | |
sudo apt-get -y remove ffmpeg x264 libav-tools libvpx-dev libx264-dev | |
# Get the dependencies (Ubuntu Server or headless users): | |
sudo apt-get update |