Skip to content

Instantly share code, notes, and snippets.

@reisenmachtfreude
reisenmachtfreude / debian11_install_geth.sh
Last active August 19, 2023 21:34
Install geth on Debian 11 bullseye using ubuntu ppa
su # Run the following commands as root
echo "deb http://ppa.launchpad.net/ethereum/ethereum/ubuntu bionic main
deb-src http://ppa.launchpad.net/ethereum/ethereum/ubuntu bionic main" > /etc/apt/sources.list.d/ethereum-bioinc.list
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 2A518C819BE37D2C2031944D1C52189C923F6CA9
apt-get update
apt-get install ethereum
# Taken from https://linuxconfig.org/ethereum-mining-on-ubuntu-18-04-and-debian
# GETH Manual does not explicitly mention Debian and Ubuntu method is failing https://geth.ethereum.org/docs/install-and-build/installing-geth
@reisenmachtfreude
reisenmachtfreude / increseUbuntuSwapMemory.sh
Last active June 23, 2022 17:11
Backtrader runs out of memory fixed by increasing Ubuntus SWAP memory
# For some backtests with large data python library backtrader runs out of memory and freezes the system
# Since I use Ubuntu I can prevent this by increasing available SWAP memory
# Add more SWAP memory
sudo fallocate -l 10g /mnt/additional.swap # Create a file with a fixed size
sudo chmod 600 /mnt/additional.swap # Set needed permissions in order to use as SWAP file
sudo mkswap /mnt/additional.swap # Format as swap file
sudo swapon /mnt/additional.swap # Use NOW as SWAP temporarily
echo '/mnt/additional.swap swap swap defaults 0 0' | sudo tee -a /etc/fstab # Use permanently as SWAP