Skip to content

Instantly share code, notes, and snippets.

View auryn31's full-sized avatar

Auryn Engel auryn31

View GitHub Profile
@Controller
class RestEndpoint {
var streamResponse: CSVStreamResponseOutput
constructor(csvStreamResponseOutput: CSVStreamResponseOutput) {
this.streamResponse = csvStreamResponseOutput
}
@GetMapping(path = ["stream"], produces = [MediaType.APPLICATION_STREAM_JSON_VALUE])
@Component
class CSVStreamResponseOutput : StreamingResponseBody {
var dataProvider: DataProvider
constructor(dataProvider: DataProvider) {
this.dataProvider = dataProvider
}
/**
@Component
class DataProvider {
/**
* create flowable from sampledata.csv
* @return every 100ms one line
*/
fun getDataStream(): Flowable<String> {
val csvFile = this::class.java.getResource("/static/sampledata.csv").openStream()
wget https://pysparksampledata.blob.core.windows.net/sampledata/sampledata.csv > sampledata.csv
wrk -c 400 -d 10 - latency - timeout 1s http://localhost:8080/cars-locust
FROM jboss/wildfly
ADD helloworld.war /opt/jboss/wildfly/standalone/deployments/
ARG WILDFLY_NAME
ARG CLUSTER_PW
ENV WILDFLY_NAME=${WILDFLY_NAME}
ENV CLUSTER_PW=${CLUSTER_PW}
...
wildfly1_1 | ... INFO [org.infinispan.CLUSTER] (MSC service thread 1-3) ISPN000094: Received new cluster view for channel ejb: [wildfly_2_test|1] (2) [wildfly_2_test, wildfly_1_test]
wildfly1_1 | ... INFO [org.infinispan.CLUSTER] (MSC service thread 1-5) ISPN000094: Received new cluster view for channel ejb: [wildfly_2_test|1] (2) [wildfly_2_test, wildfly_1_test]
wildfly1_1 | ... INFO [org.infinispan.CLUSTER] (MSC service thread 1-1) ISPN000094: Received new cluster view for channel ejb: [wildfly_2_test|1] (2) [wildfly_2_test, wildfly_1_test]
wildfly1_1 | ... INFO [org.infinispan.CLUSTER] (MSC service thread 1-7) ISPN000094: Received new cluster view for channel ejb: [wildfly_2_test|1] (2) [wildfly_2_test, wildfly_1_test]
...
wildfly2_1 | ... INFO [org.infinispan.CLUSTER] (remote-thread--p6-t2) [Context=client-mappings] ISPN100002: Starting rebalance with members [wildfly_2_test, wildfly_1_test], phase READ_OLD_WRITE_ALL, topology id 2
version: '3.5'
services:
wildfly1:
build:
context: .
args:
WILDFLY_NAME: wildfly_1_test
CLUSTER_PW: secret_password
image: wildfly_1_test
CMD ["/opt/jboss/wildfly/bin/standalone.sh", "-b", "0.0.0.0"]
@auryn31
auryn31 / firefoxIni.sh
Created April 10, 2018 15:44
create firefox ini
(echo -e "[General]\nStartWithLastProfile=1\n"; i=0; for folder in $(ls
-td */|grep -v "Pending Pings"|grep -v "Crash Reports"|grep -v
profiles.ini); do name=$(echo $folder|cut -f2 -d"."); echo -e
"[Profile$i]\nName=$name\nIsRelative=1\nPath=$folder\n"; i=$((i+1));
done) > profiles.ini