Skip to content

Instantly share code, notes, and snippets.

View riccardone's full-sized avatar

Riccardo Di Nuzzo riccardone

View GitHub Profile
> 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 August 25, 2020 08:41
Dockerfile for .Net Core 3.1 Console App
FROM mcr.microsoft.com/dotnet/core/aspnet:3.1
COPY bin/Release/netcoreapp3.1 App/
WORKDIR /App
ENTRYPOINT ["dotnet", "yourprogramname.dll"]
# 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.11-1
# sudo nano /etc/systemd/system/eventstore.service
# add `RestartSec=5` to section [Service]
# sudo nano /etc/eventstore/eventstore.conf with the following
@riccardone
riccardone / Indexer.cs
Created February 26, 2019 09:03
C# ElasticSearch Synchroniser for CQRS apps
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 December 5, 2018 17:52 — 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
#!/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 January 9, 2019 17:31
EventStore configuration for cluster node example
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 August 8, 2018 08:32
EventStore C# TestClusterConnection App
namespace TestClusterConnection
{
class Program
{
private const string Stream = "MyTestStream";
static void Main(string[] args)
{
try
{
@riccardone
riccardone / Dockerfile
Created August 8, 2018 08:31
Dockerfile C# minimal
FROM mono:4.6.2.16
ADD . /home/TestClusterConnection
CMD [ "mono", "home/TestClusterConnection/TestClusterConnection.exe" ]
@riccardone
riccardone / docker-compose.yaml
Created August 8, 2018 08:30
EventStore docker-compose.yaml
version: '3.4'
services:
esclienttest:
image: testclient
build:
context: .
dockerfile: Dockerfile
depends_on:
- eventstore1
@riccardone
riccardone / logstash-rdnltd.yml
Last active August 14, 2023 10:40
Configuration example for Logstash: from csv to EventStore
input {
file {
path => ["C:/inbound/*/*.csv"]
start_position => "beginning"
}
}
filter {
fingerprint {
source => "message"
target => "[@metadata][fingerprint]"