Skip to content

Instantly share code, notes, and snippets.

@inl-pd-autotest
inl-pd-autotest / retry2success.sh
Created December 28, 2017 13:01
retry2success
#!/bin/bash
if [ "$#" -lt 2 ]; then
echo "Usage: wait-for-it [host] [port] [timeout(optional)]"
exit 1
fi
host="$1"
port="$2"
timeout="${3:-0}"
@inl-pd-autotest
inl-pd-autotest / APKBUILD
Created December 10, 2018 15:49
Build script of ImageMagick-7.0.7.39 for Alpine Linux
# Contributor: Łukasz Jendrysik <[email protected]>
# Contributor: Carlo Landmeter <[email protected]>
# Maintainer: Natanael Copa <[email protected]>
# Source: https://git.alpinelinux.org/cgit/aports/tree/main/imagemagick/APKBUILD?h=3.8-stable
pkgname=imagemagick
pkgver=7.0.7.39
_abiver=7
_pkgver=${pkgver%.*}-${pkgver##*.}
pkgrel=1
pkgdesc="Collection of tools and libraries for many image formats"
@inl-pd-autotest
inl-pd-autotest / run.tpl
Created March 11, 2019 15:24 — forked from efrecon/run.tpl
`docker inspect` template to regenerate the `docker run` command that created a container
docker run \
--name={{.Name}} \
{{range $e := .Config.Env}}--env={{printf "%q" $e}} \
{{end}}{{range $p, $conf := .NetworkSettings.Ports}}{{with $conf}}-p {{(index $conf 0).HostIp}}:{{(index $conf 0).HostPort}}:{{$p}} \
{{end}}{{end}}{{range $n, $conf := .NetworkSettings.Networks}}{{with $conf}}--network {{printf "%q" $n}} \
{{range $conf.Aliases}}--network-alias {{printf "%q" .}} {{end}} \
{{end}}{{end}}{{range $v := .HostConfig.VolumesFrom}}--volumes-from={{printf "%q" .}} \
{{end}}{{range $v := .HostConfig.Binds}}--volume={{printf "%q" .}} \
{{end}}{{range $l, $v := .Config.Labels}}--label {{printf "%q" $l}}={{printf "%q" $v}} \
{{end}}{{range $v := .HostConfig.CapAdd}}--cap-add {{printf "%q" .}} \