Tuesday, 9 March 2010

ReadyNas NV+ and rsync

Setting up an account to backup a windows machine to my Nas I discovered an issue with the rsync setup.
I first enabled the rsync protocol in the readynas admin interface.
I then added a new user account and when I was testing I got the following error:


rsync -av myidr/ newuser@mynas:
newuser@mynas's password:
Connection closed by 192.168.1.100
rsync: connection unexpectedly closed (0 bytes received so far) [sender]
rsync error: unexplained error (code 255) at /SourceCache/rsync/rsync-35.2/rsync/io.c(452) [sender=2.6.9]


I tracked down the problem to not having a ssh key on the nas for the new user:



su - newuser
Password:
newuser@mynas:~$ ssh-keygen
Generating public/private rsa key pair.
Enter file in which to save the key (/c/home/newuser/.ssh/id_rsa):
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in .
Your public key has been saved in .pub.
The key fingerprint is:
c1:25:12:5b:21:18:31:23:73:58:45:99:2c:0b:0e:7c newuser@nasone


Before that I had to edit /etc/passwd to enable interactive login for newuser as by default users cannot login.

Sunday, 21 February 2010

Un italiano a Londra

Banca:
Aprire un conto in banca è un casino in Inghilterra. Ti chiedono una "proof of address" che è in genere difficile da avere se sei appena arrivato in città.
Se il tuo datore di lavoro ti fornisce una lettera di raccomandazione è molto più facile. Le banche consigliate sono CITI e HSBC. Io ho un contro HSBC perché era la banca della mia ragazza e forse ci sono piu' filiali in giro.


Proof of address
In inghilterra non esiste l'anagrafe e pertanto, per fare qualsiasi cosa ti viene richiesta una "proof of address". In genere va bene o un estratto conto della banca oppure una bolletta del telefono o dell'elettricità (Non basta il passaporto). La cosa si fa interessante quando per avere un conto in banca ti chiedono una proof of address che ancora non hai... (Vedi sezione su come aprire il conto in banca, è la chiave di tutto)


Cellulare
In generale, la copertura cellulare a Londra è pessima, probabilmente dovuto al numero elevato di persone.
Io ho un ricaricabile O2, che credo abbia una copertura migliore rispetto a Vodafone (Poi anche farti un mensile di circa 17.5 pounds che comprende un bel po di minuti di chiamate e internet illimitato).
Nel caso optassi per 02, vai sul sito che ha pacchetti più convenienti rispetto ai negozi.


In metro non c'è copertura cellulare!!


Trasporti pubblici
Autobus e metro non mancano mai (a parte dopo mezzanotte!!). Il sito ufficiale per i transporti londinesi è TFL. Alcune metro sono chiuse per lavori durante il week-end quindi ti conviene controllare prima di pianificare.


La Oyster è una tessera con un chip rfid e ti garantisce la tariffa migliore.
La puoi caricare (top-up) e poi ti scala in base alla lunghezza del viaggio oppure la puoi caricare con un abbonamento di 1,3,7 giornioppure mensile/annuale
La Oyster e' gratuita se acquisti almeno un settimanale oppure costa 3 pound di cauzione.
Ah, l'abbonamento e' in base alle zone. Ti serve almeno zona 1 e 2 = circa 100 gbp al mese


Casa
Cercare casa a Londra è probabilmente la cosa più difficile. Io spendo 260 pounds a settimana per qualcosa che definisco "catapecchia". Gli standard sono generalmente molto bassi e sfido a trovare qualsiasi lusso come doppio bagno, lavastoviglie, parquet.
Io abito a West Kensington, una quartiere di Hammersmith molto molto comodo dal punto di vista delle comunicazioni visto che ci sono molte metro tra cui la District Line diretta per Vittoria e la Picadilly Line per Heathrow. Non è una zona che mi inspira particolarmente ma nello stesso tempo è molto comoda
Affidati ad una agenzia di relocation se puoi oppure datti da fare su siti come globrix.com o gumtree se vuoi affidare una stanza in un appartamento condiviso.


Attenzione agli "estate agents", sono degli sciacalli! Io ho avuto particolari brutte esperienze e invito tutti a diffidare di Barnard Marcus. Assicurati di avere TUTTO per iscritto e soprattutto di controllare l'appartamento per bene prima di firmare il contratto. Una volta che sei entrato è molto ma molto difficile fare in modo che le clausole sia rispettate. Leggi attentamente questo post per evitare sorprese.

Wednesday, 16 September 2009

Connecto to a IRC channel on Adium startup

To make the script execute when Adium starts up:
Create and save an AppleScript with the following code:
tell application "Adium"
GetURL ("irc://myircserver.com#myircchannel")
end tell


Edit appropriately and save it wherever you like.


With Adium in as the frontmost application, choose Adium > Preferences...
Select the "Events" toolbar item in the Preferences window.
Find and select the "New email notification" event in the list of events.
Click the "+" button to add a new action to the "You connect" event.
From the Action popup menu, choose "Run an AppleScript".
Click the "Browse" button and choose the script you just saved.
Click OK.


Restart Adium and see if it works

Friday, 11 September 2009

How I spent a long weekend in Mountain View

As it was my first time in California, I did some research to find out how to spend my long 3 days long weekend (labour day on Monday). I got a lo of suggestions which I summarized on my previous post and here I will narrate what I have actually done do that it can be a reference to anyone in my same situation.


Friday: Computer History Museum and running along Steven's creek trail


[fa:p:id=3891382528,j=l,s=s,l=p]
After a lunch at the Mongolian Barbecue in Castro street downtown Mountain View, I took my bike to the Computer History Museum, on the way to the Google campus, 15 minutes away from downtown.


The museum has a free entrance and guided tours are also available for free. Don't miss it! The guides are so nice and make the visit a nice experience for anybody, even for non-computer people. I stayed at the museum for about 2 and half hours. HIGHLY RECOMMENDED!


Among the funny things you can see there there is the first Mac ever built, with a wood chassy and the signature "Woz" (Steve Wozniac, Apple co-founder)


I've also seen a working demo of the PDP-1, one of the first small computers. Two elderly engineers have restored one and probably made the restoration as theirs life most exciting project.


Back from the museum I went running along the Steven's Creek trail. The trail goes from Mountain view all the way to the bay (about 8-10 km on way). Unfortunately it is asfalt all the way but at least it is on a separate track shielded from the cars. There are a couple of fountains along the way that make it easier if you want to do a longer run. I run for about 12km but unfortunately it got dark too fast.
It is a perfect trail, anyhow, if you want to ride your bike to the Google campus.


Saturday: bike run in Capitola (Santa Cruz) along the wineries


I joined Santa Cruz Bike tours for a 5/6 hours easy ride along Capitola's coast. I rented a car (they only had a huge SUV that could contain my bike) at Avis in El Camino Real and drove to Capitola.


On the way I drove by Cupertino to take a look at the (disappointing) Apple campus.


Arrived at Capitola, I meet with Marty and Larry from Santa Cruz bike tours. I also meet the group of 7 Canadians that was going to ride with us. It was a great day! The Canadians proved to be hilarious! We rode through Capitola's wharf and took a glimpse of the Begonia festival


Unfortunately my bike was not appropriate for real mountain biking but the path was arranged in a such way that you could skip the hardest parts. Next time I go mountain biking I'll make sure to rent a more appropriate bike.


After having visited two wineries, tasted some great wines and spend about 50 bucks on two bottles, I want to bring home, the friendly Canadians invited me to have dinner together and we went to the local brewery. Before the night was over we also managed to play some beach volley but we were soon kicked out by the police since the beach is strangely closed between 10pm and 6am. We decided then to go and try the roller coaster (Santa Cruz has a very old wooden one) and that scared the hell out of me!!!! I then drove home at around midnight. Thank you Martine, Renee, Angela, Dave, Deanne, Chris. it was a great great fun!


I highly recommend Santa Cruz bike tours. They were so kind to let me join the group with a short notice and I've seen places I would never have seen without them. It was also a very nice way of meeting other people. I wish it was a little cheaper but it I'd totally worth the money.


Monday: Golden gate bridge and Alcatraz


[fa:p:id=3901568071,j=l,s=s,l=p]
I jumped on the Caltrain to San Francisco at about 10. You can take the bike in the apposite wagon (the first one?). In one hour and 10 minutes I was in San Francisco.
I did not ride along the coast since I had already spent enough time there (If you haven't, head towards Fisherman's wharf) and so I decided to cross the town center.


I looked at the map and decided: California St: I did not know how steep was the hill! Lot of pain later I reached the top but I don't advice if you don't have a mountain bike. Then I just headed towards the bridge, I could see it from everywhere.


Riding on the bridge was amazing, but even more to look at it from the land (Unfortunately I could only drive on the west side so I could not see the town properly).


I then glided to Sausalito and back on the first ferry to pier 1 (there where other ferries to other piers too but I just took the first one)


[fa:p:id=3906938993,j=r,s=s,l=p]


My boat to Alcatraz went a little after 4. Remember to buy tickets a few days in advance. I wanted to take on the morning tickets (the most complete tour) but is was already sold out three days before the tour.


At the isle I got one of those headphones with a recorded guided tour: DON'T MISS IT! The sounds and the voices are really cool. They guide you around and tell the most of the details you need to know about the prison.


I took the last boat (6.10pm), I wish I could have stayed on the isle a little longer.



Tuesday: My first baseball game at the AT&T Arean in SF


San Francisco's baseball arena is great. I saw the match between San Diego Padres and the Giants and from now on I will always be a fan of the Giants!

Friday, 4 September 2009

Things to do in Mountain View

I'm in Mountain View for a couple of weeks and since it happens to be also labour day I asked people around on what to do during the week-end. I put the summary here so that other visitors in the San Francisco area can take a look at it.


By bike



  • Bike the Golden Gate Bridge (It's about 15-20 km and may take a couple of hours). You can rent a bike in San Francisco, bike to Sausalito or all the way to Tiburon, spend some time there and then take the ferry back to SF

  • Bike or walk along the waterfront in San Francisco is nice. You may even combine this with the Golden Gate Bridge bike ride

  • Bike (but beware of the many annoying hills and cars everywhere!)

  • You can take a bike on CalTrain to San Francisco. The bike car is the last car on the train.

  • Bike on a road bike along the east bay with http://www.oaklandyellowjackets.org/


Walking



  • Visit Alcatraz (tickets must be reserved in advance)

  • Walk around in San Francisco with a guided tour:



By car



  • Drive around Silicon Valley.

  • Drive down Highway 1 toward Hearst mansion / Los Angeles.

  • 2 days is enough time to take a pretty leisurely trip to the sequoia national park

  • Rent one of those yellow buggy cars and drive around SF

  • Check out Big Basin state park - the redwoods there are amazing.

  • The aquarium in Monterrey is worth a visit too.

  • If you have more time, go to Yosemite and the over Tioga to Mono Lake and Bodie, sleep in Lee Vining (just next to Mono Lake) as other places maybe full already. The places are spectacular!


Other activities


Thursday, 27 August 2009

Basterd Marcus - a London flat odyssey

As today I've not yet moved into my flat although I've been paying the rent for almost three weeks.


When I checked in, on the 11th of August, the flat was in disgusting conditions. It had not been cleaned at all and stuff of the previous tenant was still inside.


Luckily enough we had insisted that a list of works to be done had to be put in writing in the contract. None of the works had been done, although contractually the landlord had a few more days to comply with his duty.


But not the cleaning. The cleaning had to be done before I moved in and they had had an extra week to do it properly.


After a first immediate solicitation nothing happened. At some point somebody went in and vacuum cleaned the carpet in one of the rooms: ridiculous!


I felt like they were making fun of me. I escalated the problem to my relocation company and to Google HR which had helped me getting the contract. I just wanted to break the lease and live the landlord to the next victim.


Unfortunately there is not much to do once you have signed a standard "assured shorthold tenancy agreement": the contract is totally biased towards the landlord. Unless the flat is "uninhabitable" (which means practically that it has to be falling apart, without electricity and hot water) the lease is still valid, no matter what other clauses are in the contract. On the contrary, the tenant, if he does not pay the rent (as I intended to do since I could not move in) or does anything which goes against the landlord, can be brought to court and forced to pay the rent for the whole period of the contract!


As a tenant, you can protect yourself filing a "claim for damages following the loss of occasion*" which means that if you can prove that because of the landlord you have had some expenses (like living in a hotel while the flat was being fixed), you can bring him to court and ask for a rent refund. Little consolation given the hassle!!


Finally, two days ago the landlord as agreed in cleaning the flat. I've been there yesterday with two independent witnesses and it is definitely a better experiences. Walls have been painted, bathroom and kitchen has been cleaned and the stuff has been removed. Only few details are left like cleaning the windows from the outside. Seems I got now a new contact person at the managing company which is taking me seriously.


If everything goes well, on Friday I will finally be able to move in. I scheduled the movers to come at 10 am so it should be done by noon.


Who's responsibility is this? Definitely of the estate agent, Rocco from Barnard-Marcus. Being an Italian himself I thought we were on the same frequency. Instead I realized that more than once he tried to pull it. He first raised the price once I showed interest, he tried to make me sign a contract without a break clause and finally tricked me in making a last-minute modification to the contract assuring me that the flat did not need to be fully repainted while I was away and could not recheck it.


I should never have accepted any contract modification and I should never never have had any contact with the estate agent directly but only though the relocation agent. The estate agent did not act professionally and for this reason I must warn any body from ever taking services from Barnard-Marcus and specially from him.


I learned a lesson, at the cost of two stressing weeks. It is so sad that you have to assume that people is unprofessional and unfair before they have proved them selves. It should be the other way around


* I'm not sure that "occasion" is the right word. I thought the lawyer said so but I could not find any reference on Google.

Tuesday, 26 May 2009

Springframework 3.0.0 M3 build and maven 2 repo

I built the latest version of spring 3.0 and deployed in my maven repo.

Feel free to use it but don't make assumptions that it will be online in any future