Skip to content

Instantly share code, notes, and snippets.

asyncapi: 2.6.0
id: https://github.com/dalelane/my-asyncapi-v2-doc
info:
title: Modo Jeans order system
description: >
Need to write something here
### Using headers
@dalelane
dalelane / flink-deployment.yaml
Last active April 6, 2023 13:00
Example spec for creating a simple, unsecured, Operator-managed deployment of Apache Flink
@dalelane
dalelane / Dockerfile
Created March 31, 2023 14:07
Dockerfile for running Flink 1.17 with added connectors
FROM flink:1.17.0
#
# Add additional connectors not included in the default Flink image
#
# Kafka connectors
RUN wget -P /opt/flink/lib https://repo.maven.apache.org/maven2/org/apache/flink/flink-sql-connector-kafka/1.17.0/flink-sql-connector-kafka-1.17.0.jar
# PostgreSQL connectors
@dalelane
dalelane / nodejs_db_with_restapi.js
Created June 15, 2014 21:09
Node.js, Express, and SQLite to wrap a REST API around an SQL database
var sqlite3 = require('sqlite3').verbose();
var db = new sqlite3.Database('data/demodb02');
db.serialize(function() {
db.run("CREATE TABLE IF NOT EXISTS counts (key TEXT, value INTEGER)");
db.run("INSERT INTO counts (key, value) VALUES (?, ?)", "counter", 0);
});
@dalelane
dalelane / docker-compose.yaml
Created December 23, 2022 16:15
running development instance of IBM Event Streams using Docker Compose
version: "3"
services:
zookeeper:
platform: linux/amd64
image: cp.icr.io/cp/ibm-eventstreams-kafka:11.1.2
container_name: zookeeper
hostname: zookeeper
command:
[
@dalelane
dalelane / asyncapi-eda.yaml
Created April 3, 2022 12:19
sample AsyncAPI specification for describing a Kafka application
asyncapi: 2.3.0
# ---
id: 'urn:dalelane:stock-level-events'
# ---
info:
title: Stock level events
asyncapi: 2.0.0
# ---
id: 'urn:dalelane:stock-level-events'
# ---
info:
title: Stock level events
@dalelane
dalelane / setup-eem-truststore.sh
Last active November 22, 2021 12:07
set up a truststore for Kafka clients connecting to the Event Gateway in Event Endpoint Management (using the cert presented by the gateway)
# -------------------------------------------------------------------
# update these to match your Event Endpoint Management instance
# -------------------------------------------------------------------
NAMESPACE=eventendpointmanagement
INSTANCE=eem
echo "\n\033[1;33m getting SSL/TLS details for Event Gateway in...\033[0m"
echo "namespace : $NAMESPACE"
echo "instance : $INSTANCE"
{
"type": "record",
"namespace": "co.uk.dalelane",
"name": "TemperatureReading",
"fields": [
{
"name": "warehouse",
"type": {
"type": "enum",
"name": "Warehouse",
@dalelane
dalelane / asyncapi-kafka.yaml
Created November 27, 2020 11:57
Kafka spec in AsyncAPI
asyncapi: '2.0.0'
id: 'urn:some:unique:id'
info:
title: The whole spec
...
servers:
nameofmycluster:
url: someaddress:port
protocol: kafka-secure
security: