scenarios: TMPDIR=new/path make
and make TMPDIR=new/path
SHELL := env TMPDIR=$(TMPDIR) $(SHELL)
TMPDIR ?= "/tmp"
all:
@echo $(TMPDIR)
#!/bin/bash | |
checkusage() { | |
[[ $# -lt 2 ]] && err_exit 'Usage: reencrypt.sh KEY_ID FILE...' | |
} | |
err() { echo -e "$@" >&2; } | |
err_exit() { | |
err "$@" |
#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)
pass
cheat sheet/guideGetting started guide to the unix password manager pass
. Manage gpg
encripted passwords (files) in
a standar directory-like hierarchy. Such files can be copied or stored in a git
repository.
Ubuntu/Debian:
$ sudo apt-get install pass
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 | |
``` |
# enter any kubernetes pod/container directly just by "part" of it's cotnainer name | |
cshell () | |
{ | |
d=$1; | |
docker exec -it $(docker ps |grep "k8s_$d" | awk '{print $1}' | head -1) /bin/bash | |
} |
seal-sops: ## SOPS Encrypt all secrets path matching [_sec|secret|config|*.secret*] | |
@find $(PTH) -path "*/_sec/*" -type f -o -path "*/secret/*" -type f -o -path "*/config/*" -name "*.secret*" -type f |\ | |
egrep -v '(\.enc|\.asc|\.sealed|\.matrix)' |\ | |
while read file; do \ | |
./scripts/seal-sops $$file;\ | |
done; | |
unseal-sops: ## SOPS Decrypt all secrets (suffix: .enc and .enc.yaml) | |
@find $(PTH) -name "*.enc" -type f -o -name "*.enc.*" -type f |\ | |
while read file; do \ |