Skip to content

Instantly share code, notes, and snippets.

@roelandvh
roelandvh / DeconstructMethodExample.cs
Last active October 31, 2018 08:39
Gists for infi.nl blogpost about Techorama 2018
public class Person
{
public string Firstname { get; }
public string Lastname { get; }
public Person(string firstname, string lastname)
{
Firstname = firstname;
Lastname = lastname;
}
@roelandvh
roelandvh / MySaga.cs
Created May 11, 2017 23:49
ADSD saga assignment
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using NServiceBus;
using static assignment.MySaga;
namespace assignment {
public class MySaga : Saga<MySagaData>,
IAmStartedByMessages<BuyItemMessage>,
@roelandvh
roelandvh / Instructions.md
Created March 29, 2017 19:50 — forked from shreyaskarnik/Instructions.md
Route Docker Logs to ELK Stack
  • With Docker 1.8.0 shipped new log-driver for GELF via UDP, this means that the logs from Docker Container(s) can be shipped directly to the ELK stack for further analysis.
  • This tutorial will illustrate how to use the GELF log-driver with Docker engine.
  • Step 1: Setup ELK Stack:
    • docker run -d --name es elasticsearch
    • docker run -d --name logstash --link es:elasticsearch logstash -v /tmp/logstash.conf:/config-dir/logstash.conf logstash logstash -f /config-dir/logstash.conf
    • Note the config for Logstash can be found at this link
    • docker run --link es:elasticsearch -d kibana
  • Once the ELK stack is up now let's fire up our nginx container which ships its logs to ELK stack.
  • LOGSTASH_ADDRESS=$(docker inspect --format '{{ .NetworkSettings.IPAddress }}' logstash)
  • `docker run -d --net=host --log-driver=gelf --log-opt gelf-address=u
@roelandvh
roelandvh / gist:f30edfc1c21e8a92732f
Last active August 29, 2015 14:13
test whether SSLv3 is enabled or not on a host
# Source: https://disablessl3.com/#test
openssl s_client -connect <host>:<port> -ssl3