This file contains 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
# create virtualenv with specific python | |
virtualenv -p /usr/local/bin/python2 xxx2 | |
virtualenv -p /usr/local/bin/python3 xxx3 | |
# Upgrade all packages with pip | |
pip list --outdated | cut -d ' ' -f1 | xargs -n1 pip install -U | |
pip2 list --outdated | cut -d ' ' -f1 | xargs -n1 pip2 install -U | |
pip3 list --outdated | cut -d ' ' -f1 | xargs -n1 pip3 install -U | |
# Git shortcuts |
This file contains 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
#!/usr/bin/env bash | |
# MIT © Sindre Sorhus - sindresorhus.com | |
# Krishna Vadakattu - vadakattu.com | |
# git hook to run a command after `git pull` if a specified file was changed. | |
# Run `chmod +x post-merge` to make it executable then put it into git hooks folder (`.git/hooks/` by default) | |
changed_files="$(git diff-tree -r --name-only --no-commit-id ORIG_HEAD HEAD)" | |
check_run() { |
This file contains 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
#!/bin/sh | |
# To version control your hook, save this script inside your repository e.g. .githooks/ | |
# Then run 'git config core.hooksPath .githooks' to point your local repository to it | |
# Check if the python package requirements match the existing requirements | |
pip freeze | diff requirements.txt - | |
if [ $? -ne 0 ] | |
then | |
echo "The requirements have changed!" |