Skip to content

Instantly share code, notes, and snippets.

@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">
@Riduidel
Riduidel / keytool-import.sh
Last active January 24, 2018 08:10 — forked from jirutka/keytool-import.sh
Script to import key/certificate pairs into an existing Java keystore
#!/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
version: '2'
services:
registrator:
image: gliderlabs/registrator:master
network_mode: host
volumes:
- /var/run/docker.sock:/tmp/docker.sock
tty: true
restart: always
command:
version: '2.1'
services:
asciidoc-builder:
build: .
command: mvn install
volumes:
- .:/usr/src/app/
- ~/.m2:/root/.m2