Skip to content

Instantly share code, notes, and snippets.

Avatar

Riccardo Di Nuzzo riccardone

View GitHub Profile
View gist:25e137b63f1e59a800e28d915df534f6
> docker build -t yourprogramname-image -f Dockerfile .
> docker create --name yourprogramname-container yourprogramname-image
> docker start yourprogramname-container
> docker logs yourprogramname-container
@riccardone
riccardone / gist:ee52006df1c03145ca46d305a11b4ee9
Created Aug 25, 2020
Dockerfile for .Net Core 3.1 Console App
View gist:ee52006df1c03145ca46d305a11b4ee9
FROM mcr.microsoft.com/dotnet/core/aspnet:3.1
COPY bin/Release/netcoreapp3.1 App/
WORKDIR /App
ENTRYPOINT ["dotnet", "yourprogramname.dll"]
View Set Up and Run EventStore on Linux
# packages are from https://packagecloud.io/EventStore/EventStore-OSS
# register the repository
curl -s https://packagecloud.io/install/repositories/EventStore/EventStore-OSS/script.deb.sh | sudo bash
# install EventStore (change with latest version if needed)
sudo apt-get install eventstore-oss=5.0.8-1
# edit /etc/systemd/system/eventstore.service
# add `RestartSec=5` to section [Service]
# edit /etc/eventstore/eventstore.config with the following
@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]"