This file contains 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 | |
repoAddress="xx.gcr.io/xXx" | |
repos=$(gcloud container images list --format='table[no-heading](name:sort=1)' --repository=repoAddress) | |
while read -r repo; do | |
images=$(gcloud container images list-tags --limit=99999 --sort-by=~timestamp --format='get(digest)' $repo) | |
n=10 | |
while read -r image; do | |
if (( n < 1 )); then | |
gcloud container images delete --quiet "$repo@$image" | |
fi; |
This file contains 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
#backup | |
dd bs=4M if=/dev/sdb | gzip > sdcard.gz | |
#restore | |
gzip -dc sdcard.gz | dd bs=4M of=/dev/sdb | |
#recreate partition | |
fdisk | |
p | |
# note start sector of partition 2 -> start |
This file contains 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 | |
# tweaked from https://gist.github.com/mitchese/7a3373132f94fc946b1cbeb2b04e7818 | |
USER="kodi-user" | |
PASSWORD="kodi-pass" | |
PORT="8080" | |
ANALOGUEDEVICE="ALSA:sysdefault:CARD=Headphones" | |
BTDEVICE="ALSA:bluealsa" | |
STAT="NA" |
This file contains 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
async buildConsumers() { | |
const path = Path.resolve(__dirname + '/../../../Consumers'); | |
if (FS.existsSync(path)) { | |
const consumers = Object.values(RequireAll({ | |
dirname: path, | |
recursive: false | |
})).map(consumer => consumer.default); |
This file contains 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
# enable ssh on initial boot | |
touch ssh | |
# ssh public key setup | |
mkdir -p ./home/pi/.ssh | |
cat << EOF > ./home/pi/.ssh/authorized_keys | |
# --- BEGIN PVE --- | |
ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAgEApHSlBYGanB/nObsWYIZXF7kcT9Sa2oATwdnNqkb+K/8P3MRLY67g1Ki1yhATpqkPhGrwie5wa60+5T2WpVAyeQ4GzxHVZ9Vjk64Wmc/2yabq4LZRnw+9uZvH2Wx5UlMkOJM2trKYZof6pdz/n044BVihZnFQfWnTYg8vKlKKtFsL0sGKz+DWBgr49fldj4qUB6Nmn5M7+4RqYAAd3af+6ljOSCv4NG2r1ZbMRcBW89569/msPcfQYcBzVXXeC5Z+7o5Svk/10pzUaT6P09Kyz8j6T8iy/T+ugsYZ4Se3l2SRtnAFsd2AJMu6kHp5vaqNOZbnJLuAvbQVp+NL/KI88GZbGNZnua1C/L2zLwarpdZw27NgOJRc4U2sNVPI9qWlXNAPPkpVmpbQvX7gem0BmQdoTgYU6nXexTzGDlSX5yCc13i+xeIJKOf0cCLRse3JLD1fxefqlr2HqlH3cx1ISl0T4Pcj+8QuWAVmAASRaR6+ij31nArIAnPmvAGFDvrfa4Tp6AYQNxmjrqyMBrO0r6NpwbHwKzEsYBoAKjuQTBeE5E+mAPpJWOF+tVZlLPuWZyI1IfPIluVgOnSJ/F1iC4MhAFVZ+bUiQl2p2cUEL2Qzajzm9CfAABIDHSj/piqkv2+8xVbkDn0qtM21q1nMbJnxu0gFqUyVZtE1Vz+VXy0= rifat.aricanli@gmail.com | |
# --- END PVE --- | |
EOF |
NewerOlder