This file contains 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 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 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 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 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 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 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"> |
This file contains 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 | |
# | |
# The MIT License | |
# | |
# Copyright 2013-2015 Jakub Jirutka <[email protected]>. | |
# | |
# Permission is hereby granted, free of charge, to any person obtaining a copy | |
# of this software and associated documentation files (the "Software"), to deal | |
# in the Software without restriction, including without limitation the rights | |
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell |
This file contains 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' | |
services: | |
registrator: | |
image: gliderlabs/registrator:master | |
network_mode: host | |
volumes: | |
- /var/run/docker.sock:/tmp/docker.sock | |
tty: true | |
restart: always | |
command: |
This file contains 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: | |
asciidoc-builder: | |
build: . | |
command: mvn install | |
volumes: | |
- .:/usr/src/app/ | |
- ~/.m2:/root/.m2 |