Skip to content

Instantly share code, notes, and snippets.

@cdgz
Created October 23, 2015 10:53
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cdgz/87bd37ebf72a45f90fc1 to your computer and use it in GitHub Desktop.
Save cdgz/87bd37ebf72a45f90fc1 to your computer and use it in GitHub Desktop.
# shell aliases
alias ll='ls -laG'
alias so='. ~/.bashrc'
alias grep="grep --color"
# prompt
PS1='\[\e[0;32m\]\u@\h\[\e[0m\] \[\e[0;33m\]\W \$\[\e[0m\] '
# source keybpard bindings
bind -f ~/.inputrc
# editor
export EDITOR=/usr/bin/vim
# Safer curl | sh'ing
function curlsh {
file=$(mktemp -t curlsh) || { echo "Failed creating file"; return; }
curl -s "$1" > $file || { echo "Failed to curl file"; return; }
$EDITOR $file || { echo "Editor quit with error code"; return; }
sh $file;
rm $file;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment