Skip to content

Instantly share code, notes, and snippets.

@smartexpert
Last active January 30, 2021 12:37
Show Gist options
  • Save smartexpert/e3325a52c4a7c81cbf6aade1c3e83044 to your computer and use it in GitHub Desktop.
Save smartexpert/e3325a52c4a7c81cbf6aade1c3e83044 to your computer and use it in GitHub Desktop.
Snippets

Create an empty file in Windows

This is to emulat touch file.extention on Mac

copy NUL filename.txt

Change conda auto activate base environment

conda config --set auto_activate_base false

Create new python3 virtual environment

python3 -m venv env This create a new virtual environment with files saved in the env directory in current path This can be activated by source env/bin/activate

Flask Foundations initial setup instructions

mv appname app #do this outside of VS code window otherwise permission denied app is the name of your app
find . -not -path "./.git/*" -type f -print0 | xargs -0 sed -i 's/appname/app/g' # Rename all references to appname
grep -R appname * #Check that all files have been successfully renamed
python3 -m venv env #Create virtual environment, do this within root directory of project
source env/bin/activate #activate virtual environment
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment