Skip to content

Instantly share code, notes, and snippets.

View samyranavela's full-sized avatar

Samy RANAVELA samyranavela

  • Soustons, France
View GitHub Profile
@samyranavela
samyranavela / es_dump.sh
Created March 28, 2018 14:54
Dump ES document
curl http://localhots:9200/{index}/{type}/_search\?size\=1000 | \
jq -rc '.hits.hits[]' | \
while read -r doc; do echo $doc | \
jq '._source' > tests/fixtures/page/`echo $doc | jq -r '._type'`_`echo $doc | jq -r '._id'`.json; \
done \
{
"presets": ["env"]
}
@samyranavela
samyranavela / default
Created February 17, 2018 22:52 — forked from dtomasi/default
Brew Nginx PHP7
server {
listen 80;
server_name localhost;
root /Users/YOUR_USERNAME/Sites;
access_log /Library/Logs/default.access.log main;
location / {
include /usr/local/etc/nginx/conf.d/php-fpm;
}
@samyranavela
samyranavela / install-rabbitmq.sh
Created December 11, 2017 20:49 — forked from yetanotherchris/install-rabbitmq.sh
RabbitMQ on Docker with admin UI
# AWS specific install of Docker
sudo yum update -y
sudo yum install -y docker
sudo service docker start
sudo usermod -a -G docker ec2-user
# exit the SSH session, login again
# Docker
docker run -d --hostname my-rabbit --name some-rabbit -p 4369:4369 -p 5671:5671 -p 5672:5672 -p 15672:15672 rabbitmq
@samyranavela
samyranavela / unixhttpc.go
Created December 11, 2017 13:19 — forked from teknoraver/unixhttpc.go
HTTP over Unix domain sockets in golang
package main
import (
"context"
"flag"
"fmt"
"io"
"net"
"net/http"
"os"
@samyranavela
samyranavela / .babelrc
Created November 9, 2017 12:28 — forked from andrewmunro/.babelrc
Sequelize cli with ES6
{
"presets": ["es2015"],
"plugins": [
"add-module-exports"
],
}
@samyranavela
samyranavela / ddd_cqrs_event-sourcing_in_php.md
Created October 12, 2017 09:51 — forked from jsor/ddd_cqrs_event-sourcing_in_php.md
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
@samyranavela
samyranavela / build_pcntl.sh
Last active April 29, 2019 05:57 — forked from jbanety/build_pcntl.sh
Build PCNTL ext for MAMP PHP 7.1.8
#!/usr/bin/env bash
set -xo pipefail
# Command lines tools
xcode-select --install
# Install dependencies
brew install wget autoconf openssl libjpeg libpng lzlib curl imap-uw readline postgresql libxml2 mcrypt gettext libxslt homebrew/dupes/libiconv icu4c expat bison webp freetype
@samyranavela
samyranavela / command_exists.sh
Created September 21, 2017 14:19 — forked from gubatron/command_exists.sh
check if command exists (linux, mac)
function command_exists {
#this should be a very portable way of checking if something is on the path
#usage: "if command_exists foo; then echo it exists; fi"
type "$1" &> /dev/null
}
@samyranavela
samyranavela / traefik.sh
Created November 9, 2016 13:47
Start a traefik container & connect to all network
#!/bin/sh
#set -ex
# The daemon's name (to ensure uniqueness and for stop, restart and status)
name="traefik"
# The path of the client executable
command="$HOME/traefik/traefik.sh"
# Any command line arguments for the client executable
command_args=""
# The path of the daemon executable