Skip to content

Instantly share code, notes, and snippets.

@jun06t
jun06t / kibana
Last active February 3, 2016 06:15
kibana init.d script for ubuntu
#!/bin/sh
#
# /etc/init.d/kibana -- startup script for kibana4
#
### BEGIN INIT INFO
# Provides: kibana
# Required-Start: $network $remote_fs $named
# Required-Stop: $network $remote_fs $named
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
version: '2.4'
services:
gateway:
build:
context: .
dockerfile: Dockerfile-gateway
networks:
- front-proxy
expose:
static_resources:
listeners:
- address:
socket_address:
address: 0.0.0.0
port_value: 8000
filter_chains:
- filters:
- name: envoy.http_connection_manager
config:
static_resources:
listeners:
- address:
socket_address:
address: 0.0.0.0
port_value: 10000
filter_chains:
- filters:
- name: envoy.http_connection_manager
config:
@jun06t
jun06t / vault-golang-login
Created July 13, 2018 15:56
Golang Vault Login Sample
package main
import (
"encoding/json"
"fmt"
"net/http"
"time"
"github.com/hashicorp/vault/api"
"github.com/hashicorp/vault/builtin/credential/aws"
@jun06t
jun06t / consul.service
Last active July 31, 2018 18:13
Consul agent systemd
### BEGIN INIT INFO
# Provides: consul
# Required-Start: $local_fs $remote_fs
# Required-Stop: $local_fs $remote_fs
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Consul agent
# Description: Consul service discovery framework
### END INIT INFO
@jun06t
jun06t / vault.service
Created July 31, 2018 18:14
Vault server systemd
### BEGIN INIT INFO
# Provides: vault
# Required-Start: $local_fs $remote_fs
# Required-Stop: $local_fs $remote_fs
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Vault server
# Description: Vault secret management tool
### END INIT INFO
@jun06t
jun06t / vault
Created July 31, 2018 18:15
logrotate definition for vault
/var/log/vault/*.log {
daily
missingok
rotate 52
compress
delaycompress
notifempty
create 644 vault vault
sharedscripts
postrotate
@jun06t
jun06t / gist:e0f11411a0aa8e3035d6ed4057d1aa69
Created December 31, 2019 06:03
DAMM Algorithm tables
from http://www.md-software.de/math/DAMM_Quasigruppen.txt
Quasigruppen für den DAMM Algorithmus, mit den Eigenschaften
1. (c*x)*y=(c*y)*x => x=y
2. x*x=0
Wichtig: die Quasigruppen sind nur gedacht für die Kontrollgleichung
(...((0 * x_m) * x_{m-1}) * ...) * x_0 = 0
wobei
x_0 := (...((0 * x_m) * x_{m-1}) * ...) * x_1