Thursday, July 8, 2010

The wine situation.

A friend of mine from Ancona, Italy asked me to describe the "wine scene" here in Brazil/Santa Catarina/Florianopolis. As I started replying him, I got excited and ended up writing a short but maybe useful analysis. Here it goes:

Hi mate! Everything is great here! So, I believe I can give you a good insight on this "wine" situation around here. First of all, the city I live now is 200km from Florianópolis and before living here I lived there for 6 years so I know it very well. This both cities are very alike so my report is valuable for both.
Lots of people drink wine here. The most common types of wine are very diverse but mainly they are Red Wines. I would say that the most popular types are "Cabernet Sauvignon", "Merlot" but other types are common as well (Syrah, Carmeneré, Porto).

Wines from all nationalities are common but in order of popularity I would say something like Chile, Argentina, Italy, France. Chilean wines are popular mainly due to their good quality/price ratio.
A bottle of good Chilean wine, let's say "as good as" (I know this is hard to tell, but it is just a simple comparison) a Rosso Conero of 5€ a bottle in Ancona, costs here 8€. In all supermarkets here (as big as a normal COOP) they have a wine section as big as the one in COOP.. so I would say it sells a lot.

Popular (Chilean) brands are the ones from "Concha y Toro", "Santa Carolina", "León de Tarapacá" (this one I remember seeing for sale at Ancona's COOP for 8€, which is more or less the same price as here).

Well, this should help you, right? If you want I may take videos of this wine sections at supermarkets so you can compare prices & types, I may even picture "La Carta de Vino" from some Italian restaurants around here.

Hope to hear from you soon too! Take Care!

Wednesday, July 7, 2010

Bash prompt custom substitution

I know this is only eye candy but sometimes LONG prompts do bother me.
If you ever got disturbed by too-long bash prompts that span over the entire terminal window in such a way that the commands you write go directly to the second line -- sometimes even a simple "ls" -- here is the solution.

1. Problem:
Your shell sometimes looks like:


2. Solution:
Open up your .bashrc (I'm assuming ubuntu but this should work everywhere) and paste the following to the end (I say at the end so it overrides any other ugly stuff you might have there!).

my_bash_prompt() {
case "$PWD" in

"/home/cpscotti/big_name_dir/huge_name_subdir/divide_and_conquer/little_one")
PS1='${debian_chroot:+($debian_chroot)}@SOMEBETTERNAME~\$ '
;;
"/home/cpscotti/big_name_dir/huge_name_subdir/divide_and_conquer/another")
PS1='${debian_chroot:+($debian_chroot)}@SOMEEVENBETTERNAME~\$ '
;;
*)
PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ '
;;
esac

# If this is an xterm set the title to user@host:dir
case "$TERM" in
xterm*|rxvt*)
PS1="\[\e]0;${debian_chroot:+($debian_chroot)}\u@\w\a\]$PS1"
;;
*)
;;
esac
}
PROMPT_COMMAND=my_bash_prompt
unset bash_prompt


Substitute the big directories for whatever suits you and change SOMEBETTERNAME and SOMEEVENBETTERNAME for something fancy and you're done! The real trick is to set PROMPT_COMMAND to call your function and do this "PWD abstraction" before displaying PS1. This is very similar to what the shell already does with your home folder, changing its path to ~ (tilde).

Ok, back to work!