This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
export ATLAS_TOKEN={YOURTOKEN} | |
export OLD_ORG={YOUROLDORG} | |
export NEW_ORG={YOURNEWORG} | |
for ws in $(tfe workspace list) | |
do | |
tfe pullvars -name "$OLD_ORG/$ws" > $ws.vars | |
tfe pullvars -name "$OLD_ORG/$ws" -env true > $ws.env |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# RPM systemd distros: | |
sudo yum-config-manager --add-repo https://rpm.releases.hashicorp.com/RHEL/hashicorp.repo | |
# APT or DEB systemd distros: | |
curl -fsSL https://apt.releases.hashicorp.com/gpg | sudo apt-key add - | |
sudo add-apt-repository "deb [arch=amd64] https://apt.releases.hashicorp.com $(lsb_release -cs) main" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ sudo yum list --showduplicates vault-enterprise | |
Last metadata expiration check: 0:00:19 ago on Thu 16 Jul 2020 10:39:05 AM BST. | |
Installed Packages | |
vault-enterprise.x86_64 1.4.3+ent-1 @hashicorp | |
Available Packages | |
vault-enterprise.x86_64 1.3.3+ent-1 hashicorp | |
vault-enterprise.x86_64 1.3.4+ent-1 hashicorp | |
vault-enterprise.x86_64 1.3.5+ent-1 hashicorp | |
vault-enterprise.x86_64 1.3.6+ent-1 hashicorp | |
vault-enterprise.x86_64 1.3.7+ent-1 hashicorp |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"io" | |
"log" | |
"net" | |
"os" | |
) | |
const ( |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Note requirement: ./last-hash is a symlink to the previous file or seed text. | |
# Usage: sign-image.sh [IMAGE FILE] | |
LAST=$(readlink -f last-hash) | |
cat last-hash | base64 -w 0 > last-base64 | |
# Get signature from the last image/block | |
SIG=$(vault write image-verifiers/sign/chain-signer/sha2–256 input=@last-base64 -format=json) | |
SIG=$(echo “$SIG” | jq -r .data.signature) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Usage: secure-badge.sh [NAME] [YEAR] | |
INPUT=$(echo "$@" | base64) | |
SIG=$(vault write image-verifiers/hmac/svg-signer \ | |
input="$INPUT" -format=json) | |
SIG=$(echo $SIG | jq .data.hmac) | |
SIG="#${SIG:10:8}" | |
sed -i "s/NAME/$1/" template.svg | |
sed -i "s/YEAR/$2/" template.svg | |
sed -i "s/SIGNATURE/$SIG/" template.svg |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ ls /usr/bin/| wc -l | |
4826 | |
$ du -sch /usr/bin/* | sort -h | tail -25 | |
13M /usr/bin/qemu-system-ppc | |
13M /usr/bin/qemu-system-x86_64 | |
14M /usr/bin/qemu-system-arm | |
14M /usr/bin/qemu-system-ppc64 | |
15M /usr/bin/qemu-system-aarch64 | |
17M /usr/bin/audacity | |
19M /usr/bin/clementine |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# TCP latency vs UDS latency: | |
$ tcp_lat 4096 4096 | |
message size: 4096 octets | |
roundtrip count: 4096 | |
average latency: 23817 ns | |
$ unix_lat 4096 4096 | |
message size: 4096 octets | |
roundtrip count: 4096 | |
average latency: 14799 ns |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ cp (which vault) . | |
$ upx ./vault | |
Ultimate Packer for eXecutables | |
Copyright (C) 1996 - 2020 | |
UPX 3.96 Markus Oberhumer, Laszlo Molnar & John Reiser Jan 23rd 2020 | |
File size Ratio Format Name | |
-------------------- ------ ----------- ----------- | |
205827425 -> 76223880 37.03% linux/amd64 vault |