Skip to content

Instantly share code, notes, and snippets.

@tomterragni
Last active March 28, 2021 09:15
Show Gist options
  • Select an option

  • Save tomterragni/c85aae729252d1f8e903909fbf04fcc9 to your computer and use it in GitHub Desktop.

Select an option

Save tomterragni/c85aae729252d1f8e903909fbf04fcc9 to your computer and use it in GitHub Desktop.
bash settings
# Misc scripts
export PATH=/Users/tommasoterragni/Misc_IT_management/scripts:$PATH
# added by Anaconda3 5.1.0 installer
export PATH="/Applications/anaconda3/anaconda3/bin:$PATH"
export PATH=/usr/local/bin:$PATH
# alias vari aggiunti a mano
alias l='ls -alt'
alias ll='ls -alt'
alias weather='curl wttr.in/Milan'
alias myip='curl checkip.amazonaws.com'
alias myipx='curl ipinfo.io; echo ""'
alias pwd='pwd -P'
alias lx='tree -if `pwd`'
# very rough command to inspect subfolder by size
alias trees="tree --du -h . | grep '^├\|^└'"
# Git & Jupyter notebooks: http://timstaley.co.uk/posts/making-git-and-jupyter-notebooks-play-nice/
#alias nbstrip_jq="jq --indent 1 \
# '(.cells[] | select(has(\"outputs\")) | .outputs) = [] \
# | (.cells[] | select(has(\"execution_count\")) | .execution_count) = null \
# | .metadata = {\"language_info\": {\"name\": \"python\", \"pygments_lexer\": \"ipython3\"}} \
# | .cells[].metadata = {} \
# '"
# do not strip output for me, thanks
alias nbstrip_jq="jq --indent 1 \
'(.cells[] | select(has(\"execution_count\")) | .execution_count) = null \
| .metadata = {\"language_info\": {\"name\": \"python\", \"pygments_lexer\": \"ipython3\"}} \
| .cells[].metadata = {} \
'"
# variabili necessarie per i virtualenvs di python
export VIRTUALENVWRAPPER_PYTHON=/usr/local/bin/python3
export WORKON_HOME=$HOME/.virtualenvs
export PROJECT_HOME=$HOME/Documents/PythonProjects
#/usr/local/bin/virtualenvwrapper.sh
source /usr/local/bin/virtualenvwrapper.sh
# avoid Homebrew autoupdate - they are EVIL!
export HOMEBREW_NO_AUTO_UPDATE=1
# maven
export JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk-9.0.4.jdk/Contents/Home
export PATH=/Users/tommasoterragni/Libraries/apache-maven-3.2.5/bin:$PATH
# MySql
export PATH=/usr/local/mysql/bin:$PATH
# OpenVPN
export PATH=/usr/local/opt/openvpn/sbin:$PATH
# bash prompt color scheme with highlightning for python virtual environment and git branch
source ~/bash_prompt.sh
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment