Skip to content

Instantly share code, notes, and snippets.

View mwmahlberg's full-sized avatar
🎯
Focusing

Markus Mahlberg mwmahlberg

🎯
Focusing
  • Cologne, Germany
View GitHub Profile
@mwmahlberg
mwmahlberg / .gitignore
Last active February 10, 2024 16:50
Code for the question 77971921 on Stackoverflow
.docker-build.*
FROM golang:1.12.0
ENV SRC_DIR=/go/src/vk_acceptor/
ADD . $SRC_DIR
# 1. Use workdir instead of `cd`, as cd is only valid for the current `RUN`.
WORKDIR $SRC_DIR
# 2. Use /usr/local/bin (or sbin) as per FHS. Adhere to the principle of least suprise - this is what you expect, too, or don't you?
// This is free and unencumbered software released into the public domain.
//
// Anyone is free to copy, modify, publish, use, compile, sell, or
// distribute this software, either in source code form or as a compiled
// binary, for any purpose, commercial or non-commercial, and by any
// means.
//
// In jurisdictions that recognize copyright laws, the author or authors
// of this software dedicate any and all copyright interest in the
// software to the public domain. We make this dedication for the benefit

Doublechecking of potential communication by influxd with 104.131.151.204

In a [question on Stackoverflow][so:op] the question was raised wether influxd would communicate with [104.131.151.204][co:dossier] despite reporting-disabled was set to true.

This gist contains all the data required to replicate my check on this.

Requirements to replicate

  • docker
  • No need for a dedicated network: docker compose autmatically sets one up for you
  • No need to export MongoDB's port: you can access it via docker exec -it test_mongodb_1 mongo
@mwmahlberg
mwmahlberg / 1OnoHive.md
Last active May 7, 2017 11:09
No Hive!

No Hive!

In diesem Dokument wird erklärt, warum der Hive aufgelöst wird und wie wir mit den verschiedenen Herausforderungen umgehen, die sich daraus ergeben.


[TOC]

Warum der Hive aufgelöst wird

Kurz gesagt -- er bringt nichts. Im Folgenden wird kurz auf die Argumente für einen Hive eingegangen und warum sie nicht ziehen.

@mwmahlberg
mwmahlberg / 1.0.md
Created April 1, 2017 21:09
1.0 Strategien

Strategien für 1.O

Diese Ideensammlung ist noch nicht ganz fertig, aber es sollte einen ersten Überblick geben.

Einführung

Ich nehme den Angriff von ZIP zum Anlass, um einige Dinge mal aufzuzeigen. Zum einen werde ich darlegen, warum ich Hives für einen Schmarren halte. Um das so verständlich wie möglich zu machen, muss ich ein wenig Grundsätzliches über Strategie erläutern. Das ist eher ein trockenes Thema (was viele überraschen wird), deswegen fasse ich mich da so kurz wie möglich. Schlussendlich werde ich eine Strategie vorschlagen, die sich grundlegend von anderen unterscheidet.

Grundsätzliche Überlegungen

Um mal mit einem Missverständnis direkt aufzuräumen. Strategie bei Strategiespielen hat wenig mit [Strategie beim Militär][wp:mil] zu tun, sondern mit [Spieltheorie][wp:st]. Im Grunde geht es bei jedem Strategiespiel darum, Ressourcen effizient so zu managen, dass man möglichst erfolgreich ist. Dazu gehören zwei Faktoren: Effizienter Ressourcengewinn und effektiver Ressourceneinsatz. Letzt

@mwmahlberg
mwmahlberg / regen2.sh
Last active June 30, 2016 17:58
Rework of the generator script for gogoprotobuf
#!/bin/bash -e
# This script fetches and rebuilds the "well-known types" protocol buffers.
# To run this you will need protoc and goprotobuf installed;
# see https://github.com/golang/protobuf for instructions.
# You also need Go and Git installed.
PKG=github.com/gogo/protobuf/ptypes
UPSTREAM=https://github.com/google/protobuf
UPSTREAM_SUBDIR=src/google/protobuf
# Data
{
"_id" : ObjectId("5744753e97bfc8000a18e3b2"),
"breeds" : [
"pomeranian"
],
"colors" : [
"apricot"
],
"delinquent" : false,
@mwmahlberg
mwmahlberg / Caddyfile
Created March 24, 2016 13:19
Basic Docker Image for Caddy + golang fcgi
:80
log stdout
startup /usr/local/bin/fcgiapp &
shutdown /usr/bin/killall fcgiapp
fastcgi / 127.0.0.1:10000