Skip to content

Instantly share code, notes, and snippets.

Riccardo Di Nuzzo riccardone

Block or report user

Report or block riccardone

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@riccardone
riccardone / Indexer.cs
Created Feb 26, 2019
C# ElasticSearch Synchroniser for CQRS apps
View Indexer.cs
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading;
using System.Timers;
using Nest;
using TaskZero.ReadModels.Elastic.Model;
using Timer = System.Timers.Timer;
namespace TaskZero.ReadModels.Elastic
@riccardone
riccardone / git_fetch_pull_all_subfolders.sh
Created Dec 5, 2018 — forked from mnem/git_fetch_pull_all_subfolders.sh
Simple bash script for fetching and pulling all repos in the executed folder to the latest of the branch they are on
View git_fetch_pull_all_subfolders.sh
#!/bin/bash
################
# Uncomment if you want the script to always use the scripts
# directory as the folder to look through
#REPOSITORIES="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
REPOSITORIES=`pwd`
IFS=$'\n'
@riccardone
riccardone / config.yaml
Last active Jan 9, 2019
EventStore configuration for cluster node example
View config.yaml
IntTcpPort: 2111
ExtTcpPort: 2112
IntHttpPort: 2113
ExtHttpPort: 2114
IntTcpHeartbeatInterval: 1500
IntTcpHeartbeatTimeout: 3000
ExtTcpHeartbeatInterval: 1500
ExtTcpHeartbeatTimeout: 3000
GossipIntervalMs: 2000
GossipTimeoutMs: 4000
@riccardone
riccardone / Program.cs
Created Aug 8, 2018
EventStore C# TestClusterConnection App
View Program.cs
namespace TestClusterConnection
{
class Program
{
private const string Stream = "MyTestStream";
static void Main(string[] args)
{
try
{
@riccardone
riccardone / Dockerfile
Created Aug 8, 2018
Dockerfile C# minimal
View Dockerfile
FROM mono:4.6.2.16
ADD . /home/TestClusterConnection
CMD [ "mono", "home/TestClusterConnection/TestClusterConnection.exe" ]
@riccardone
riccardone / docker-compose.yaml
Created Aug 8, 2018
EventStore docker-compose.yaml
View docker-compose.yaml
version: '3.4'
services:
esclienttest:
image: testclient
build:
context: .
dockerfile: Dockerfile
depends_on:
- eventstore1
@riccardone
riccardone / logstash-rdnltd.yml
Last active Aug 29, 2018
Configuration example for Logstash: from csv to EventStore
View logstash-rdnltd.yml
input {
file {
path => ["C:/inbound/*/*.csv"]
start_position => "beginning"
}
}
filter {
fingerprint {
source => "message"
target => "[@metadata][fingerprint]"
View gist:278eaeddfab33479dbe545e291949732
public async Task<string> Post<T>(string path, T data)
{
using (var client = new HttpClient())
{
client.Timeout = new TimeSpan(0, 0, 5);
client.DefaultRequestHeaders.Accept.Clear();
client.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue("application/json"));
var json = JsonConvert.SerializeObject(data);
@riccardone
riccardone / app.component.html
Last active Feb 19, 2017
Angular2 Customers module example
View app.component.html
<ul>
<li *ngFor="let customer of customersList">{{customer.name}}</li>
</ul>
@riccardone
riccardone / gist:29bcdf99588b2c22022f5eaef0c9de39
Created Feb 10, 2017
Apache2 Angular2 static website Dockerfile
View gist:29bcdf99588b2c22022f5eaef0c9de39
FROM ubuntu:16.04
RUN apt update
RUN apt install -y apache2
COPY dist /var/www/html
CMD /usr/sbin/apache2ctl -D FOREGROUND
EXPOSE 80
You can’t perform that action at this time.