Skip to content

Instantly share code, notes, and snippets.

Avatar
💭
Coding

Kenny Bastani kbastani

💭
Coding
View GitHub Profile
View keybase.md

Keybase proof

I hereby claim:

  • I am kbastani on github.
  • I am kbastani (https://keybase.io/kbastani) on keybase.
  • I have a public key ASDY5WBsVgYdDXHnPLnzvgJ7ZtIbPfuJd8VlbJ8yV08yAgo

To claim this, I am signing this object:

@kbastani
kbastani / cqrs-es-axon-cf.md
Created Sep 5, 2018
CQRS + ES Axon Cloud Foundry
View cqrs-es-axon-cf.md
@kbastani
kbastani / Aggregate.java
Last active Jan 21, 2019
Simpler KStream API Example: See KafkaController.java
View Aggregate.java
public class Aggregate<T> implements Aggregator<Long, KafkaEvent, KafkaEvent> {
private final Class<T> clazz;
private final Aggregator<Long, T, T> aggregation;
public Aggregate(Class<T> clazz, Aggregator<Long, T, T> aggregation) {
this.clazz = clazz;
this.aggregation = aggregation;
}
@kbastani
kbastani / .block
Created Jun 3, 2017
Force-directed Graph Voronoi Sphere
View .block
license: gpl-3.0
@kbastani
kbastani / .block
Created Jun 3, 2017
Force-directed Graph Voronoi Diagram
View .block
license: gpl-3.0
View tla.tla
VARIABLE clock
Init == clock \in {0, 1}
Tick == IF clock = 0 THEN clock' = 1 ELSE clock' = 0
Spec == Init /\ [][Tick]_<<clock>>
@kbastani
kbastani / mvnw-fix.sh
Last active Jun 6, 2021
Adds a settings.xml file to your Spring Boot maven wrapper
View mvnw-fix.sh
#!/usr/bin/env bash
# Secure workaround for https://issues.sonatype.org/browse/MVNCENTRAL-1369
# Navigate to the root of your Spring Boot project where a Maven wrapper is present and run this script
cd .mvn/wrapper
wget https://gist.githubusercontent.com/kbastani/d4b4c92969ec5a22681bb3daa4a80343/raw/f166086ef051369383b02dfb74317cd07b6f2c6e/settings.xml
cd ../../
./mvnw clean install -s .mvn/wrapper/settings.xml
View User.java
package com.example;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
@Entity
public class User {
@kbastani
kbastani / WebConfig.java
Created Sep 9, 2015
How to support XML as a Spring WebMvc REST service
View WebConfig.java
@EnableWebMvc
@Configuration
public class WebConfig extends WebMvcConfigurerAdapter {
@Override
public void configureMessageConverters(List<HttpMessageConverter<?>> converters) {
messageConverters.add(createXmlHttpMessageConverter());
messageConverters.add(new MappingJackson2HttpMessageConverter());
super.configureMessageConverters(converters);
@kbastani
kbastani / microservices.adoc
Last active May 20, 2021
Using Graph Analysis to Design Microservice Architectures in the Cloud
View microservices.adoc

Using Graph Analysis to Design Microservice Architectures in the Cloud

This interactive Neo4j graph tutorial covers how to use graph analysis to find software modules that are highly centralized, making good candidates to be decomposed into microservices.