Skip to content

Instantly share code, notes, and snippets.

@cl4u2
cl4u2 / findcontainer.sh
Created May 12, 2020 07:40
Find the Docker container running the process with the specified process ID (PID) (as seen from the Docker host)
#!/bin/bash
targetpid=$1
parentpid=0
while [ $parentpid != 1 ]; do
parentpid=$(ps -o ppid= $targetpid)
docker ps -q | xargs docker inspect --format '{{.State.Pid}}, {{.Name}}' | grep "^$parentpid"
targetpid="$parentpid"
done
@cl4u2
cl4u2 / repomirror.sh
Created July 27, 2020 13:59
One-way mirror of a github repository into a gitlab repository
#!/bin/bash
REPONAME=$1
SRCURL=$2
DSTURL=$3
if [ -z "$DSTURL" ]; then
echo "Usage: $0 <repository name> <github URL> <gitlab SSH URL>"
exit 1
fi
@cl4u2
cl4u2 / openapi.yaml
Created January 17, 2025 10:35
EO4EU openapi
openapi: 3.0.2
info:
title: openEO API
version: 1.2.0
description: |-
The openEO API specification for interoperable cloud-based processing of large Earth observation datasets.
**Conformance class:** `https://api.openeo.org/1.2.0`
# API Principles