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
| #!/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 | |
| # |
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
| # 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 |
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
| 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 |
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
| version: '2.1' | |
| services: | |
| kafka-connect: | |
| image: confluentinc/cp-kafka-connect:5.0.0 | |
| hostname: kafka-connect | |
| ports: | |
| - "48083:8083" | |
| - "5000:5000" | |
| environment: |
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
| 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__) |
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
| version: '2.1' | |
| services: | |
| zoo1: | |
| image: zookeeper:3.4.9 | |
| restart: unless-stopped | |
| hostname: zoo1 | |
| ports: | |
| - "42181:2181" | |
| environment: |
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
| 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)); |
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
| #[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> | |
| } |
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
| #[derive(Debug, Copy, Clone)] | |
| struct Cage { | |
| pub sick:i32, | |
| pub healthy:i32, | |
| pub alive:i32 | |
| } | |
| impl Cage { | |
| pub fn derive(self)->Cage { | |
| //... |
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
| <!DOCTYPE html> | |
| <html lang="en"> | |
| <meta> | |
| <meta charset="UTF-8"> | |
| <title>Hello World in Vue.js</title> | |
| </meta> | |
| <body> | |
| <div id="hello-world-app"> |