Skip to content

Instantly share code, notes, and snippets.

@real34
real34 / ApacheErrors.json
Last active August 29, 2015 14:13
Dashboards Kibana
{
"title": "Apache errors",
"services": {
"query": {
"list": {
"0": {
"query": "type:apache_error",
"alias": "",
"color": "#7EB26D",
"id": 0,
<?php
$baseDir = dirname(dirname(__FILE__));
return array (
'plugins' =>
array (
'Migrations' => $baseDir . '/vendor/cakephp/migrations/',
'Bake' => $baseDir . '/vendor/cakephp/bake/',
'DebugKit' => $baseDir . '/vendor/cakephp/debug_kit/',
),
);
public function get($id)
{
$es = ConnectionManager::get(self::defaultConnectionName());
$search = new Search($es);
$search->addIndex('indications');
$result = $search->search($id);
return new Indication($result->getResults()[0]->getSource());
@real34
real34 / taiga.yml
Created March 18, 2015 01:00
Docker-compose file for taiga
data:
image: tianon/true
volumes:
- /var/lib/postgresql/data
- /usr/local/taiga/media
- /usr/local/taiga/static
- /usr/local/taiga/logs
back:
image: htdvisser/taiga-back
@real34
real34 / fixed-delivery-method-save-on-opc.diff
Created May 5, 2015 13:17
Fixed shipping method not saved in 1.7.0.2
commit 60943790900417c1a56c01b235b098eecbc66045
Author: Pierre Martin <pierre@occitech.fr>
Date: Tue May 5 14:19:24 2015 +0200
Fixed delivery choice in one page checkout
diff --git a/app/code/community/Chronopost/Chronorelais/controllers/Checkout/OnepageController.php b/app/code/community/Chronopost/Chronorelais/controllers/Checkout/OnepageController.php
index 73a66dd..47c1683 100644
--- a/app/code/community/Chronopost/Chronorelais/controllers/Checkout/OnepageController.php
+++ b/app/code/community/Chronopost/Chronorelais/controllers/Checkout/OnepageController.php
<div class="content"><!-- ngIf: ::event.Card.title --><span class="title ng-binding ng-scope" ng-if="::event.Card.title">Tigard CG<!-- ngIf: ::event.Card.body --><span ng-if="::event.Card.body" class="ng-scope">:</span><!-- end ngIf: ::event.Card.body --></span><!-- end ngIf: ::event.Card.title --> <span class="body ng-binding">, Uncaught action: unconfirmedBoardInvitation, Uncaught action: unconfirmedBoardInvitation</span><!-- ngIf: event.Card.minutes_long > 0 || event.Card.timer_started_at --><div class="billable-summary ng-scope" ng-if="event.Card.minutes_long > 0 || event.Card.timer_started_at"><span counter="" class="label label-default ng-isolate-scope" ng-class="{ 'label-primary' : event.Card.timer_started_at }" base-minutes="event.Card.minutes_long" timer-started="event.Card.timer_started_at"><span class="ng-binding">0:12</span></span> <span ng-bind-html="event.Card._billable_state" class="ng-binding"> on <span class="label label-default">Avant-vente</span></span></div><!-- end ngIf: event.Card.minute
@real34
real34 / cyclejs-cells-sum.js
Last active August 29, 2015 14:28
Simple CycleJS cells sum
/** @jsx hJSX */
import {run, Rx} from '@cycle/core';
import {makeDOMDriver, hJSX} from '@cycle/dom';
const initialGrid = [
[1, 5, 6],
[2, 15, 0],
[21, 1, 0],
[22, 1, 42],
];
@real34
real34 / SortableTrait.php
Created January 25, 2016 16:24
Allow to implement sorting in a Magento frontend Block easily.
<?php
/**
* Code extracted/inspired from the \Mage_Catalog_Block_Product_List_Toolbar class
* for being more easily reused
*/
trait My_Namespace_Block_List_SortableTrait
{
protected $_orderVarName = 'order';
@real34
real34 / SortableTrait.php
Created January 25, 2016 16:24
Allow to implement sorting in a Magento frontend Block easily.
<?php
/**
* Code extracted/inspired from the \Mage_Catalog_Block_Product_List_Toolbar class
* for being more easily reused
*/
trait My_Namespace_Block_List_SortableTrait
{
protected $_orderVarName = 'order';
@real34
real34 / .gitignore
Last active February 2, 2016 10:10
Rx test starter pack
node_modules