Names

Table
friends | Stores data
Model
Friend | Data validation & relationships like belongs_to or belongs_to
Controller
friend | Says what to do and where to do it

A night at Blue Note

Gream Flower

Gream Flower

On the pic you can see Greame, a friend of my mate Ludovica. He was playing yesterday at the Blue Note here in Milano in the band of Kyle Eastwood.
That's why me, Ludo and 2 more friends were there.

Greame is a nice and really easygoing guy, you can get a more info about him here.

He said that he is coming back to Milano for Xmas … let's wait and see …

Well, once more, thank you Greame for the free tickets ! :D

Slang

Here some slang/vocabulary from the english course "Rain dogs"

Yes man – Brown nose
Lecchino, paraculo
Shitting bricks
Avere paura, ironico
Spew
Vomitare
Bill
Banconota in americano, conto in inglese
Note
Banconote in inglese
Check
Conto in americano, assegno in inglese
Jack the ripper
Jack lo squartatore

One more time in Padova

Padova by night
Prato della Valle at dusk | Picture from SXC.hu

Padova is, with Siena, the city I like most in Italy.

Things you can't miss :

  • Caffè Pedrocchi | The building and the coffee with cold mint cream and cacao
  • Spritz | A kind of lite Negroni, loved by girls. Aperol, seltz and Spumante.
  • Wednesday night in Piazza delle Erbe
  • Scrovegni Chapel | Giotto's Masterpiece

And if after have cicled all day and have had a long night-party the day after you wanna relax, have a good bath at the Terme preistoriche hot open-air bath opened till midnight and more.

Ops …

Oh no ! It happend again !!

The sysadmin turned on the gpc_magic_quotes and you got the DB full of \'

Here a fast way to get back the correct values.

UPDATE table_name SET field_name = REPLACE(field_name,'\"',"")

Abroad …

Some of my friends went abroad in this last month … Jan went to Paris, Ila to Barcelona and Vivi to London.

All these "goodbye" recall me my time in Sweden, so I've decided to put some pictures on-line … check them out

Tuscany …

Pienza, view on the Val d'Orcia
In Pienza with view on the Val d'Orcia

Well … great weekend in Tuscany last one ! Great place, good travelmate and perfect food&wine of course ;)

Ubuntu Dual Monitor Setup

Hello, I'm finally on Ubuntu, Dapper drake :)

The setup was really easy. I don't have any strange device connected to the PC.

The only thing that didn't work immediately was the dual monitor; I have a Nvidia 7600GS with dual DVI output with 2 BenQ FP93G.

Thanks to this great tutorial Dual Monitors TwinView HowTo By Steve Fink the setup was fast and easy.

Just 2 advices:

1) Be sure that in your xorg.conf under Section Device you have

Driver "nvidia"

and not

Driver "nv"

dunno why but this was my default value.

2) If the second monitor do not works set the horizontal resolution to twice the monitor resolution.
For example, my monitor has 1280×1024 and I had to set the resolution to 2560×1024.

Sweden

I cut&paste this list from Bianca's BLOG.
I've got in contact with her throght the site Interrail.net where I'm subscibed as cit guide for Milano .

As someone knows I've lived in Sweden for a while (eleven months) and when I've read this I realized I was there for too long :)

So, here we go:

You know you’ve been in Sweden too long when

  • You think that riding a bicycle in the snow is a perfectly sensible thing to do.
  • You regard it as sensible that the ice cream van comes around playing that annoying song when it is -15C.
  • The first thing you do upon entering a bank/post office/chemist (anywhere really!) is to look for the queue number machine. You accept that you will have to queue to take a queue number.
  • You accept that if someone wants to “follow” you home you don’t need to be afraid. They actually just want to walk you home.
  • Hugging is reserved for sexual foreplay
  • You've come to expect Sunday morning sidewalk vomit dodging.
  • Someone calls you a ”good moron” first thing in the morning and you smile acknowledgement.
  • When a stranger asks you a question in the streets, you think it's normal to just keep walking, saying nothing.
  • You think that people who wear other colours apart from black, grey, white or blue are exhibitionists.
  • You think blodpudding is good
  • You think that pay 25 Kr (= 2.5€) for a can of beer at the supermarket is normal.

Access Mysql from other machines

For security reason, MySQL doesn't allow access from other computer.
If you try to connect with a MySQL administration client like MySQL Administrator you will get a Mysql Error Number 2003.

All this operations modify system settings, so they must be executed with root privileges

If you want connect from a computer in your LAN to your mysql server you have to :

1) Edit your MySQL configuration file

root@namazu:~#sudo vi /etc/mysql/my.conf
and change the line
bind-address = 127.0.0.1
with
bind-address = 192.168.178.100

Now, to apply changes you have to reload the MySQL server
root@namazu:~#sudo /etc/init.d/mysql restart
No MySQL listen on your external interface, to verify that the server is up and accept connection type

root@namazu:~#telnet 192.168.178.100 3306

and you should get:

Trying 192.168.178.100...
Connected to 192.168.178.100.
Escape character is '^]'.
@
5.0.75-0ubuntu10.2

2) Give grants

Now MySQL is reachable on the "network" level, we have to enable access to databases.

Let's access MySQL with the mysql client, we still use localhost because we don't have privileges to access MySQL from others hosts yet.

root@namazu:~#mysql -uroot -pmyRootPass -h localhost

Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 7 to server version: 5.0.22-Debian_0ubuntu6.06-log Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

Modify access privileges to the server

mysql>GRANT ALL PRIVILEGES ON DB_NAME TO 'USERNAME'@'HOST' IDENTIFIED BY
'PASSWORD';

N.B.

  • if you want to give access from any host set HOST to '%'
  • if you want to grant access to all the DBs set DB_NAME to *.*

So, for instance, with this command :

mysql>GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY 'foopass';

we allow root (whose pass is foopass) to access all databases whichever host.

Exit the client

mysql>exit

Reload the privileges

root@namazu:~#mysqladmin reload

For more info on GRANT command: GRANT Syntax on MySQL Reference Manual

Have fun …

Yes !