This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
iflist.c : retrieve network interface information thru netlink sockets | |
(c) Jean Lorchat @ Internet Initiative Japan - Innovation Institute | |
v1.0 : initial version - Feb 19th 2010 | |
This file was obtained at the following address : | |
http://www.iijlab.net/~jean/iflist.c |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import requests | |
import json | |
server = "https://ipam.ninux.org" | |
appid = "appid" | |
username = "username" | |
password = "password" | |
baseurl = server + "/api/" + appid |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# emulate a 3 nodes network using Linux network namespaces | |
# n1 -- r0 -- n2 | |
set -x | |
# cleanup | |
ip netns del n1 | |
ip netns del r0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
# A small ruby script to extract a git history to a tikz picture | |
# Author: Michael Hauspie <Michael.Hauspie@lifl.fr> | |
# Author: Lennart C. Karssen <lennart@karssen.org> | |
# Author: Claudio Pisa <claudio.pisa@uniroma2.it> | |
# | |
# Not clean code, not always working well, but does its job in most of | |
# the cases I needed :) | |
# |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# Documentation | |
# https://docs.gitlab.com/ce/api/projects.html#list-projects | |
BASE_PATH="https://gitlab.example.com/" | |
PROJECT_SEARCH_PARAM="" | |
PROJECT_SELECTION="." | |
PROJECT_PROJECTION="{ "path": .path_with_namespace, "git": .ssh_url_to_repo, "namespace": .namespace.full_path } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FONTNAME="Courier" | |
FONTSIZE=12 | |
SIZE="64,64" | |
BGCOLOR="black" | |
OUTNAME="/media/topologies/latest" | |
FILENAME="${OUTNAME}.dot" | |
/bin/nc localhost 2004 > ${FILENAME}.tmp | |
#if the topologies are repeated take only the last one |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
TARGET_IPK=$1 | |
if [ -z "$1" ]; then | |
echo "Usage: $0 <target ipk>" | |
exit 1 | |
fi | |
LOCALDIR="$(pwd)" |
NewerOlder