Skip to content

Instantly share code, notes, and snippets.

View sustr4's full-sized avatar

Zdeněk Šustr sustr4

View GitHub Profile
@sustr4
sustr4 / docker-deb10
Last active June 15, 2021 19:47
Succession of commands to install docker on Buster
#!/bin/bash
sudo echo nameserver 8.8.8.8 > /etc/resolvconf/resolv.conf.d/base
sudo service systemd-resolved restart
sudo apt-get update
sudo apt-get install -y curl gnupg apt-transport-https ca-certificates lsb-release imagemagick vim unzip
wget -q -O - https://download.docker.com/linux/debian/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg
echo "deb [arch=amd64 signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/debian $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
sudo apt-get update
sudo apt-get install -y docker-ce docker-ce-cli containerd.io
@sustr4
sustr4 / resto-id.sh
Created May 3, 2023 15:15
Translation of Resto function toUUID() into BASH
toUUID() {
NSTR=$'\x92\x70\x80\x59\x20\x77\x45\xa3\xa4\xf3\x1e\xb4\x28\x78\x9c\xff'
HASH=`printf "${NSTR}$1" | sha1sum`
printf "%08s-%04s-5%03s-%01x%03s-%12s\n" ${HASH:0:8} ${HASH:8:4} ${HASH:13:3} $(( ( 0x${HASH:16:1} & 3 ) | 8 )) ${HASH:17:3} ${HASH:20:12}
}
@sustr4
sustr4 / stactolls-env.sh
Created May 30, 2024 14:39
stactolls-env.sh
sudo apt-get update; sudo apt-get -y dist-upgrade
sudo apt-get -y install git python3 python3-pip python3-venv
git clone https://github.com/CESNET/DHuSTools.git
python3 -m venv ~/s1
~/s1/bin/pip3 install stactools-sentinel1
~/s1/bin/pip3 install requests