Skip to content

Instantly share code, notes, and snippets.

View ronan-gloo's full-sized avatar

Ronan ronan-gloo

  • ShoppingFeed
  • France
View GitHub Profile
@CMCDragonkai
CMCDragonkai / http_streaming.md
Last active September 9, 2024 10:19
HTTP Streaming (or Chunked vs Store & Forward)

HTTP Streaming (or Chunked vs Store & Forward)

The standard way of understanding the HTTP protocol is via the request reply pattern. Each HTTP transaction consists of a finitely bounded HTTP request and a finitely bounded HTTP response.

However it's also possible for both parts of an HTTP 1.1 transaction to stream their possibly infinitely bounded data. The advantages is that the sender can send data that is beyond the sender's memory limit, and the receiver can act on

@markwalkom
markwalkom / logstash.conf
Last active April 29, 2022 10:23
Reindexing Elasticsearch with Logstash 2.0
input {
elasticsearch {
hosts => [ "HOSTNAME_HERE" ]
port => "9200"
index => "INDEXNAME_HERE"
size => 1000
scroll => "5m"
docinfo => true
scan => true
}
@jsor
jsor / ddd_cqrs_event-sourcing_in_php.md
Last active July 30, 2024 11:28
DDD, CQRS and Event Sourcing in PHP

DDD, CQRS and Event Sourcing in PHP

  • Broadway - Infrastructure and testing helpers for creating CQRS and event sourced applications
  • EventCentric.Core - Event Sourcing and CQRS in PHP
  • LiteCQRS - Small convention based CQRS library for PHP
  • predaddy - Common DDD classes including an annotation driven message bus and tools for CQRS and Event Sourcing
  • ProophEventSourcing - Provides basic functionality for event-sourced aggregates
  • ProophEventStore - PHP 5.4+ EventStore Implementation
  • ProophServiceBus - PHP Enterprise Service Bus Implementation supporting CQRS and DDD
@denji
denji / nginx-tuning.md
Last active September 20, 2024 06:44
NGINX tuning for best performance

Moved to git repository: https://github.com/denji/nginx-tuning

NGINX Tuning For Best Performance

For this configuration you can use web server you like, i decided, because i work mostly with it to use nginx.

Generally, properly configured nginx can handle up to 400K to 500K requests per second (clustered), most what i saw is 50K to 80K (non-clustered) requests per second and 30% CPU load, course, this was 2 x Intel Xeon with HyperThreading enabled, but it can work without problem on slower machines.

You must understand that this config is used in testing environment and not in production so you will need to find a way to implement most of those features best possible for your servers.

@ronan-gloo
ronan-gloo / gist:6052449
Last active December 20, 2015 01:58
Quelques paramètres méconnus du router zf2 (à partir de la 2.2 pour certains)
<?php
'router' =>
[
// Active le support du translator pour les portions de route marquées par {translation_key}
// Il faut lui injecter un translator
'router_class' => 'Zend\Mvc\Router\Http\TranslatorAwareTreeRouteStack',
// Valeurs par défaut pour toutes les routes
'default_params' =>
@zircote
zircote / ZendJobQueue.php
Last active October 7, 2015 15:48
Autocompletion file for ZendJobQueue
<?php
/**
* The ZendJobQueue is a PHP class that implements a connection to the Job Queue Daemon
*
*/
class ZendJobQueue
{
/**
@raphaelstolt
raphaelstolt / php54_php53_pear_macports.markdown
Created May 17, 2012 21:37
Installing PHP 5.4 and 5.3 side by side on Max OSX via MacPorts

##Given Apache 2 and MySQL are already installed.

#Update MacPorts sudo port selfupdate;sudo port -u upgrade outdated

#Install PHP 5.4.* sudo port install php54 php54-apache2handler ##Activate Apache Module cd /opt/local/apache2/modules