Arxiu d'autor

Pintant (i altres coses) a un nou servidor

dissabte, 19/05/2012 (10:17) per carles

Ara fa dos setmanes vaig moure aquest blog, Pintant, varis dominis de mail (com ara el meu principal), altres pàgines Webs, sistemes varis com ara Jabber/XMPP, etc. a un servidor nou a Gandi VPS.

Des de gener 2002 aproximadament que tenia dominis, webs, etc. a un servidor sota la taula connectat amb ADSL de Telefonica amb IP fixe. En serio! (això sí, amb un SAI per la llum, RAID els discs per si un fallava, com va passar dos cops en els 8 anys, etc).

El desembre 2007 vaig canviar el servidor destartatalat per un ordinador decent. Es pot llegir aquí. Llàstima que no vaig fer fotos del primer ordinador, que al final era força impresionant.
(més…)

Power off a USB device

dissabte, 12/05/2012 (10:11) per carles

I wanted to power off a USB device. Searching in Google for “power off usb” returns different results but I didn’t succeed with any of the suggestions (Linux version 3.2.0).

I asked in the linux-usb mailing list (question, see one of the relevant answers (from Alan Stern). In short: not possible. Using a USB hub it’s then maybe possible -some models only-. The answer includes a link to a small program to try to disable the port. I could disable the port, but the device had still power.
(més…)

Comunitats virtuals: Meetup.com

dissabte, 05/05/2012 (11:33) per carles

No sóc una persona que estigui a moltes comunitats virtuals. De fet, en aquests moments m’adono que a les dues comunitats que fa anys que estic no són en sí «comunitats virtuals» sinó «comunitats de desvirtualització»: llocs per fer trobades fora d’Internet.

Aquest cop parlaré breument de Meetup.com: és una Web on un es pot donar d’alta, posar els seus interessos (per exemple: excursionisme, ping pong, python, programari lliure, etc.) i posar una ciutat (Barcelona, Londres o llocs més petits, junt amb una distància).
(més…)

Copies de seguretat

dissabte, 28/04/2012 (12:15) per carles

Cal fer copies de seguretat. És un tema que ja vaig escriure fa anys (el 2007).

Fa unes setmanes vaig veure aquest cartell al metro:

(més…)

Wood Green to Farringdon travel duration

dissabte, 21/04/2012 (12:20) per carles

Every working day (except holidays) I go to work. So I leave home and walk to my local tube station: Wood Green. Then I get a train to Kings Cross where I change the train to Farringdon.

Some days, if Piccadilly Line has delays, I change in Finsbury Park. For some weeks, 1 or 2 years ago, I used to always change to Victoria line but I decided that it’s not worth. Now I change in case of delays or if I’m standing up and squeezed in the Piccadilly Line and/or the Victoria Line train is just there.

The TFL webpage allows to download the last month or two months travels using a CSV file (I’ll check for some API, etc.).

I did some quick stats to find the distribution of the time. The most interesting result of that period of time (between 15th February and 5th April, but I was 2 weeks away from London) is:
(més…)

Petronas tower: ticketing system

dissabte, 14/04/2012 (13:22) per carles

As I said before, I went to Malaysia. Beside going to the Endau-Rompin jungle I also went, of course, to the Petronas Tower (Kuala Lumpur).

The system to get tickets in the Petronas Tower is to go there at morning and buy tickets for the same day. They only sell tickets for the same day, and Internet says that it’s sold out at morning, so you need to arrive early.

One month before going to the Petronas Tower I had a bad experience trying to visit Leonardo da Vinci exhibition in London. So this time I wanted to be sure that I would get the tickets. On the Internet they always say “it’s important to go there early” or “7:30 should be enough, but who knows”. There is one advantage of going early: you can choose what time you want to visit it. Maybe you buy the ticket at 10 but the only available slot is at 17:00, so you would not have lot of freedom in that day in Kuala Lumpur.

Well, knowing that… I woke up at… 5:15? I arrived to my metro station at 5:40. Oops, first surprise: the metro opens at 6. I waited 20 minutes and I got the metro to the KLCC station.
Obviously, the metro was quite empty:

(més…)

Programa útil per mòbil

dissabte, 07/04/2012 (14:43) per carles

Ja fa cert temps que tinc un Nokia 5800 XPressMusic. El vaig comprar perquè era el més econòmic que podia aconseguir amb Qt i Wifi. Fàcil manera d’escollir.

Al mòbil no hi tinc gaires aplicacions. Instal·lades ben poques, normalment estic aprop d’un ordinador (feina, casa). I si és cap de setmana i estic a la platja prefereixo no jugar massa amb el mòbil.
(més…)

Sudokus molt difícils: hardest ones. Com fer sortir de polleguera a un jugador?

dissabte, 31/03/2012 (12:18) per carles

Qui més qui menys té algun amic que fa Sudokus (o un mateix en fa).

Jo quan veig un Sudoku, el primer que em passa pel cap és «com faria el programa que els resolt?». De fet hi ha competicions de programes que resolen Sudokus: en donen un fitxer amb milers de Sudokus i han de trobar les solucions el més ràpid possible (comparat amb altres programes a la mateixa màquina, s’entén).
(més…)

Google searches

dissabte, 24/03/2012 (13:21) per carles

Some time ago I spent a little bit of time searching in Google to know how many Google queries / searches I could do, using some automatic way like a script. Just to know which is the limit of queries that they expect from one user.

I didn’t find an answer. I found some Google API with a limit of the number of queries, beyond that they were charging some cost. But that was for the API, not for the standard searcher.

Then I took the experimental approach: I did about 160000 queries using a Python script, waiting 4 or 5 seconds betweeen each query. They didn’t block the IP, add any captcha or anything at all.

In case that anyone was wondering that: they know now. I haven’t done tests reducing the time between queries.

Why I did that? The results will be soon here. Stay tuned.

Endau-Rompin jungle and leeches

diumenge, 18/03/2012 (16:44) per carles

A few weeks ago I went to Malaysia. My longest holidays ever, first time in Asia.

At one point I didn’t know if I would go to Singapore or to Endau-Rompin jungle. Singapore was easier for me (less adventurous) but I really wanted to have a taste of 2 nights in the jungle. At the end I went to the jungle.

In that jungle everyone knows that it’s full of leeches. Full like… really full! You stand just a moment, watch to the ground and you see them coming to you. I’m not joking.

I bought some leeches socks in Amazon. They are very good. When my guide was stopping to remove his leeches from his feet, I was stopping to remove the leeches from my socks. I was in the jungle for about 5 hours, no leech got me.

The socks are from a special material (not like standard socks, the leeches would probably go in) and they are worn on your socks and trousres. So you look funny:

Instead of looking disgusting (in my opinion, for my standards, this is the guide’s feet):
(més…)