Skip to content

Instantly share code, notes, and snippets.

#!/bin/bash
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
@Riduidel
Riduidel / kafka-connect.properties
Created February 11, 2019 09:35
kafka-connect.properties
root@kafka-connect:/# cat /etc/kafka-connect/kafka-connect.properties
config.storage.replication.factor=1
status.storage.replication.factor=1
ssl.protocol=TLS
schema.registry.basic.auth.credentials.source=USER_INFO
key.converter.schema.registry.url=https://kafka-test-adeo-disp.aivencloud.com:24120
key.converter.basic.auth.user.info=LOGIN:PASSWORD
key.converter=io.confluent.connect.avro.AvroConverter
schema.registry.basic.auth.user.info=LOGIN:PASSWORD
ssl.keystore.password=secret
@Riduidel
Riduidel / docker-compose.yml
Created February 11, 2019 09:15
kafka-connect branché chez aiven
version: '2.1'
services:
kafka-connect:
image: confluentinc/cp-kafka-connect:5.0.0
hostname: kafka-connect
ports:
- "48083:8083"
- "5000:5000"
environment:
from flask import Flask
from flask import jsonify
from flask import request
from json import JSONEncoder
class MyEncoder(JSONEncoder):
def default(self, o):
return o.__dict__
app = Flask(__name__)
version: '2.1'
services:
zoo1:
image: zookeeper:3.4.9
restart: unless-stopped
hostname: zoo1
ports:
- "42181:2181"
environment:
public class Launcher extends io.vertx.core.Launcher {
public static void main(String[] args) {
new Launcher().dispatch(args);
}
@Override
public void beforeStartingVertx(VertxOptions options) {
super.beforeStartingVertx(options);
options.setMetricsOptions(new MicrometerMetricsOptions()
.setPrometheusOptions(new VertxPrometheusOptions().setEnabled(true)).setEnabled(true));
#[cfg(test)] // <1>
mod tests {
// <2>
use super::*; // <3>
#[test]
fn can_evaluate_r_r() {
// <4>
assert_eq!(evaluate(vec!(Color::RED), vec!(Color::RED)), (1, 0)) // <5>
}
#[derive(Debug, Copy, Clone)]
struct Cage {
pub sick:i32,
pub healthy:i32,
pub alive:i32
}
impl Cage {
pub fn derive(self)->Cage {
//...
<!DOCTYPE html>
<html lang="en">
<meta>
<meta charset="UTF-8">
<title>Hello World in Vue.js</title>
</meta>
<body>
<div id="hello-world-app">