Basic pip usage
- Upgrade PIP
-
python -m pip install --upgrade pip
- Find outdated/updatable pip packages
-
pip list --outdated
- Getting info on your python environment
-
python -m site
python -m pip install --upgrade pip
pip list --outdated
python -m site
#!/bin/bash
git ls-files -z --with-tree="$2" --directory | xargs -0 chmod o-rxw --
git ls-files -z --with-tree="$2" --directory | xargs -0 chown www-data:www-data --
find . -type d | xargs -I {} chown www-data:www-data {}
find . -type d | xargs -I {} chmod o-rwx {}
exec < /dev/tty
while true;
do
read -p "Do you want to restart apache? [Y/N]:" choice
case "$choice" in
y|Y) service apache2 restart;break;;
n|N) break;;
*) echo "invalid" && break;;
esac
done
git remote set-url origin [email protected]:<Username>/<Project>.git
git config --global user.name "Name Surname"
git config --global user.email "mymail(at)mydomain.com"
git config --system core.longpaths true
Note: You need to run as administrator.
Ref: https://stackoverflow.com/questions/22575662/filename-too-long-in-git-for-windows
git config core.autocrlf false
If you have problem with Git and you need to debug you can run this:
GIT_CURL_VERBOSE=1 GIT_TRACE=1 git pull
Ref: https://stackoverflow.com/questions/6178401/how-can-i-debug-git-git-shell-related-problemsIf you need to get list of files (included directory tree) from change list you can use:
git diff-tree -r --name-only 2c636a^ 5b47402 | xargs -I {} rsync -aR {} output/
git ls-files --deleted -z | xargs -0 git rm
git config --list
git branch -vr
git add -u
git log --date-order --graph --tags --simplify-by-decoration --pretty=format:'%ai %h %d'
If you have a virtual environment and you want to use IDLE for write you pretty script you can run this command:
# python -m idlelib.idle