Create the directory $ZSH_CUSTOM/wsl-helpers and place the wsl-helpers.plugins.zsh file in that directory.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import java.util.List; | |
| import java.util.Map; | |
| import java.util.Map.Entry; | |
| import java.util.TreeMap; | |
| import java.util.stream.Collectors; | |
| class Scratch { | |
| public static void main(String[] args) { | |
| final TreeMap<Object, Object> results = List.of( |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| resources: | |
| requests: | |
| cpu: 4000m | |
| memory: 4Gi | |
| limits: | |
| cpu: 5000m | |
| memory: 4Gi |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| : ${JMX_HOST:=0.0.0.0} | |
| : ${JMX_PORT:=7091} | |
| JVM_OPTS="${JVM_OPTS} | |
| -Dcom.sun.management.jmxremote.local.only=false | |
| -Dcom.sun.management.jmxremote.port=${JMX_PORT} | |
| -Dcom.sun.management.jmxremote.rmi.port=${JMX_PORT} | |
| -Dcom.sun.management.jmxremote.authenticate=false | |
| -Dcom.sun.management.jmxremote.ssl=false | |
| -Dcom.sun.management.jmxremote.host=${JMX_HOST} | |
| -Djava.rmi.server.hostname=${JMX_HOST}" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # unit is milliseconds | |
| -Dreactor.netty.pool.maxLifeTime=10000 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import lombok.extern.slf4j.Slf4j; | |
| import org.springframework.kafka.annotation.KafkaListener; | |
| import org.springframework.stereotype.Service; | |
| @Service | |
| @Slf4j | |
| public class ConsumerService { | |
| @KafkaListener(topics = "my-topic") | |
| public void consumeMessage(String message) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| docker run --rm -v ${PWD}:/data pandoc/latex input.md -o output.docx |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| web: | |
| image: itzg/rcon | |
| environment: | |
| RWA_USERNAME: admin | |
| RWA_PASSWORD: admin | |
| RAW_ADMIN: "TRUE" | |
| # is referring to the hostname of 'mc' compose service below | |
| RWA_RCON_HOST: mc | |
| # needs to match the password configured for the container, which is 'minecraft' by default | |
| RWA_RCON_PASSWORD: minecraft |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import java.util.Arrays; | |
| import java.util.List; | |
| class ExampleOfComposableExpressions { | |
| public static void main(String[] args) { | |
| // Equivalent to | |
| // expr := ( (idle <= 10) || (usage > 80) ) && (available =~ /^y(es)?/) | |
| Expression expr = | |
| new LogicalExpression( |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import io.micrometer.core.instrument.MeterRegistry; | |
| import io.micrometer.core.instrument.binder.kafka.KafkaStreamsMetrics; | |
| import org.springframework.context.annotation.Bean; | |
| import org.springframework.context.annotation.Configuration; | |
| import org.springframework.kafka.config.StreamsBuilderFactoryBeanCustomizer; | |
| /** | |
| * Binds a micrometer {@link KafkaStreamsMetrics} to the meter registry | |
| * for each Kafka stream created by Spring. | |
| */ |