scenarios: TMPDIR=new/path make
and make TMPDIR=new/path
SHELL := env TMPDIR=$(TMPDIR) $(SHELL)
TMPDIR ?= "/tmp"
all:
@echo $(TMPDIR)
#clone the repo | |
git clone http://git.ipxe.org/ipxe.git | |
cd ipxe/src | |
cat >ubuntu-amd64-installer.ipxe <<EOF | |
#!ipxe | |
dhcp | |
echo Starting Ubuntu x64 installer for ${hostname} | |
set base-url http://archive.ubuntu.com/ubuntu/dists/trusty/main/installer-amd64/current/images/netboot/ubuntu-installer/amd64 | |
kernel ${base-url}/linux |
scenarios: TMPDIR=new/path make
and make TMPDIR=new/path
SHELL := env TMPDIR=$(TMPDIR) $(SHELL)
TMPDIR ?= "/tmp"
all:
@echo $(TMPDIR)
tar cvJ /etc/vpm/ | age -r $(curl -qsSL https://f.apealive.net/pub/$USER.age.pub) | croc send | |
Receiving side | |
# cat croc-stdin-2310548854 | age -d -i <(pass show age-$USER-public) | tar xvJ |
``` | |
{__name__=~".+",site=~"gc1-iad-01",pod=~"(keycloak-s1-).*"} | |
``` |
``` | |
apt install siege -y | |
siege -c 255 -t 5m https://my.tls.host/api/status | |
``` |
# From https://www.topbug.net/blog/2013/04/14/install-and-use-gnu-command-line-tools-in-mac-os-x/ | |
export PATH="$(brew --prefix coreutils)/libexec/gnubin:/usr/local/bin:$PATH" | |
brew install coreutils | |
brew install gnu-tar --with-default-names | |
# alternatively | |
brew install binutils | |
brew install diffutils |
#!/bin/bash | |
printf_stdin() { local stdin; read -d '' -u 0 stdin; printf "$@" "$stdin"; } | |
exec {log_fd}> >(systemd-cat -t $(basename $0)) | |
log_emerg() { echo "EMERG: $1"|tee /dev/stderr| printf_stdin '<0>%s\n' "$1" >&"$log_fd"; } | |
log_alert() { echo "ALERT: $1"|tee /dev/stderr| printf_stdin '<1>%s\n' "$1" >&"$log_fd"; } | |
log_crit() { echo "CRIT: $1" |tee /dev/stderr| printf_stdin '<2>%s\n' "$1" >&"$log_fd"; } | |
log_err() { echo "ERROR: $1"|tee /dev/stderr| printf_stdin '<3>%s\n' "$1" >&"$log_fd"; } | |
log_warn() { echo "WARN: $1" |tee /dev/stderr| printf_stdin '<4>%s\n' "$1" >&"$log_fd"; } |