Mostly geared towards GNU make
I've used ->|
to indicate a tab character, as it's clearer to read than ⇥
- Set a target, its dependencies and the commands to execute in order
target: [dependencies]
->|
#!/bin/sh | |
prog_name=${0##*/} | |
version=1.0 | |
version_text="Boilerplate for new scripts v$version" | |
options="h o: q v V" | |
help_text="Usage: $prog_name [-o <text>] [-hqvV] [<file>]... | |
Boilerplate for new scripts |
#!/bin/bash | |
set -eo pipefail | |
json=`cat $1 | y2j` | |
overrides=`echo "$json" | jq "{spec}"` | |
name=`echo "$json" | jq -r ".metadata.name"` | |
labels=`echo "$json" | jq -r '.metadata.labels | keys[] as $k | "\($k)=\(.[$k])"' | paste -sd "," -` | |
image=`echo "$json" | jq -r ".spec.containers[0].image"` |
kubectl run myubuntu --image ubuntu --rm -ti --restart=Never --overrides=' | |
{ | |
"metadata": { | |
"labels": { | |
"diditwork": "itdid" | |
} | |
}, | |
"spec": { | |
"containers": [ | |
{ |
tap "caskroom/cask" | |
cask "google-chrome" | |
cask "firefox" | |
brew "chromedriver" | |
brew "geckodriver" |
apk add --no-cache -X http://dl-cdn.alpinelinux.org/alpine/edge/testing \ | |
x11vnc |
# use the latest ubuntu environment (18.04) available on travis | |
dist: bionic | |
language: go | |
# You don't need to test on very old versions of the Go compiler. It's the user's | |
# responsibility to keep their compiler up to date. | |
go: | |
- 1.16.x |
namespaces - overview of Linux namespaces http://man7.org/linux/man-pages/man7/namespaces.7.html
mount_namespaces - overview of Linux mount namespaces
#!/bin/bash | |
# Provide key uid from `gpg --list-keys` | |
# Based on: https://blog.tersmitten.nl/how-to-ultimately-trust-a-public-key-non-interactively.html | |
KEY_NAME="" | |
echo "$( \ | |
gpg --list-keys --fingerprint \ | |
| grep "${KEY_NAME}" -B 1 | head -1 \ | |
| tr -d '[:space:]' | awk 'BEGIN { FS = "=" } ; { print $2 }' \ |