Very nice bash PS1 prompts.

A complex, but very useful bash shell prompt. PS1=$( sep=$'\xC2\xBB' # UTF-8 U+00BB red=$(tput setaf 1) green=$(tput setaf 2) yellow=$(tput setaf 3) blue=$(tput setaf 4) cyan=$(tput setaf 5) bold=$(tput bold) reset=$(tput sgr0) [[ $EUID -eq 0 ]] && user=$red || user=$green echo "\[$user\]\u@\h\[$reset\] \[$blue$bold\]$sep\[$reset\] \[$yellow\]\W\[$reset\] \[$blue$bold\]$sep\[$reset\] \[$user\]\$\[$reset\] ") Gives the user a prompt that looks … Read more

How to setup proper directory indexing in Apache.

To get proper directory indexing set up in a directory in your Apache webserver configuration, firstly, create a .htaccess file and paste the code below into it. Options +Indexes   HeaderName HEADER.html ReadmeName FOOTER.html   IndexIgnore .htaccess .??* *~ *# HEADER* FOOTER* README* RCS CVS *,v *,t *.incOptions +Indexes HeaderName HEADER.html ReadmeName FOOTER.html IndexIgnore .htaccess … Read more