Skip to content

Instantly share code, notes, and snippets.

@seko0716
seko0716 / ArchUnitInternalApiTest.java
Created October 10, 2025 16:52
apiguardian internal validation
package com.example.archunit;
import com.tngtech.archunit.core.domain.*;
import com.tngtech.archunit.lang.*;
import com.tngtech.archunit.junit.AnalyzeClasses;
import com.tngtech.archunit.junit.ArchTest;
import org.apiguardian.api.API;
import java.util.Set;
import java.util.stream.Collectors;
@seko0716
seko0716 / QuarkusReactiveSseHeartBeat.java
Created August 31, 2023 16:47
Quarkus Reactive Sse Heart Beat
import io.smallrye.mutiny.Multi;
import io.smallrye.mutiny.Uni;
import io.smallrye.mutiny.infrastructure.Infrastructure;
import org.jboss.resteasy.reactive.RestStreamElementType;
import javax.ws.rs.GET;
import javax.ws.rs.Path;
import javax.ws.rs.Produces;
import javax.ws.rs.core.MediaType;
@seko0716
seko0716 / StrangeKotlin.kt
Last active April 14, 2020 16:12
Type inference failed. Expected type mismatch: inferred type is List<Any?> but List<out Serializable?> was expected - for last two methods
import org.junit.jupiter.api.Test
import java.io.BufferedWriter
import java.io.FileWriter
import java.io.Serializable
import java.util.stream.Collectors
import java.util.stream.Stream
class StrangeKotlinApplicationTests {
@seko0716
seko0716 / bbrpp.kt
Last active December 23, 2019 06:58
import org.springframework.beans.factory.annotation.Autowired
import org.springframework.beans.factory.config.ConfigurableListableBeanFactory
import org.springframework.beans.factory.support.BeanDefinitionBuilder
import org.springframework.beans.factory.support.BeanDefinitionRegistry
import org.springframework.beans.factory.support.BeanDefinitionRegistryPostProcessor
import org.springframework.boot.autoconfigure.SpringBootApplication
import org.springframework.boot.context.properties.ConfigurationProperties
import org.springframework.boot.context.properties.EnableConfigurationProperties
import org.springframework.boot.runApplication
import org.springframework.context.annotation.Bean
package seko.es.join.service
import org.springframework.beans.factory.annotation.AnnotatedGenericBeanDefinition
import org.springframework.beans.factory.annotation.Autowired
import org.springframework.beans.factory.config.ConfigurableListableBeanFactory
import org.springframework.beans.factory.support.BeanDefinitionBuilder
import org.springframework.beans.factory.support.BeanDefinitionRegistry
import org.springframework.beans.factory.support.BeanDefinitionRegistryPostProcessor
import org.springframework.boot.autoconfigure.SpringBootApplication
import org.springframework.boot.context.properties.ConfigurationProperties
package seko.es.join.service
import org.springframework.beans.factory.annotation.AnnotatedGenericBeanDefinition
import org.springframework.beans.factory.annotation.Autowired
import org.springframework.beans.factory.config.ConfigurableListableBeanFactory
import org.springframework.beans.factory.support.BeanDefinitionBuilder
import org.springframework.beans.factory.support.BeanDefinitionRegistry
import org.springframework.beans.factory.support.BeanDefinitionRegistryPostProcessor
import org.springframework.boot.autoconfigure.SpringBootApplication
import org.springframework.boot.context.properties.ConfigurationProperties
@seko0716
seko0716 / vip-with-keepalived.md
Created February 8, 2019 09:09 — forked from maprangzth/vip-with-keepalived.md
VIP for Elasticsearch and Logstash with Keepalived

VIP for Elasticsearch and Logstash with Keepalived

Step 1: Install keepalived

# yum -y install keepalived
# chkconfig keepalived on
import groovy.json.JsonSlurper
def es = "http://localhost:9200"
def jsonSlurper = new JsonSlurper()
new File("./er").listFiles().each {
def er = jsonSlurper.parse(it)
def erId = er._id
package taxi_lab;
import org.apache.commons.collections.ListUtils;
import org.apache.spark.SparkConf;
import org.apache.spark.api.java.JavaRDD;
import org.apache.spark.api.java.JavaSparkContext;
import scala.Tuple2;
import java.util.ArrayList;
import java.util.Arrays;