Skip to content

Instantly share code, notes, and snippets.

View cer's full-sized avatar

Chris Richardson cer

View GitHub Profile
@cer
cer / request-reply.json
Created March 7, 2025 12:58
request-reply.json
{
"asyncapi": "3.0.0",
"info": {
"title": "${spring.application.name}",
"version": "1.0.0",
"x-generator": "springwolf"
},
"defaultContentType": "application/json",
"servers": {
"eventuate-consumer": {
{
"asyncapi": "3.0.0",
"info": {
"title": "${spring.application.name}",
"version": "1.0.0",
"x-generator": "springwolf"
},
"defaultContentType": "application/json",
"servers": {
"eventuate-consumer": {
{
"version": "2.0.0",
"tasks": [
{
"label": "Build Chapter 04",
"type": "shell",
"command": "...my shell command...",
"problemMatcher": [],
"group": {
"kind": "build",
@cer
cer / omnigraffle-export.sh
Last active January 12, 2021 03:41
Bash/Applescript to export Omnigraffle file
#! /bin/bash
# FORMAT is PNG, SVG, ...
FORMAT=${1?}
INPUT="$(pwd)/${2?}"
OUTPUT="$(pwd)/${3?}"
tmpfile=$(mktemp /tmp/abc-script.XXXXXX)
@cer
cer / omnigraffle-export.scpt
Created January 11, 2021 22:00
Applescript for exporting omnigraffle file as PNG
on convertGraffleFile(graffleFile, outputFile)
tell application "OmniGraffle"
close every document
open graffleFile
tell front document to export as "PNG" to POSIX file outputFile scope all graphics
close front document
end tell
end convertGraffleFile
on run argv
java.net.UnknownHostException: customerservice: Name or service not known
at java.net.Inet4AddressImpl.lookupAllHostAddr(Native Method) ~[na:1.8.0_252]
Suppressed: reactor.core.publisher.FluxOnAssembly$OnAssemblyException:
Assembly trace from producer [reactor.core.publisher.MonoLift] :
reactor.core.publisher.Mono.create
reactor.netty.resources.PooledConnectionProvider$PooledConnectionAllocator.connectChannel(PooledConnectionProvider.java:219)
Error has been observed at the following site(s):
|_ Mono.create ⇢ at reactor.netty.resources.PooledConnectionProvider$PooledConnectionAllocator.connectChannel(PooledConnectionProvider.java:219)
|_ Mono.from ⇢ at reactor.netty.internal.shaded.reactor.pool.PoolBuilder.from(PoolBuilder.java:59)
|_ ⇢ at reactor.netty.internal.shaded.reactor.pool.DefaultPoolConfig.allocator(DefaultPoolConfig.java:100)
#!/bin/bash -e
curl -s --location https://microservices.io/patterns | \
sed -n -e '/<a href="[/.]/d' -e '/<a href="/!d' -e 's/.*href="//' -e 's/".*//' -e '/http/d' -e '/cn\//d' -e '/./p' | \
sort -u | \
sk | \
sed -e 's?\(.*\)?https://microservices.io/patterns/\1?' | \
pbcopy
#! /bin/bash -e
grep eventuate gradle.properties
fixVersion() {
name=${1?}
version=${2?}
sed -i "" -e "s/${name}=.*/${name}=${version}/" gradle.properties
}
@cer
cer / DefaultController.java
Last active January 14, 2023 18:17
Spring Webflux-based proxying controller
import org.springframework.core.io.buffer.DefaultDataBufferFactory;
import org.springframework.http.MediaType;
import org.springframework.http.server.reactive.ServerHttpRequest;
import org.springframework.http.server.reactive.ServerHttpResponse;
import org.springframework.stereotype.Controller;
import org.springframework.util.Assert;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.reactive.function.client.WebClient;
@cer
cer / pom.xml
Created February 22, 2017 13:49
Eventuate Local pom.xml
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>io.eventuate.examples.mavenexample</groupId>
<version>0.1.0-SNAPSHOT</version>
<artifactId>Maven-Example</artifactId>
<packaging>jar</packaging>
<name>maven example</name>
<repositories>
<repository>