Skip to content

Instantly share code, notes, and snippets.


Hefesto misTrasteos

  • Madrid, Spain
View GitHub Profile
misTrasteos /
Last active Feb 20, 2021
Self hosted Apache Maven repository, Reposilite, PoC

What is this ?

This is a PoC of running a self hosted Apache Maven Repository, Reposilite, and use it as a distribution management.

Just running the usual mvn clean deploy, but deploy the jar into Reposilite.

All Apache Maven commands will run inside the Apache Maven Docker image


Docker Network

Building Maven containers needs to 'see' Reposilite ones. So we are going to create a network so as to all containers can see each other.

misTrasteos / Dockefile
Last active Feb 18, 2021
Trying to build my own github actions agent
View Dockefile
# DISCLAIMER, this is not the best way to build a Docker Image. It is still WIP, so I find this way easier to modify.
FROM ubuntu:20.04
ARG JAVA_VERSION=adoptopenjdk-8-hotspot
# general stuff
RUN apt-get update
RUN apt-get install wget -y
RUN apt-get install apt-transport-https -y
misTrasteos /
Created Feb 12, 2021
Download all maven dependencies into a folder using maven docker image

how to run

run this container from the root of your maven project.

docker run -it --rm -v "$(pwd)/dependencies":/root/.m2 -v "$(pwd)":/usr/src/mymaven -w /usr/src/mymaven maven mvn dependency:go-offline

All dependencies will be downloaded in this directory

misTrasteos /
Last active Feb 11, 2021
generate a random walk time series
import matplotlib.pyplot as plt
import numpy as np
numberOfDays = 7
minutesPerDay = 24 * 60
def addNoise(array, noise=5):
# some random noise
return array + np.random.rand( len(array) ) * noise
misTrasteos /
Created Feb 10, 2021
Generate a week of minutes for fake log purposes
import datetime
now =, microsecond=0)
# I use replace method to round to second and microsecond, as datetime is inmutable
minutesInAWeek = 7 * 24 * 60 # 7 days in a week, 24 hours a day, 60 minutes an hour
for i in reversed(range(minutesInAWeek)):
minuteInThePast = now - datetime.timedelta(minutes = i)
misTrasteos /
Last active Feb 2, 2021
generate a Docker image from a python script




from prometheus_client import start_http_server, Counter
import time
misTrasteos / Volumenes con Kubernetes y
Last active Jan 28, 2021
PersistentVolume en Kubernetes con Kind
View Volumenes con Kubernetes y

Volumenes con Kubernetes y Kind

Esto es una prueba de concepto de cómo funcionan los PersistentVolume en kubernetes. Creo un PersistentVolume y a partir de un PersistentVolumeClaim lo comparto entre dos contenedores. Un contenedor (aplicación java) escribe texto en el volumen. Mientras que el otro contenedor(un nginx) publica el contenido del volumen. He utilizado Kind.

Kind cluster

kind: Cluster
- role: control-plane
misTrasteos / Kubernetes hostPath volumes in
Last active Jan 24, 2021
Kubernetes hostPath volumes in Kind
View Kubernetes hostPath volumes in

create the cluster

We need to provide some extra options when creating the kind cluster.

kind: Cluster
- role: control-plane
  - hostPath: /kubernetes/volumes