Skip to content

Instantly share code, notes, and snippets.

View cer's full-sized avatar

Chris Richardson cer

View GitHub Profile
#!/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
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)
@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
@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)
{
"version": "2.0.0",
"tasks": [
{
"label": "Build Chapter 04",
"type": "shell",
"command": "...my shell command...",
"problemMatcher": [],
"group": {
"kind": "build",
{
"asyncapi": "3.0.0",
"info": {
"title": "${spring.application.name}",
"version": "1.0.0",
"x-generator": "springwolf"
},
"defaultContentType": "application/json",
"servers": {
"eventuate-consumer": {
@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": {