Skip to content

Instantly share code, notes, and snippets.

View euberdeveloper's full-sized avatar

Eugenio Berretta euberdeveloper

View GitHub Profile
# This line of code makes Pipenv install the virtual environment in the same folder of the Pipfile (under .venv)
export PIPENV_VENV_IN_PROJECT="enabled"
@euberdeveloper
euberdeveloper / pyenv-fixes.bash
Last active November 14, 2021 22:17
This should fix some errors with pyenv
# Fixes error when installing pylint on pipenv with pyenv
sudo apt-get install libffi-dev
# Fixes error on python cli, when pressing arrow up
sudo apt-get install libreadline-dev
# Fixes _lzma strange error
sudo apt install liblzma-dev
# Fixes error when using jupyter notebooks
sudo apt install libsqlite3-dev
# Uninstall your python version
pyenv uninstall 3.9.5
@euberdeveloper
euberdeveloper / unsweating-docker-1.sh
Last active June 9, 2021 08:28
If you have docker installed but it does not work without sudo, this is the solution you are seeking. (unsweating-docker because in Italian sudo means "I sweat"). Just run it and it should work.
# Execute this code
sudo groupadd docker
sudo gpasswd -a $USER docker
# Close your terminal and then execute unsweating-docker-2.sh
@euberdeveloper
euberdeveloper / sweating-nvm.sh
Last active April 9, 2021 22:08
If you have nvm installed but it does not work with sudo, this is the solution you are seeking. (sweating-nvm because in Italian sudo means "I sweat"). Just run it and it should work. (Note that it sould be copy-pasted directly to the shell)
NVM_VERSION=$(nvm version)
sudo ln -s "$NVM_DIR/versions/node/$NVM_VERSION/bin/node" "/usr/bin/node"
sudo ln -s "$NVM_DIR/versions/node/$NVM_VERSION/bin/npm" "/usr/bin/npm"
sudo ln -s "$NVM_DIR/versions/node/$NVM_VERSION/bin/npx" "/usr/bin/npx"