Skip to content

Instantly share code, notes, and snippets.

View k4nar's full-sized avatar
🌿

Yannick PÉROUX k4nar

🌿
View GitHub Profile
@jmaupetit
jmaupetit / watson_prompt.bash
Last active May 3, 2016 10:30
Watson Bash Prompt
# Add this to your ~/.provile or ~/.bashrc depending on your system
#
# watson directory (require watson >= 1.3)
# This value is the default on MacOSX
WATSON_DIR="$HOME/Library/Application Support/watson"
watson_status() {
# colors taken from git-aware-prompt
# https://github.com/jimeh/git-aware-prompt
local txtred="$(tput setaf 1 2>/dev/null || echo '\e[0;31m')" # Red
@ulope
ulope / gist:1495a9e7572c62885f30
Created January 14, 2015 12:10
Automatically place tox working directories into a central location
# Add this to your shell's rc file.
# Optionally export TOX_WORKDIR_BASE if you don't like the default of ~/.cache/tox
tox() {
if [ -z "$TOX_WORKDIR_BASE" ]; then
TOX_WORKDIR_BASE=~/.cache/tox
fi
if [ -f tox.ini ]; then
if [ -d .tox -a ! -L .tox ]; then
echo "Warning: Existing .tox directory is not symlinked into TOX_WORKDIR_BASE! Remove and re-run to auto-create symlink."