Skip to content

Instantly share code, notes, and snippets.

View M3lkior's full-sized avatar

Ludovic Dussart M3lkior

View GitHub Profile
@M3lkior
M3lkior / maven-install.sh
Last active March 5, 2018 09:27
Maven Installation (on CentOs 7)
# The first thing we need to do is to download the Maven tar file and untar it to a shared location on the workstation
# wget required (yum install wget)
# STEP 1 - Get Maven Install
export JAVA_HOME='/etc/alternatives/jre_1.8.0'
export MAVEN_VERSION='3.5.2'
export MAVEN_MIRROR='http://apache.mindstudios.com'
wget $MAVEN_MIRROR/maven/maven-3/$MAVEN_VERSION/binaries/apache-maven-$MAVEN_VERSION-bin.tar.gz -P /tmp
@M3lkior
M3lkior / git-install.sh
Created March 1, 2018 16:38
Git install from archive
# Based on https://www.digitalocean.com/community/tutorials/how-to-install-git-on-centos-7#option-two-%E2%80%94-install-git-from-source
yum groupinstall "Development Tools"
yum install gettext-devel openssl-devel perl-CPAN perl-devel
#if necessary
#yum install zlib-devel
#yum install perl-ExtUtils-MakeMaker
export GIT_VERSION='2.16.2'
wget https://github.com/git/git/archive/v$GIT_VERSION.tar.gz -O /tmp/git.tar.gz
su -c 'tar -zxvf /tmp/git.tar.gz' -C /tmp'
@M3lkior
M3lkior / asyncapi.yaml
Last active October 12, 2020 08:48
AsyncAPI / Avro generation issue with avro enum type
asyncapi: 2.0.0
info:
title: Test Async API
version: '0.1.0'
channels:
example:
publish:
message:
@M3lkior
M3lkior / AbstractAvroMessagesSupport.java
Last active September 28, 2022 14:20
Zerocode AVRO support
import com.fasterxml.jackson.databind.ObjectMapper;
import com.google.common.io.Resources;
import com.google.gson.Gson;
import com.google.inject.Inject;
import com.google.inject.name.Named;
import org.apache.avro.io.DatumReader;
import org.apache.avro.specific.SpecificRecordBase;
import org.apache.commons.lang3.StringUtils;
import org.apache.kafka.clients.producer.KafkaProducer;
import org.apache.kafka.clients.producer.Producer;