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
# venv cheat sheet | |
# creating a venv | |
# this creates a venv with the name 'venv' in the current directory | |
python3 -m venv venv | |
# activate the newly created venv | |
. ./venv/bin/activate | |
# now the venv can be used like we would use the normal Python installation |
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
# list installable python versions | |
pyenv install --list | |
# install version 3.12.0 | |
pyenv install 3.12.0 | |
# uninstall version 3.7.17 | |
pyenv uninstall 3.7.17 | |
# show all installed versions |
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
# on macos | |
echo '# Python3 to default' >> ~/.zshrc | |
echo 'alias python="python3"' >> ~/.zshrc | |
echo 'alias pip="pip3"' >> ~/.zshrc | |
# on ubuntu | |
echo '# Python3 to default' >> ~/.bashrc | |
echo 'alias python="python3"' >> ~/.bashrc | |
echo 'alias pip="pip3"' >> ~/.bashrc |
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
# install pyenv on ubuntu | |
sudo apt update -y | |
# install dependencies | |
sudo apt install -y make build-essential libssl-dev zlib1g-dev libbz2-dev \ | |
libreadline-dev libsqlite3-dev wget curl llvm libncurses5-dev libncursesw5-dev \ | |
xz-utils tk-dev libffi-dev liblzma-dev python-openssl git | |
# install pyenv | |
curl https://pyenv.run | bash |
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
# install pyenv on macos | |
brew update | |
brew install pyenv | |
# configure .zshrc file | |
echo 'export PYENV_ROOT="$HOME/.pyenv"' >> ~/.zshrc | |
echo '[[ -d $PYENV_ROOT/bin ]] && export PATH="$PYENV_ROOT/bin:$PATH"' >> ~/.zshrc | |
echo 'eval "$(pyenv init -)"' >> ~/.zshrc |
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
# start the bluetooth control application | |
bluetoothctl | |
# list all paired devices | |
paired-devices | |
# remove the paired device that is causing problems | |
# bluetooth mac is a that looks like this AA:AA:AA:AA:AA:AA | |
# use command like this | |
# remove AA:AA:AA:AA:AA:AA |
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
ssh root@hifi02.local |
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
stressberry-run out.dat | |
stressberry-plot out.dat -o out.png |
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 apt install stress | |
# only needed if we don't have pip3 already | |
sudo apt install python3-pip | |
python3 -m pip install stressberry | |
# at this point a logout and login might be needed |
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 rpi-eeprom-update -a |
NewerOlder