Skip to content

Instantly share code, notes, and snippets.

@sokolster
sokolster / oci_ubuntu_to_debian.multiarch.sh
Last active October 5, 2022 15:23 — forked from ishad0w/README.md
Debian 11 on Oracle Cloud (Free Tier) - (ARM64)
# clean arm64/amd64 instance with (ubuntu 22.04 minimal)
# all actions require root privileges (aka "sudo -i")
export DEBIAN_FRONTEND=noninteractive; apt update && apt install lsof
# prepare
snap remove --purge oracle-cloud-agent && snap remove --purge core18 && \
apt-get purge -y $(dpkg-query -Wf '${Package}\n' | grep header) $(dpkg-query -Wf '${Package}\n' | grep -oP "^linux.*\d\d\d\d-oracle" | grep -v "$(uname -r)") linux-modules-extra-$(uname -r) lxc* lxd* vim* snapd* python* && \
apt-get -y autoremove --purge && apt-get -y autoclean && rm -rf /var/log/* /var/lib/apt/* /var/cache/apt/* && cd / && \
mount -t tmpfs -o size=1700m tmpfs mnt && tar --one-file-system -c . | tar -C /mnt -x && \
mount --make-private -o remount,rw / && \
@sokolster
sokolster / gist:d84f561e0b9613c7832767efe8b3ea7c
Created June 1, 2020 08:19
AddTrust_External_Root disable
#debian, ubuntu
sed 's|mozilla\/AddTrust_External_Root.crt|!mozilla\/AddTrust_External_Root.crt|g' -i /etc/ca-certificates.conf ; update-ca-certificates -f -v
#centos
trust dump --filter "pkcs11:id=%AD%BD%98%7A%34%B4%26%F7%FA%C4%26%54%EF%03%BD%E0%24%CB%54%1A;type=cert" > /etc/pki/ca-trust/source/blacklist/addtrust-external-root.p11-kit ; update-ca-trust extract
#!/bin/bash
python3 bot.py