Skip to content

Instantly share code, notes, and snippets.

Avatar
😀

Alex Collins alexec

😀
View GitHub Profile
@alexec
alexec / tcpkill.md
Created Jun 29, 2021
How to use tcpkill with Docker
View tcpkill.md

How to use tcpkill to simulate network failure (e.g. for FMEA testing) by breaking network connections between your pod and a remote service.

I'm assuming your pod runs as non-root.

You'll need to add your user to the sudoers file, so in your Dockerfile:

FROM ubuntu
# ...
RUN adduser --disabled-password --uid 9653 runner
@alexec
alexec / run.sh
Created Jun 29, 2021
How to find out what files are on a Docker image without a shell
View run.sh
docker export $(docker run -d ubuntu) | tar -t
View outputs.json
{
"parameters": [
{
"name": "my-param",
"value": "my-value"
}
]
}
View argocdws
#! /bin/sh
set -eu
export ARGOCD_UI_PATH=$ARGOCD_PATH/../argo-cd-ui
[ ! -d $ARGOCD_PATH ] && echo "$ARGOCD_PATH does not exist" >&2 && exit 1
[ ! -d $ARGOCD_UI_PATH ] && echo "$ARGOCD_UI_PATH does not exist" >&2 && exit 1
scale() {
set -eu
View checkstyle.functions
#!/bin/sh
set -Eeuo pipefail
get_xml_attribute() {
set -Eeuo pipefail
name=$1
while read line ; do
echo $line | sed "s/.*$name=\"\([^\"]*\)\".*/\1/"
done
}
View recommended-reading.md
View style.puml
skinparam shadowing false
skinparam defaultFontName "Futura"
skinparam activityArrowColor Black
skinparam activityBackgroundColor White
skinparam activityBorderColor Black
skinparam actorBackgroundColor White
skinparam actorBorderColor Black
View plantuml.txt
skinparam monochrome true
skinparam shadowing false
skinparam handwritten false
autonumber