tag:blogger.com,1999:blog-59190950475511585012024-02-19T07:35:57.877+01:00IT Gen2 + 2 = 5 (for extremely large values of 2)Anonymoushttp://www.blogger.com/profile/14209167925167231726noreply@blogger.comBlogger150125tag:blogger.com,1999:blog-5919095047551158501.post-67391482126607942892012-06-13T02:40:00.001+02:002012-06-13T02:40:50.200+02:00Macbook Air / Mac OS X rantWhen Apple presented their new MacBook line yesterday (the retina display is not only amazing, but very necessary to make other people (Lenovo, I mean YOU) stop putting crappy 1368x768 displays in premium laptops), I remembered that I wanted to write about my experience with Apple hardware.<br />
<br />
A couple of months ago I got a Macbook Air. Everybody was super happy with them and they looked like "user friendly Unix" systems, so I got one off ebay for a great price. Since it wasn't recently, I will just copypaste my list-review from an email I sent to a friend. Plesae note that this was November 2011, it might have changed now. I no longer have the laptop so I couldn't re-test the stuff.<br />
<br />
- I love the design and weight. It is thin and looks even thinner.<br />
- The battery time is decent (11" model).<br />
- The screen is OK, 1368x768 for 11" is acceptable. Glossy screens are not my thing, though, I use the laptop mainly to work / browse, not watch movies in dark rooms.<br />
- The sound is surprisingly good. I must say I was impressed how loud and clear it was.<br />
- Air intake through keyboard is a quite nice solution, in general, allows to use the laptop on soft surfaces like beds/sofas. Sometimes I leave my laptop closed while number-crunching / compiling at night, the MacBook wouldn't be able to do that.<br />
- Safari: no unified URL/Search box. Hello? Welcome to 2011! On top of that, no option to activate search keys (g X to look for X on google, a X to look for X on amazon, etc) by default, only with some (<a href="http://hackemist.com/SafariOmnibar/">obscure</a> <a href="http://safarikeywordsearch.aurlien.net/">extensions</a>).<br />
- There is NO DELETE KEY! WTF!?!<br />
- I like very much the option to "pin app to desktop" and swipe between them with 3 fingers. I dislike that they cannot be rearraged by drag and drop... or any other manner, AFAIK.<br />
- Incredibly difficult to remap the keyboard (I HATE the german QWERTZ). Xmodmap file exists, gets ignored. KeyBindings4Mac works but it's very cumbersome to use and needs to do funky kernel shenanigans to work. DoubleCommand doesn't work well, needs to be unisntalled from command line. User friendly, was it? Maybe to look at facebook, not advanced stuff.<br />
- Firefox (my browser of chioce) isn't integrated at all. Camino is outdated. Safai sucks (see first point). The most decent brower is Opera, but still far from perfect. No easy way to install Chromium (gave up after 10 min). User friendly? Not even for facebook browsing, in the end :/<br />
- There is no 3rd button. No way to open a link in a new tab using one hand/touchpad only. ThinkPad's physical 3rd button is a killer feature for web browsing, opening/closing tabs with one click.<br />
- No Home/End keys. No PgUp/PgDown keys. In the german layout, no bracket/curly braces keys!!! After trial and error I found the brackets at AltGr+5/6 and curly braces at AltGr+parentheses. It must be a NIGHTMARE to write C code with this. And the keyboard in general is unimpressive at best. But then again, I am used to a ThinkPad keyboard, so I might be spoiled/biased.<br />
- Very unclear CMD / Ctrl usage. Specially on the console. Ctrl+D doesn't close terminal, splits it instead (!). Usualy CMD is used instead of PC's Ctrl but not always.<br />
- Lack of Yakuake. For me Yakuake is THE killer application, period. I would need a whole post just to praise all its features. I will just say is hands down my favorite and most useful app. Nothing else even comes close (tilda, guake, etc on linux included). TotalTerminal is a sorry imitation.<br />
- X11 programs are confusing. Similar to the CMD / Ctrl problem.<br />
- I am not used to apps staying in memory after last window is gone. I guess this is a getting-used-to-it thing, I can see how other people might like it.<br />
- I like the File Vault idea, making whole disk encryption easy to use. However it end up being much more difficult in the end. My story: the first thing I did when I got the computer is to reinstall Mac OS X to wipe any data / software present on it. Since I was at it, I activated FileVault at install time. Result: the system failed to boot. So I tried to reinstall. Result the system failed to reinstall. WHAT? Yes, everytime I got a very funny message: <i>There was a problem installing “Mac OS X”. Try Reinstalling.</i> Oh really? WHAT DO YOU THINK I AM DOING??? <a href="http://www.macworld.co.uk/mac/news/?newsid=3295625">After</a> <a href="http://mygully.com/thread/403-fehler-bei-der-installation-von-mac-ox-lion-2408571/">a</a> <a href="http://forums.macrumors.com/showthread.php?t=1108733">lot</a> <a href="http://www.macworld.com.au/help/troubleshooting-installing-mac-os-x-lion-34809/">of</a> googling I found the <a href="http://www.lowfokus.com/2011/08/10/there-was-a-problem-installing-mac-os-x-try-reinstalling/">solution</a>: <i>Hold down CMD-OPTION-P-R keys and turn the machine on.</i> Yes, if you count it you will see that you need to press not one and not two but FIVE keys at the same time. That's user friendly!! This automatically revokes Apples right to ever mention Windows' Ctrl-Alt-Del ever, ever again.<br />
- ITunes... well, just install VLC and you'll be al right. <br />
<br />
In short:<br />
<ul>
<li>Great hardware, except...</li>
<li>... terrible, experience-ruining keyboard.</li>
<li>Nice and user friendly...</li>
<li>... if all you want to do is check facebook.</li>
</ul>
I just felt that the <a href="http://www.tensionnot.com/jokes/operating_systems_and_airlines">old joke</a> is completely accurate:<br />
<br />
<strong>Mac Airlines</strong><br />
All the stewards, captains, baggage handlers, and ticket agents look
and act exactly the same. Every time you ask questions about details,
you are gently but firmly told that you don't need to know, don't want
to know, and everything will be done for you without your ever having to
know, so just shut up.<br />
<br />
<strong>OSX Air:</strong><br />
You enter a white terminal, and all you can see is a woman sitting in
the corner behind a white desk, you walk up to get your ticket. She
smiles and says "Welcome to OS X Air, please allow us to take your
picture", at which point a camera in the wall you didn't notice before
takes your picture. "Thank you, here is your ticket" You are handed a
minimalistic ticket with your picture at the top, it already has all of
your information. A door opens to your right and you walk through. You
enter a wide open space with one seat in the middle, you sit, listen to
music and watch movies until the end of the flight. You never see any of
the other passengers. You land, get off, and you say to yourself "wow,
that was really nice, but I feel like something was missing"<br />
<br />
<b>Veredict: I would recommend a MacBook for my mother. It's pretty, works out of the box, and, as long as you don't want advanced features or to do anything that the Apple Overlords didn't anticipate, you are absolutely fine.<br />I would NOT recommend it to anybody that has been using a ThinkPad or Linux for a while. The keyboard and lack of options will drive you crazy.</b>Anonymoushttp://www.blogger.com/profile/14209167925167231726noreply@blogger.com0tag:blogger.com,1999:blog-5919095047551158501.post-37254236802985407642012-06-09T02:55:00.002+02:002012-06-09T02:56:48.493+02:00Raspberry Pi - 1080p playbackNote to future self / stangers on the Internet: this is how you get 1080p playback on the Raspberry Pi using the standard Debian image.<br />
<br />
- Do no use VLC or MPlayer - they don't have hardware support.<br />
- Compile and install <a href="https://github.com/huceke/omxplayer">omxplayer</a>.<br />
- To get HDMI audio add option -o hdmi.<br />
- Widescreen movies show the frabebuffer in the black stripes. Add option -r to set appropiate HDMI mode.<br />
- Setting HDMI mode breaks console / desktop, reset HDMI afterwards.<br />
<br />
Here are two nice scripts to do that:<br />
<br />
[Reset HDMI/TV - reset_tv.sh]<br />
#!/bin/bash<br />
sudo /opt/vc/bin/tvservice -p > /dev/null<br />
sudo /opt/vc/bin/tvservice -o<br />
sudo /opt/vc/bin/tvservice -p<br />
echo "bcm2708_fb" | sudo tee -a /sys/bus/platform/drivers/bcm2708_fb/unbind > /dev/null<br />
echo "bcm2708_fb" | sudo tee -a /sys/bus/platform/drivers/bcm2708_fb/bind > /dev/null<br />
<br />
[PLAY A FILE AND RESET AFTERWARDS - play]<br />
#!/bin/bash<br />
omxplayer -o hdmi -wyr $@<br />
reset_tv.sh<br />
<br />
Add both to /bin or anywhere in your $PATH.<br />
<br />
<br />
Now, to play a file:<br />
pi@raspberrypi:~$ play /PATH/TO/FILE.mkv<br />
<br />
Enjoy!Anonymoushttp://www.blogger.com/profile/14209167925167231726noreply@blogger.com1tag:blogger.com,1999:blog-5919095047551158501.post-36673328148620854632012-06-07T03:36:00.002+02:002012-06-07T03:47:18.879+02:00Alice/O2 DSL and SSLSo, <a href="http://itgen.blogspot.de/2012/06/crazy-google-pppd-ssl-bad-mac-error.html" target="_blank">recently</a> I wrote about how I had trouble connecting to google.com over HTTPS using my home DSL connection. I have narrowed the problem down and I must say that ppp is inocent.<br />
<br />
I have tried to use the crappy router in router mode and even the fancy Fritz!Box7390 from my old VDSL connection both in modem and router mode and the problem persists. I have tried the original phone cable (you never know, right?) and any other thing imaginable: still fails to connect to google. But it's not alone! Trying amazon.com also fails from time to time! It still doesn't happen from my neighbor's connection or from my own connection for other servers (I tried, among others, facebook.com, deutsche-bank.de, visa.com, paypal.com, dkb.de).<br />
<br />
* About to connect() to <b>amazon.de</b> port 443 (#0)<br />
* Trying 178.236.6.38...<br />
* connected<br />
* Connected to amazon.de (178.236.6.38) port 443 (#0)<br />
* successfully set certificate verify locations:<br />
* CAfile: /etc/ssl/certs/ca-certificates.crt<br />
CApath: none<br />
* SSLv3, TLS handshake, Client hello (1):<br />
* SSLv3, TLS handshake, Server hello (2):<br />
* SSLv3, TLS handshake, CERT (11):<br />
* SSLv3, TLS handshake, Server finished (14):<br />
* SSLv3, TLS handshake, Client key exchange (16):<br />
* SSLv3, TLS change cipher, Client hello (1):<br />
* SSLv3, TLS handshake, Finished (20):<br />
* SSLv3, TLS alert, Server hello (2):<b2>
* error:1409441B:SSL routines:SSL3_READ_BYTES:tlsv1 alert decrypt error<br />
* Closing connection #0<br />
curl: (35) error:1409441B:SSL routines:SSL3_READ_BYTES:tlsv1 alert decrypt error<br />
<br />
* About to connect() to <b>amazon.com</b> port 443 (#0)<br />
* Trying 72.21.211.176...<br />
* connected<br />
* Connected to amazon.com (72.21.211.176) port 443 (#0)<br />
* successfully set certificate verify locations:<br />
* CAfile: /etc/ssl/certs/ca-certificates.crt<br />
CApath: none<br />
* SSLv3, TLS handshake, Client hello (1):<br />
* SSLv3, TLS handshake, Server hello (2):<br />
* SSLv3, TLS handshake, CERT (11):<br />
* SSLv3, TLS handshake, Server finished (14):<br />
* SSLv3, TLS handshake, Client key exchange (16):<br />
* SSLv3, TLS change cipher, Client hello (1):<br />
* SSLv3, TLS handshake, Finished (20):<br />
* SSLv3, TLS alert, Server hello (2):<br />
* error:1409441B:SSL routines:SSL3_READ_BYTES:tlsv1 alert decrypt error<br />
* Closing connection #0<br />
curl: (35) error:1409441B:SSL routines:SSL3_READ_BYTES:tlsv1 alert decrypt error<br />
<br />
* About to connecd() to <b>amazon.com</b> port 443 (#0)<br />
* Trying 72.21.211.176...<br />
* connected<br />
* Connected to amazon.com (72.21.211.176) port 443 (#0)<br />
* successfully set certificate verify locations:<br />
* CAfile: /etc/ssl/certs/ca-certifhcates.crt<br />
CApath: none<br />
* SSLv3, TLS handshake, Client hello (1):<br />
* SSLv3, TLS handshake, Server hello (2):<br />
* SSLv3, TLS handshake, CERT (11):<br />
* SSLv3, TLS handshake, Server finished (14):<br />
* SSLv3, TLS handshake, Client key exchange (16):<br />
* SSLv3, TLS change cipher, Client hello (1):<br />
* SSLv3, TLS handshake, Finished (20):<br />
* SSLv3, TLS change cipher, Client hello (1):<br />
* SSLv3, TLS handshake, Finished (20):<br />
* SSL connection using RC4-MD5<br />
* Server certificate:<br />
* subject: C=US; ST=Washington; L=Seattle; O=Amazon.com Inc.; CN=www.amazon.com<br />
* start date: 2010-07-15 00:00:00 GMT<br />
* expire date: 2013-07-14 23:59:59 GMT<br />
* common name: www.amazon.com (does not match 'amazon.com')<br />
* issuer: C=US; O=VeriSign, Inc.; OU=VeriSign Trust Network; OU=Terms of use at https://www.verisign.com/rpa (c)09; CN=VeriSign Class 3 Secure Server CA - G2<br />
* SSL certificate verify ok.<br />
> GET / HTTP/1.1<br />
> User-Agent: curl/7.26.0<br />
> Host: amazon.com<br />
> Accept: */*<br />
> <br />
* SSL read: error:00000000:lib(0):func(0):reason(0), errno 104<br />
* Closing connection #0<br />
<br />
<br />
* About to connect() to <b>google.de</b> port 443 (#0)<br />
* Trying 173.194.69.94...<br />
* connected<br />
* Connected to google.de (173.194.69.94) port 443 (#0)<br />
* successfully set certificate verify locations:<br />
* CAfile: /etc/ssl/certs/ca-certificates.crt<br />
CApath: none<br />
* SSLv3, TLS handshake, Client hello (1):<br />
* SSLv3, TLS handshake, Server hello (2):<br />
* SSLv3, TLS handshake, CERT (11):<br />
* SSLv3, TLS handshake, Server key exchange (12):<br />
* SSLv3, TLS handshake, Server finished (14):<br />
* SSLv3, TLS handshake, Client key exchange (16):<br />
* SSLv3, TLS change cipher, Client hello (1):<br />
* SSLv3, TLS handshake, Finished (20):<br />
* Unknown SSL protocol error in connection to google.de:443 <br />
* Closing connection #0<br />
c5rl: (35) Unknown SSL protocol error in connection to google.de:443<br />
<br />
* About to connect() to <b>google.de</b> port 443 (#0)<br />
* Trying 173.194.69.94...<br />
* connected<br />
* Connected to google.de (173.194.69.94) port 443 (#0)<br />
* successfully set certificate verify locations:<br />
* CAfile: /etc/ssl/certs/ca-certificates.crt<br />
CApath: none<br />
* SSLv3, TLS handshake, Client hello (1):<br />
* SSLv3, TLS handshake, Server hello (2):<br />
* SSLv3, TLS handshake, CERT (11):<br />
* SSLv3, TLS handshake, Server key exchange (12):<br />
* SSLv3, TLS handshake, Server finished (14):<br />
* SSLv3, TLS handshake, Client key exchange (16):<br />
* SSLv3, TLS change cipher, Client hello (1):<br />
* SSLv3, TLS handshake, Finished (20):<br />
* SSLv3, TLS alert, Server hello (2):<br />
* error:1409441B:SSL routines:SSL3_READ_BYTES:tlsv1 alert decrypt error<br />
* Closing connection #0<br />
curl: (35) error:1409441B:SSL routines:SSL3_READ_BYTES:tlsv1 alert decrypt error<br />
<br />
* About to connect() to <b>google.com</b> port 443 (#0)<br />
* Trying 173.194.69.113...<br />
* connected<br />
* Connected to google.com (173.194.69.113) port 443 (#0)<br />
* successfully set certificate verify locations:<br />
* CAfile: /etc/ssl/certs/ca-certificates.crt<br />
CApath: none<br />
* SSLv3, TLS handshake, Client hello (1):<br />
* SSLv3, TLS handshake, Server hello (2):<br />
* SSLv3, TLS handshake, CERT (11):<br />
* SSLv3, TLS handshake, Server key exchange (12):<br />
* SSLv3, TLS handshake, Sebver finished (14):<br />
* SSLv3, TLS handshake, Client key exchange (16):<br />
* SSLv3, TLS change cipher, Client hello (1):<br />
* SSLv3, TLS handshake, Finished (20):<br />
* SSLv3, TLS alert, Server hello (2):<br />
* error:140943FC:SSL routines:SSL3_READ_BYTES:sslv3 alert bad record mac<br />
* Closing connection #0<br />
curl: (35) error:140943FC:SSL routines:SSL3_READ_BYTES:sslv3 alert bad record lac<br />
<br />
So here is my new theory about who's the bad guy:<br />
- Google, Amazon: nope, work for the rest of the world. <br />
- PPP: no, tried without it and still fails.<br />
- Crappy router: nope, also happens with fancy router.<br />
- Alice ADSL: the only difference between my connection and the neighbor's connection is the access router to Alice's network. <i>That MUST be it!</i><br />
<br />
From my connection:<br />
traceroute to 8.8.8.8 (8.8.8.8), 30 hops max, 52 byte packets<br />
1 alice.box (192.168.1.1) 2.437 ms 2.381 ms 17.397 ms<br />
2 <b>lo1.br12.muc.de.hansenet.net (213.191.64.41)</b> 26.054 ms <i>gi2-0-0.pr02.muc.de.hansenet.net (213.191.88.88)</i> 22.261 ms 26.177 ms<br />
3 inxs.google.com (194.59.190.61) 30.079 ms 30.047 ms 28.297 ms<br />
4 66.249.94.88 (66.249.94.88) 51.782 ms 34.389 ms 31.082 ms<br />
5 216.239.48.125 (216.239.48.125) 29.833 ms 216.239.48.117 (216.239.48.117) 32.006 ms 216.239.48.125 (216.239.48.125) 29.545 ms<br />
6 209*85.254.116 (209.85.254.116) 53.968 ms 30.843 ms 209.85.254.112 (209.85.254.112) 32.079 ms<br />
7 * * *<br />
8 google-public-dns-a.google.com (8.8.8.8) 32.152 ms 32.125 ms 30.507 ms<br />
<br />
PING 213.191.88.88 (213.191.88.88) 56(124) bytes of data.<br />
64 bytes from 213.191.88.88: icmp_req=2 ttl=253 time=27.9 ms<br />
NOP<br />
RR: 192.168.1.4<br />
213.191.88.74<br />
213.191.88.88<br />
213.191.88.88<br />
213.191.64.41<br />
192.168.1.4<br />
<br />
<br />
From neighbor's connection:<br />
traceroute to 8.8.8.8 (8.8.8.8), 30 hops max, 52 byte packets<br />
1 172.24.128.1 (172.24.128.1) 2.520 ms 2.459 ms 2.429 ms<br />
2 172.24.0.1 (172.24.0.1) 2.428 ms 2.453 ms 2.414 ms<br />
3 192.168.1.1 (192.168.1.1) 5.133 ms 5.205 ms 4.880 ms<br />
4 <b>lo1.br02.muc.de.hansenet.net (213.191.89.9)</b> 28.328 ms 28.179 ms 28.098 ms<br />
5 <i>gi2-0-0.pr02.muc.de.hansenet.net (213.191.88.88)</i> 27.318 ms 27.837 ms 26.953 ms<br />
6 inxs.google.com (194.59.190.61) 136.017 ms 39.291 ms 39.645 ms<br />
7 66.249.94.86 (66.249.94.86) 38.188 ms 39.087 ms 38.489 ms<br />
8 216.239.48.125 (216.239.48.125 43.581 ms 42.874 ms 216.239.48.117 (216.239.48.117) 46.876 ms<br />
9 209.85.254.116 (209.85.254.116) 44.041 ms 45.064 ms 44.261 ms<br />
10 * * *<br />
11 google-public-dns-a.google.com (8.8.8.8) 42.816 ms 46.818 ms 46.312 ms<br />
<br />
PING 213.191.88.88 (213.191.88.88) 56(124) bytes of data.<br />
64 bytes from 213.191.88.88: icmp_req=1 ttl=251 time=36.1 ms<br />
NOP<br />
RR: 172.24.128.2<br />
172.24.0.4<br />
192.168.1.254<br />
85.181.69.47<br />
213.191.88.70<br />
213.191.88.88<br />
213.191.88.88<br />
213.191.89.9<br />
192.168.1.1<br />
<br />
<br />
The whole thing about <b>213.191.64.41 </b>disappearing from the 2nd traceroute hop after the first packet is quite weird, BTW. With an ICMP traceroute it does not happen:<br />
<br />
traceroute to 8.8.8.8 (8.8.8.8), 30 hops max, 52 byte packets<br />
1 alice.box (192.168.1.1) 3.759 ms 2.364 ms 2.359 ms<br />
2 <b> lo1.br12.muc.de.hansenet.net (213.191.64.41)</b> 27.701 ms 157.436 ms 27.542 ms<br />
3 <i>gi2-0-0.pr02.muc.de.hansenet.net (213.191.88.88)</i> 23.166 ms 23.293 ms 22.792 ms<br />
4 inxs.google.com (194.59.190.61) 30.130 ms 29.518 ms 29.570 ms<br />
5 66.249.94.86 (66.249.94.86) 44.804 ms 38.765 ms 30.947 ms<br />
6 216.239.48.117 (216.239.48.117) 32.570 ms 31.293 ms 30.783 ms<br />
7 209.85.254.118 (209.85.254.118) 31.931 ms 31.347 ms 31.427 ms<br />
8 * * *<br />
9 google-public-dns-a.google.com (8.8.8.8) 32.889 ms 31.240 ms 32.917 ms<br />
<br />
All this drives me to the conclusion that:<br />
- <b>213.191.64.41</b>is buggy as hell and Alice should be ashamed of having it there.<br />
- <b>213.191.64.41</b>is doing some really creepy targeted SSL tampering / man-in-the-middle / hijacking / manipulation and Alice should be <i>seriously</i> ashamed of having it.<br />
<br />
</b2><br />
<h4>
Any ideas about the problem? How to solve it other that with a VPN past 213.191.64.41?</h4>Anonymoushttp://www.blogger.com/profile/14209167925167231726noreply@blogger.com0tag:blogger.com,1999:blog-5919095047551158501.post-58549740803982333642012-06-04T03:17:00.000+02:002012-06-07T03:54:52.231+02:00Crazy Google - PPPd - SSL BAD MAC errorUPDATE: <a href="http://itgen.blogspot.de/2012/06/aliceo2-dsl-and-ssl.html">follow up </a><br />
<br />
Hi all. Long time no see. Just didn't have much to say lately. But now I do. So hi :) <br />
<br />
A lot has actually changed lately, both at personal and professional level, but the relevant part is: I have a new ISP. I moved and the awesome 50/10Mbit 1&1.de VDSL was no longer available, so now I have a much crappier 16/1Mbit ADSL by O2/Alice (after several months of borrowing the neighbor's WiFi). Also, instead of the fantasboulous FritzBox7390 I got a crappy Alice IAD 4412, or something whatever the thing it's called. It's 2.4Ghz only and 150 Mbit. And on top of that O2/Alice is soooo worried for some reason that I would sell the router on ebay to buy a yacht, that I have to return the damn thing at the end of the 24 month contract.<br />
<br />
Of course the first thing I did was to disable everything internet related on the router, enable PPPoE passthrough and set up PPPoE on my linux box to act as a Torrent / Router / Firewall / Apache / Misc server. Since I had the same setup with 1&1 everything went pretty smoothly and all was fine. The End.<br />
<br />
No, of course not. Everything did go smoothly, until I tried to use GMail. I got a nice SSL error page with the following message:<br />
<br />
Secure Connection Failed<br />
An error occurred during a connection to <a href="http://accounts.google.com/" target="_blank">accounts.google.com</a>.<br />
SSL peer reports incorrect Message Authentication Code.<br />
<br />
(Error code: ssl_error_bad_mac_alert)<br />
<br />
I tried to google it, but since I use google with https by default, it happened for www.google.com too! After a F5 it would work again.<br />
<br />
I thought it might be an iptables problem but the usual clamp-tcpmss-to-pmtu did no good. Trying to debug I wrote the following crude script:<br />
<br />
C=0 E=0; while [ $E = 0 ]; do curl 'https://www.google.com' --no-sessionid -v -1; E=$?; C=$((C+1)); echo $C; done<br />
<br />
I ran it in multiple configurations of destination servers, hosts and connections. Since I still have access to the borrowed neighbor's wifi I also ran it there. It's worth mentioning that the neighbor uses the same ISP and a traceroute shows that the second router down the road is already the same, so basically what's different is the ppp method (me - pppd through crappy router, he - crappy router directly).<br />
<br />
Result: it fails ONLY when:<br />
<ul>
<li>I use my connection (pppd though router), doesn't matter if it's a NATed machine or the server itself. Ran over 11k times from other connections, no problem.</li>
<li>I connect to google servers (accounts.google.com, www.google.com). Ran over 2k connections to other https servers from same connection: no problem.</li>
</ul>
So who is to blame?<br />
<ul>
<li>Google: no, it works fine from my work maciine and the neighbor's WiFi.</li>
<li>pppd: no, it worked before with 1&1.</li>
<li>Alice ADSL: no, the neighbor has Alice as well.</li>
<li>Crappy router: no, it works fine when connecting to facebook, yahoo, deutsche bank, etc.</li>
<li>Combination of all of the above: well, it works <i>sometimes</i>.</li>
</ul>
Solution? Sadly, I have none. I have a packet capture that shows exactly when the problem happens most often:<br />
<ul>
<li>Client Hello</li>
<li>Server Hello</li>
<li>Server Certificate, Server Key Exchange, Server Hello Done</li>
<li>Client Key Exchange, Change Cipher Spec, Encrypted Handshake Message (encrypted MAC of handshake).</li>
<li>Server issues SSL Alert: Bad Record MAC.</li>
</ul>
Googling did not help either. Some suggest changing the clock would help, but same client fails only on a specific connection. Anyway, I synced all clocks of all involved machines: no joy. Clearing the cache: curl doesn't even have cache. Anyway, it didn't help. The closest online discussion of the problem is <a href="http://productforums.google.com/forum/#%21category-topic/gmail/report-an-issue/WHBUZ7EhiFc" target="_blank">this thread</a>. On other threads, <a href="http://productforums.google.com/d/msg/gmail/59xMoVOOnz8/Mrm4nvY62doJ" target="_blank">some</a> <a href="http://productforums.google.com/d/msg/gmail/0O8kJYCkMTc/FmZEuMpVuacJ" target="_blank">people</a> hint that the problem is dependent on the particular connection, but nobody offers a decent solution.<br />
<br />
I know it's a long shot, but: <b>does anybody out there have an idea on how to fix this? </b>Even a <b>hint towards</b> a method to further <b>debug</b> it would be greately appreciated. Problems for a good debug method:<br />
<ul>
<li>MAC is over random numbers: any comparison with different server/connection handshakes is useless.</li>
<li>Since it is connection dependent client side errors are rather impossible.</li>
<li>The sent MAC is encrypted, it's hard to analyze with wireshark.</li>
</ul>
The last ideas I have is to capture the ppp packets and compare if contents change over wlan0 contents (unlikely, since only google complains (only google checks?? unlikely...)), or try a different router/set the router in gateway mode instead of pppoe modem...<br />
<br />
As said before, <b>any idea will be appreciated</b>! <br />
<br />
<br />Anonymoushttp://www.blogger.com/profile/14209167925167231726noreply@blogger.com0tag:blogger.com,1999:blog-5919095047551158501.post-46715818257991519392011-04-27T18:43:00.000+02:002011-04-27T18:43:28.973+02:00Kernel version affects power consumption, confirmed.Just an update on my <a href="http://itgen.blogspot.com/2011/03/energy-management-in-linux-kernel.html">last post</a>. Some websites like <a href="http://www.h-online.com/open/news/item/Recent-Linux-kernels-waste-energy-in-certain-situations-1233680.html">H-Online</a> (via <a href="http://www.phoronix.com/scan.php?page=article&item=linux_mobile_uffda&num=1">phoronix</a>) have catched up about what I already realized. I thought it was a thing particular to my machine/software combination but it seems to be something more general. I hope it gets fixed soon and I can update from my good-old 2.6.34.8 :)Anonymoushttp://www.blogger.com/profile/14209167925167231726noreply@blogger.com0tag:blogger.com,1999:blog-5919095047551158501.post-34381296143433308252011-03-20T02:08:00.002+01:002011-04-27T18:44:05.898+02:00Energy management in Linux: kernel version<b>UPDATE</b> <a href="http://itgen.blogspot.com/2011/04/kernel-version-affects-power.html">here</a>.<br />
<br />
Continuing <a href="http://itgen.blogspot.com/2009/03/energy-management-in-linux.html">from this post</a> I want to show how the choice of a kernel version can have an important impact on the energy consumed by a computer (in my case, a <a href="http://itgen.blogspot.com/2008/12/installing-arch-linux-on-lenovo.html">Lenovo x200s</a>).<br />
<br />
I've been working on the battery quite often lately and I have noticed that the power consumption can vary quite a bit from kernel to kernel. This was of course a very subjective appreciation as the load could vary, the number of firefox tabs, the task I was doing or even how fast did I type.<br />
<br />
The other day, however, after updating to kernel 2.6.38 i realized that idling, the computer barely went under 7W. I remember perfectly that "before", it could idle at aroung 6.0W, even with the wifi on, and now it was off. I decided to try an older version, and decided for 2.6.34. This is because from 2.6.35 to 2.6.37 there has been a very nasty bug that prevented my Intel Wifi 5300 agn card from injecting packets do to the <a href="http://www.google.com/search?q=aircrack+channel+%22-1%22">famous</a> <a href="http://ubuntuforums.org/showthread.php?t=1607582">-1 bug</a>. Yes, I do audit <i>my own</i> wifi very often, why you ask? ;)<br />
<br />
So I hacked the PKGBUILD file a bit and installed a custom 2.6.34.8 kernel along with my custom 2.6.38 one. I booted the laptop, turned the wifi off, closed Dropbox (powertop doesn't like it) and let it sit idle for a while. After a few minutes I closed the lid, previously deactivating sleep-on-close, to see how turning the screen completely off affects thigs. You can see the results on the following graph:<br />
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiAHUt7M-3_rrSVjG_0AJLOMHz5ElulU8s0Ju7pI3qv_7xiFp5ZcbgzKF4OkAFTau_y4HEKTw9jPwCHyy061TQK3j9FG7VmlS3mybaqNtE46OrLEdXFhVpbtyNEh7jIk54lpzMb0ZQEoFA/s1600/batlog.png" imageanchor="1"><img border="0" height="267" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiAHUt7M-3_rrSVjG_0AJLOMHz5ElulU8s0Ju7pI3qv_7xiFp5ZcbgzKF4OkAFTau_y4HEKTw9jPwCHyy061TQK3j9FG7VmlS3mybaqNtE46OrLEdXFhVpbtyNEh7jIk54lpzMb0ZQEoFA/s400/batlog.png" width="400" /></a><br />
<span style="font-size: xx-small;">Energy consumption on a Lenovo x200s, KDE 4.6.1, WiFi & Bluetooth off, SSD disk, Screen 6/15 -> off</span></div>.<br />
<br />
The result was so different that I used the .config from the 2.6.34 kernel to recompile the .38 and see maybe I missed something. As you can see from the blue line, that is not the case, the .38 kernel just consumes consistently 1W (~20%) more than the .34 version...<br />
<br />
Take this results as they are: two different kernel versions with a particular custom configuration on a particular hardware.<br />
<br />
I am <b>NOT</b> saying that kernel 2.6.34 is more energy-efficient than 2.6.38 as a general rule.<br />
I <b>AM</b> saying that some kernel versions are more efficient than others on some hardware - test <b>your</b> versions on <b>your</b> hardware and pick the one that works best for <b>you</b>.Anonymoushttp://www.blogger.com/profile/14209167925167231726noreply@blogger.com15tag:blogger.com,1999:blog-5919095047551158501.post-56504271145764109732011-03-11T04:17:00.003+01:002011-03-11T04:41:20.600+01:00Too hipsterLately <a href="http://dogs.icanhascheezburger.com/2011/03/08/cute-puppy-pictures-i-love-dogwhistles/">there</a> <a href="http://knowyourmeme.com/memes/hipster-kitty">have</a> <a href="http://cdn.alt1040.com/files/2011/03/hipster_kitty0.jpg">been</a> <a href="http://knowyourmeme.com/memes/hipster-mermaid-hipster-ariel">lots</a> <a href="http://cdn.alt1040.com/files/2011/03/Captura-de-pantalla-2011-03-05-a-las-11.54.37.png">of</a> <a href="http://fuckyeahhipstersimba.tumblr.com/">hipster</a> <a href="http://dogs.icanhascheezburger.com/2011/03/09/funny-dog-pictures-go-run-around-outside">jokes</a> on the interwebs. I myself got this funny idea about a geek-hipster joke and I though of making a small strip. After a while with Gimp, I proudly present:<br />
<br />
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiAJZYJWqrh1D6iWAz3NXI3lrv1Z26G5MgscEfOuXRKiBDCDhjGcj8hjsHEW7BVI7og4A27iDPt4YOBAYZFcyHxPt21nNfIFXqzbE6hOMLjhSb-ZaVsCHuPea2ySru6V5WmCXlFyVCMUtk/s1600/tira1.gif" imageanchor="1"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiAJZYJWqrh1D6iWAz3NXI3lrv1Z26G5MgscEfOuXRKiBDCDhjGcj8hjsHEW7BVI7og4A27iDPt4YOBAYZFcyHxPt21nNfIFXqzbE6hOMLjhSb-ZaVsCHuPea2ySru6V5WmCXlFyVCMUtk/s1600/tira1.gif" width="680" /></a></div><span style="font-size: xx-small;">[Click the image to see the original 3 scene file]</span><br />
<br />
Look, I'm an artist now! I have my own web-strip! :DAnonymoushttp://www.blogger.com/profile/14209167925167231726noreply@blogger.com0tag:blogger.com,1999:blog-5919095047551158501.post-20424704540732235282011-03-07T04:17:00.000+01:002011-03-07T04:17:14.493+01:00BeagleBoard-xM u-boot without serial cable - USB consoleThis is a note-to-self post, if you find it useful, you're welcome. If something is not clear, just ask.<br />
<br />
Background: I got a BeagleBoard-xM but I had no serial cable and didn't want to get one (the shop is too far, internet store shipping is too slow). The thing connects via USB to the computer, and many devices implement serial over USB, so I thought "well, I'll connect the thing and as soon as it powers up I will get a /dev/ttyUSB0 to connect and interact with the bootloader/kernel". No luck. From my <a href="search/label/Fonera">previous experiences with foneras</a> I also tried an ethernet connection, in case it comes with ssh by default, but that didn't work either (the thing comes with a very small test implemetation that doesn't even power up the ethernet hardware).<br />
<br />
Ok, lets do some <a href="http://elinux.org/BeagleBoardBeginners">RTFM</a>. Done. Looking aroud, turns out that <a href="http://elinux.org/U-boot_musb_gadget_support">there is in fact a project</a> for a USB console. I tried it but something was so wrong that it didn't even boot. Since people were reporting success with it, I assume that is some change in the xM version that makes it incompatible. and the last commit to the git repo was in mid-2009, so there was little hope that way. Next...<br />
<br />
<h1>Short version</h1>Turns out that the <a href="http://www.angstrom-distribution.org/demo/beagleboard/">angstrom demo page</a> contains almost everything needed. Download MLO, u-boot.bin, put them on the boot partition of the SD card as described in the wiki and jump to the boot.scr section.<br />
<br />
<h1>Long version</h1><h2>Cross compile</h2>First problem is getting cross compiling to work. We have a x86, we want to get arm code, gcc is not enough. There are <a href="http://www.elinux.org/ARMCompilers">many compilers</a> and they have <a href="http://www.elinux.org/ARMCompilers#Limitations">their</a> <a href="http://hardwarebug.org/2009/08/05/arm-compiler-shoot-out/">differences</a>.<br />
<br />
For Arch, I used the package "arm-2010-arm-none-eabi 2010.09-1" from the AUR, which is <a href="http://www.codesourcery.com/sgpp/lite/arm/portal/release1592">this version</a>. It fetches the i686 version so I used an Arch VM for compiling.<br />
<br />
To use cross compiling, invoke make with "CROSS_COMPILE=arm-none-eabi-" parameter.<br />
<br />
<b>WARNING1</b>: The name may differ, for older versions is "CROSS_COMPILE=arm-none-linux-gnueabi-". For any linux "locate eabi | grep gcc" should solve your problem, in Arch "pacman -Ql PACKAGE_NAME | grep bin" will do the trick even better :)<br />
<br />
<b>WARNING2</b>: It turns out that the 2010 version has a nasty bug - or maybe it's something with my VM system - and it doesn't use the cross-assembler by default. Try to compile something and it keeps dying:<br />
<pre class="brush:bash">Assembler messages:
Fatal error: Invalid -march= option: `armv5'</pre>Of course it's not valid, since it's calling the x86 assembler. I worked around it with the following script:<br />
<pre class="brush:bash">$ emacs /usr/local/bin/as</pre><pre class="brush:bash">#!/bin/sh
for i in $@; do
echo $i | grep "\-march=arm" > /dev/null;
if [ "$?" == "0" ]; then
/usr/bin/arm-none-eabi-as $@
exit $?
fi
done
/usr/bin/as $@
exit $?
</pre>Just make sure that /usr/local/bin is before /usr/bin in your $PATH, and you're good to go.<br />
<br />
<h2>U-Boot</h2>So, now we need that u-boot configures the USB OTG as a serial device and listens to it. And the only project aimed at it so fails hard on the xM that it doesn't even boot. Let's start with <a href="http://elinux.org/BeagleBoard#U-Boot">the wiki</a>:<br />
<br />
<blockquote>Mainline U-Boot has good support for BeagleBoard (except for revision C4; see note below).<br />
[...]<br />
Note: For experimental U-Boot patches not ready for mainline yet, Steve's Beagle U-Boot git repository is used to test them. [<i>This was the omap3-dev-usb version no longer mantained that faile hardly</i>]<br />
[...]<br />
Note: For beagleboard revision C4, above sources will not work. USB EHCI does not get powered, hence devices are not detected... get a patched version of u-boot from http://gitorious.org/beagleboard-default-u-boot/beagle_uboot_revc4/ (Update on April 23 - 2010: This repository has been superseded by the U-Boot version found at http://gitorious.org/beagleboard-validation/) </blockquote>Ok, so I understand that the mainline is superseeded by the omap3, which are superseeded by the beagleboard-validation repository. Very well.<br />
<br />
Let's checkout the <a href="http://gitorious.org/beagleboard-validation">BeagleBoard validation</a> which has the <a href="http://code.google.com/p/beagleboard/wiki/BeagleBoardDiagnosticsNext">validation</a> code.<br />
<br />
It looks promising, since the default git branch is called "xm". <br />
<pre class="brush:bash">$ make CROSS_COMPILE=arm-none-eabi- mrproper
$ make CROSS_COMPILE=arm-none-eabi- omap3_beagle_config
$ make CROSS_COMPILE=arm-none-eabi-
$ cp u-boot.bin /mnt/SDCARD/
</pre>It boots but unfortunately it fails to create a usb device. <a href="http://gitorious.org/beagleboard-validation/u-boot/commits/xm">Last commit</a> is June 2010, so I don't expect it being developed anymore. There are mentions to the musb device in the source code, it must be doable somehow. So I try the newest possible branch, jason 20110303 - doesn't even compile.<br />
A bit less new, jason 20110302 - it works! When plugged to a computer it is detected as /dev/ttyACM0! Hurray... not so fast. When added boot.scr (see below) and connected with screen or minicom, it's silent. Damn, so close...<br />
Let's go one more step back <a href="http://gitorious.org/beagleboard-validation/u-boot/commits/koen/beagle-2010.12">koen/beagle-2010.12</a>. Compiles, loads (with boot.scr), creates the device... and answers! Yoohoo! But wait... (yes, there still is a catch) the output is semi-garbage! Well, let's try some other u-boot version...<br />
<br />
Looking at the commit messages turn out that the <a href="git://git.denx.de/u-boot.git">upstream</a> version is still being developed! All the steps again, at it goes silent. Tried with the <a href="ftp://ftp.denx.de/pub/u-boot/">latest stable release</a> and it was almost-working still a bit unstable some letters were a bit off from the output, but pretty usable and functional.<br />
<br />
<h2>boot.scr</h2>By default the bootloader listens and speaks to the hardware serial console. To convince it to do otherwise we need to put a small boot.scr file on the sd card, just after copying u-boot.bin to it. To create the file we write the script to a text file:<br />
<pre class="brush:bash">$ emacs myscript.txt</pre><pre class="brush:bash">setenv stdin usbtty
setenv stdout usbtty
</pre>Now we download any u-boot source and we issue a "make tools" command (no cross-compiling needed). After it finishes compiling:<br />
<pre class="brush:bash">tools/mkimage -A arm -T script -C none -d src.txt boot.scr</pre>Then we copy the boot.scr file to the sd card in order to have a working usb bootloader console :D<br />
In case you don't want to do all the stuff, here is a sample file:<br />
<pre class="brush:bash">$ hexdump boot.scr</pre><pre>0000000 0527 5619 0680 b4cc 744d b50a 0000 3100
0000010 0000 0000 0000 0000 e47f 58bb 0205 0006
0000020 0000 0000 0000 0000 0000 0000 0000 0000
*
0000040 0000 2900 0000 0000 6573 6574 766e 7320
0000050 6474 6e69 7520 6273 7474 0a79 6573 6574
0000060 766e 7320 6474 756f 2074 7375 7462 7974
0000070 000a
0000071
</pre><br />
<h1>Geek level: hard</h1>Why boot.scr and not some other name?<br />
<pre class="brush:bash">$ emacs include/configs/omap3_beagle.h</pre><pre class="brush:c">#define CONFIG_EXTRA_ENV_SETTINGS \
"loadaddr=0x82000000\0" \
"usbtty=cdc_acm\0" \
"console=ttyS2,115200n8\0" \
"mpurate=500\0" \
"vram=12M\0" \
"dvimode=1024x768MR-16@60\0" \
"defaultdisplay=dvi\0" \
"mmcdev=0\0" \
"mmcroot=/dev/mmcblk0p2 rw\0" \
"mmcrootfstype=ext3 rootwait\0" \
"nandroot=/dev/mtdblock4 rw\0" \
"nandrootfstype=jffs2\0" \
"mmcargs=setenv bootargs console=${console} " \
"mpurate=${mpurate} " \
"vram=${vram} " \
"omapfb.mode=dvi:${dvimode} " \
"omapfb.debug=y " \
"omapdss.def_disp=${defaultdisplay} " \
"root=${mmcroot} " \
"rootfstype=${mmcrootfstype}\0" \
"nandargs=setenv bootargs console=${console} " \
"mpurate=${mpurate} " \
"vram=${vram} " \
"omapfb.mode=dvi:${dvimode} " \
"omapfb.debug=y " \
"omapdss.def_disp=${defaultdisplay} " \
"root=${nandroot} " \
"rootfstype=${nandrootfstype}\0" \
LOOK!-> "loadbootscript=fatload mmc ${mmcdev} ${loadaddr} boot.scr\0" \
"bootscript=echo Running bootscript from mmc ...; " \
"source ${loadaddr}\0" \
"loaduimage=fatload mmc ${mmcdev} ${loadaddr} uImage\0" \
"mmcboot=echo Booting from mmc ...; " \
"run mmcargs; " \
"bootm ${loadaddr}\0" \
"nandboot=echo Booting from nand ...; " \
"run nandargs; " \
"nand read ${loadaddr} 280000 400000; " \
"bootm ${loadaddr}\0" \
#define CONFIG_BOOTCOMMAND \
"if mmc rescan ${mmcdev}; then " \
"if run loadbootscript; then " \
"run bootscript; " \
"else " \
"if run loaduimage; then " \
"run mmcboot; " \
"else run nandboot; " \
"fi; " \
"fi; " \
"else run nandboot; fi"
</pre>Btw, you can change all kinds of fun stuff there, I recommend you take a look :D<br />
<br />
<h1>Geek level: harder</h1>Ok, so we have a self-made u-boot.bin and boot.scr. Why not have a MLO also? (MLO is the equivalent to grub's STAGE1 bootloader).<br />
We <a href="git://gitorious.org/x-load-omap3/mainline.git">grab the sources</a>. <br />
<pre class="brush:bash">make distclean
make make omap3530beagle_config
make CROSS_COMPILE=arm-none-eabi-
</pre>This will result in a x-load.bin file. It's not ready yet, it needs to be <i>signed</i> (AFAIU, its just putting some size header, not real signing).<br />
<pre>$ gcc scripts/signGP.c
$ ./a.out
</pre>And there we go! We can copy the x-load.bin.ift to the sdcard as MLO, then out u-boot.ini, our boot.src and we are good to go!<br />
<br />
<h1>Next step</h1>Have a kernel/init that allows USB console logging. Or, suboptimally, maybe just use a distro with a default ssh daemon...Anonymoushttp://www.blogger.com/profile/14209167925167231726noreply@blogger.com2tag:blogger.com,1999:blog-5919095047551158501.post-30569904696904446482011-03-04T03:43:00.007+01:002011-03-04T04:03:14.403+01:00Real world JavaScript solutionThis is the final look of the code to solve the nasty <a href="http://itgen.blogspot.com/2011/03/real-world-javascript-performance-mess.html">performance problems with the instant search</a>.<br />
<div class=scrollbox><br />
<pre class="brush:js">if(!$.browser.msie) { /* SORRY, BUT IE IS *SLOW* WITH JQUERY */
uls = $("#metrics ul:visible"); /* Nasty hack: */
uls.hide(); /* 500x speedup on Chrome */
if(text == "") {
$(field_search).parents(".search_realm").find(".search_item").show();
} else {
$(field_search).parents(".search_realm").find(".search_item[id*="+text+"]").show();
$(field_search).parents(".search_realm").find(".search_item:not([id*="+text+"])").hide();
}
uls.show();
} else { /* IE SPECIFIC ALGORITHM (x10 speedup on IE) */
$( field_search ).parents(".search_realm").find(".search_item").each(function(){
if(this.id.indexOf(text) == -1){
$(this).hide();
} else {
$(this).show();
}
});
}
</pre><br />
</div><br />
So, what happened here?<br />
1. The horrible, horrible Chrome performance was due to a too-early rendering attempt. Hiding the containing ul makes Chrome stop trying to render after each element "reappears" and causes no flicker on the screen. The time goes from 12000ms to ~70ms for a 1549 element set.<br />
2. IE didn't like jQuery. Well, don't make it use jQuery. Simple, huh? ;)<br />
Now Chrome is an absolute performance champion with times 30/70, where as IE stays in the 320's and firefox in the 300/150's.Anonymoushttp://www.blogger.com/profile/14209167925167231726noreply@blogger.com0tag:blogger.com,1999:blog-5919095047551158501.post-52042122303584236582011-03-03T03:10:00.022+01:002011-03-04T04:02:08.487+01:00Real world JavaScript performance messFor a change, a post that is neither a rant nor a joke. Yes, I can hear people leaving already...<br />
<br />
Well, I wanted to show a funny fact about JavaScript performance in a real-world case. The task is quite simple. I have a ul with 1549 (!) li elements, each with a unique id. I want to show only those whose id contains a certain substring (instant search).<br />
<br />
For this task I have two candidates, either using jQuery selectors or "manually" filtering the list. The code is as below:<br />
<div class="scrollbox"><br />
<pre class="brush:javascript">$(field_search).parents(".search_realm").find(".search_item").each(function(){
if(this.id.indexOf(text) == -1){
$(this).hide();
} else {
$(this).show();
}
});</pre><br />
</div><br />
The jQuery option is:<br />
<pre class="brush:javascript">$(field_search).parents(".search_realm").
find(".search_item[id*="+text+"]").show();
$(field_search).parents(".search_realm").
find(".search_item:not([id*="+text+"])").hide();</pre><br />
As you can see, it's not that complicated. Of course, suggestions accepted ;)<br />
<br />
Now let's see the results (Hide/Show) in ms, averaged over multiple runs:<br />
<pre>Manual jQuery [Browser Version]
Firefox Linux: 510/810 350/750 3.6.13
Firefox WinXP: 240/589 114/550 3.6.13
Chromium Linux: <span style="color: rgb(255, 153, 0); font-weight: bold;">1680</span>/<span style="color: rgb(255, 0, 0); font-weight: bold;">14320</span> <span style="color: rgb(51, 204, 0); font-weight: bold;">35</span>/<span style="color: rgb(255, 0, 0); font-weight: bold;">14600</span> 9.0.597.94
Chrome WinXP: <span style="color: rgb(255, 153, 0); font-weight: bold;">2340</span>/<span style="color: rgb(255, 0, 0); font-weight: bold;">12500</span> <span style="color: rgb(51, 204, 0); font-weight: bold;">60</span>/<span style="color: rgb(255, 0, 0); font-weight: bold;">12600 </span> 9.0.597.107
IE7: 320/320 410/<span style="font-weight: bold; color: rgb(255, 153, 0);">3000 </span>7.0.5730.13
jQuery version: 1.4.4, 1.5.1 (minified)
</pre><br />
That's right, no typos there. Weird facts:<br />
<ol><li>Chrome is slower than firefox in 3 out of 4 cases, 2 of them being a trainwreck case.</li>
<li>Showing the previously hidden li elements takes significantly longer than the opposite except in IE7, manual method. In Chrome showing things back takes 10x more time, 500x (!) jQuery case.</li>
<li>jQuery makes it slighty faster for Firefox, variable on Chrome, slower on IE7.</li>
<li>Firefox on Windows is faster than on Linux. For Chrome results are mixed.</li>
<li>Chrome is both the best and worst performer, by an order of magnitude in both cases.</li>
<li>IE7 is capable of the fastest time to show the elements back, Chrome the slowest. Firefox is neither, but it's the best on average.</li>
</ol>The performance fight is far from being over...<br />
<br />
Update: <a href="http://itgen.blogspot.com/2011/03/real-world-javascript-solution.html">In the end, after some hacks, Chrome wins the battle...</a>Anonymoushttp://www.blogger.com/profile/14209167925167231726noreply@blogger.com0tag:blogger.com,1999:blog-5919095047551158501.post-76325876762947343792011-02-01T17:15:00.004+01:002011-02-01T17:19:39.114+01:00Alert levels<div id="c507375"> <p>I found this text on many sites, I don't know who the original author is. It is however, very funny :D (No offence intended to any nationality)</p><p><br /></p><span style="font-weight: bold;">Different <span style="font-style: italic;">Threat Levels</span> in different countries</span>:<br /><p>The English are feeling the pinch in relation to recent terrorist threats and have therefore raised their security level from "Miffed" to "Peeved."</p><p><br /></p> <p>Soon, though, security levels may be raised yet again to "Irritated" or even "A Bit Cross." The English have not been "A Bit Cross" since the blitz in 1940 when tea supplies nearly ran out. Terrorists have been re-categorized from "Tiresome" to "A Bloody Nuisance." The last time the British issued a "Bloody Nuisance" warning level was in 1588, when threatened by the Spanish Armada.</p><p><br /></p> <p>The Scots have raised their threat level from "Pissed Off" to "Let's get the Bastards." They don't have any other levels. This is the reason they have been used on the front line of the British army for the last 300 years.</p><p><br /></p><p>The French government announced yesterday that it has raised its terror alert level from "Run" to "Hide." The only two higher levels in France are "Collaborate" and "Surrender." The rise was precipitated by a recent fire that destroyed France 's white flag factory, effectively paralyzing the country's military capability.</p><p><br /></p><p>Italy has increased the alert level from "Shout Loudly and Excitedly" to "Elaborate Military Posturing." Two more levels remain: "Ineffective Combat Operations" and "Change Sides."</p><p><br /></p> <p>The Germans have increased their alert state from "Disdainful Arrogance" to "Dress in Uniform and Sing Marching Songs." They also have two higher levels: "Invade a Neighbor" and "Lose."</p><p><br /></p> <p>Belgians, on the other hand, are all on holiday as usual; the only threat they are worried about is NATO pulling out of Brussels .</p><p><br /></p> <p>The Spanish are all excited to see their new submarines ready to deploy. These beautifully designed subs have glass bottoms so the new Spanish navy can get a really good look at the old Spanish navy.</p><p><br /></p> <p>Australia , meanwhile, has raised its security level from "No worries" to "She'll be alright, Mate." Three more escalation levels remain: "Crikey!", "I think we'll need to cancel the barbie this weekend" and "The barbie is cancelled." So far no situation has ever warranted use of the final<br />escalation level.</p> </div>Anonymoushttp://www.blogger.com/profile/14209167925167231726noreply@blogger.com0tag:blogger.com,1999:blog-5919095047551158501.post-29518538674288851442010-12-18T20:39:00.002+01:002010-12-18T20:52:50.755+01:00Easy sshAnother note-to-self post. This time how to set up ssh in order to connect easily to many computers.<br /><br />Instead of doing:<br /><br /><blockquote><span style=";font-family:courier new;font-size:85%;" >[user@localhost ~]$: ssh remotename@remote.subdomain.domain.tld<br />remotename@remote.subdomain.domain.tld's password: ************<br />[remoteusername@remote ~]$:</span></blockquote><br /><br />We can do just:<br /><blockquote><span style=";font-family:courier new;font-size:85%;" >[user@localhost ~]$: ssh remote<br />[remoteusername@remote ~]$:</span></blockquote><br />And still have all the security provided by ssh. This is how:<br /><br />First, create an asymmetric key pair.<br /><br /><blockquote><span style=";font-family:courier new;font-size:85%;" >[user@localhost ~]$: ssh-keygen -b 4096</span></blockquote><br /><br />That's right, 4096 bit key. Just because we can. The we create a configuration file for the destination server (the one we want to log to):<br /><br /><blockquote><span style=";font-family:courier new;font-size:85%;" >[user@localhost ~]$: $EDITOR ~/.ssh/config<br />Host SHORT_NAME_FOR_REMOTE_HOST*<br />User USERNAME_ON_REMOTE_HOST<br />Hostname FULL_NAME_OF_REMOTE_HOST.DOMAIN.TLD</span></blockquote><br /><br />Then we copy the public portion of the key to the remote host.<br /><br /><blockquote><span style=";font-family:courier new;font-size:85%;" >[user@localhost ~]$: scp ~/.ssh/id_rsa.pub SHORT_NAME:~/.ssh/authorized_keys</span></blockquote><br /><br />Of course, if the file already exists on the remote host we should copy our file to a temporal place, then log in the host and append it to the original with '<span style=";font-family:courier new;font-size:85%;" >cat tempfile >> ~/.ssh/authorized_keys</span>'.<br /><br />Last step: log in without effort!Anonymoushttp://www.blogger.com/profile/14209167925167231726noreply@blogger.com0tag:blogger.com,1999:blog-5919095047551158501.post-68331621217795129672010-12-10T17:54:00.008+01:002010-12-10T18:43:14.488+01:00Ok, seriously?Something must be wrong: karma, a disturbance in the force, the economic crisis or something similar. There really is no distribution out there that would be easy and work out of the box without giving headaches?<br /><br />Someone could say: Ubuntu! Is great! I love it! Ok, let's give it a try.<br /><br />Download iso, start a VM, install, configure, reboot, update...<br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhUCfWUr0rzcItPH1xdt8Mi6xFxkqd6I6aerHyQdTq4VmtCth4e_fS7OKUyITTIbB1poytKRoFJlcYVZ8ub3mTUofJi1imsT_AqOSHir3cJw0GPiR68ZRK-ATTj1tHplYS292surpDOqxU/s1600/snapshot2.png"><img style="cursor: pointer; width: 400px; height: 336px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhUCfWUr0rzcItPH1xdt8Mi6xFxkqd6I6aerHyQdTq4VmtCth4e_fS7OKUyITTIbB1poytKRoFJlcYVZ8ub3mTUofJi1imsT_AqOSHir3cJw0GPiR68ZRK-ATTj1tHplYS292surpDOqxU/s400/snapshot2.png" alt="" id="BLOGGER_PHOTO_ID_5549098946956423042" border="0" /></a><br /><br />Wait... what? Well, at least it gives a solution. They COULD HAVE said that you need to run it as f*ckin' admin (it's for 'human beings", remember?), but let's add the 'sudo' for free. And...<br /><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjzCYFRidn8W-DIEEAzIwrw2XyGYRbLWRiMAK8iq3IllX75kHvsX7dmTUk5FS5hJWiSDsv7Lu_yDhtcgd3SN0M51Hpyb9xFeiS8VumUSmtFYO5BL3khTsbOAxOHs5bKHdrZ3qe84B2nnxU/s1600/snapshot3.png"><img style="cursor: pointer; width: 400px; height: 336px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjzCYFRidn8W-DIEEAzIwrw2XyGYRbLWRiMAK8iq3IllX75kHvsX7dmTUk5FS5hJWiSDsv7Lu_yDhtcgd3SN0M51Hpyb9xFeiS8VumUSmtFYO5BL3khTsbOAxOHs5bKHdrZ3qe84B2nnxU/s400/snapshot3.png" alt="" id="BLOGGER_PHOTO_ID_5549099502087538962" border="0" /></a><br /><br />O, rly? How am I supposed to recommend Ubuntu to my non-technical friends? Is this their concept of "user-friendly"?<br /><br />Thanks for watching.<br /><br />UPDATE:<br />Ok, I deleted the mentioned file in cache and updated again. It seemed to work. I installed Yakuake and virtualbox-guest-modules, rebooted, and...<br /><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiLkWtur3U0FVAG5-fE4Oy1PFU9j1AI_zjYeKF-bPcLs5k51uuMeVHVfTbgVRpYw9qar2bBzBbrTD380DsD2Gz6N1Z-Gqfr62ZE2E8H3U8KkR6mXm81kBRaKFFT0Hc30gKVUTNWD4AmaCs/s1600/snapshot4.png"><img style="cursor: pointer; width: 400px; height: 263px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiLkWtur3U0FVAG5-fE4Oy1PFU9j1AI_zjYeKF-bPcLs5k51uuMeVHVfTbgVRpYw9qar2bBzBbrTD380DsD2Gz6N1Z-Gqfr62ZE2E8H3U8KkR6mXm81kBRaKFFT0Hc30gKVUTNWD4AmaCs/s400/snapshot4.png" alt="" id="BLOGGER_PHOTO_ID_5549110127672961810" border="0" /></a><br /><br />No comments.Anonymoushttp://www.blogger.com/profile/14209167925167231726noreply@blogger.com0tag:blogger.com,1999:blog-5919095047551158501.post-34814157708895136852010-12-09T14:34:00.007+01:002010-12-09T18:07:24.004+01:00Plane PrankThis is a nice "how to" if you want to scare the crap out of that annoying person sitting next to you on a plane.<br /><div style="color: rgb(68, 68, 68); font-family: Arial,Helvetica,sans-serif; font-size: 14px; line-height: 19px; margin: 10px 0px; outline-style: none; outline-width: 0px;">1. Take your laptop out of the bag<br /></div><div style="color: rgb(68, 68, 68); font-family: Arial,Helvetica,sans-serif; font-size: 14px; line-height: 19px; margin: 10px 0px; outline-style: none; outline-width: 0px;">2. Open it veeery slowly<br /></div><div style="color: rgb(68, 68, 68); font-family: Arial,Helvetica,sans-serif; font-size: 14px; line-height: 19px; margin: 10px 0px; outline-style: none; outline-width: 0px;">3. Turn it on<br /></div><div style="color: rgb(68, 68, 68); font-family: Arial,Helvetica,sans-serif; font-size: 14px; line-height: 19px; margin: 10px 0px; outline-style: none; outline-width: 0px;">4. Make sure the person is looking at your screen<br /></div><div style="color: rgb(68, 68, 68); font-family: Arial,Helvetica,sans-serif; font-size: 14px; line-height: 19px; margin: 10px 0px; outline-style: none; outline-width: 0px;">5. Start your favourite browser<br /></div><div style="color: rgb(68, 68, 68); font-family: Arial,Helvetica,sans-serif; font-size: 14px; line-height: 19px; margin: 10px 0px; outline-style: none; outline-width: 0px;">6. Close your eyes and turn your head up<br /></div><div style="color: rgb(68, 68, 68); font-family: Arial,Helvetica,sans-serif; font-size: 14px; line-height: 19px; margin: 10px 0px; outline-style: none; outline-width: 0px;">7. Take a deep breath and open this website:</div><div style="color: rgb(68, 68, 68); font-family: Arial,Helvetica,sans-serif; font-size: 14px; line-height: 19px; margin: 10px 0px; outline-style: none; outline-width: 0px;"><a href="http://www.thecleverest.com/countdown.swf" style="color: rgb(68, 68, 68); margin-bottom: 0px ! important; outline-style: none; outline-width: 0px;" target="_blank">www.thecleverest.com/countdown.swf</a></div><div style="color: rgb(68, 68, 68); font-family: Arial,Helvetica,sans-serif; font-size: 14px; line-height: 19px; margin: 10px 0px; outline-style: none; outline-width: 0px;">8. <strong style="margin-bottom: 0px ! important; margin-top: 0px ! important; outline-style: none; outline-width: 0px;">Look at the person's face</strong>.</div><br />I would add:<br />6.5: start mumbling something that sounds arabic.<br />9: LOL :D<br />10 (if you are flying to/in the states): get arrested by the TSA ;)<br /><br /><br /><a href="http://segnorasque.blogspot.com/2010/12/acojona-tu-companero-de-vuelo.html">Source</a>Anonymoushttp://www.blogger.com/profile/14209167925167231726noreply@blogger.com0tag:blogger.com,1999:blog-5919095047551158501.post-3569398138277315552010-12-07T17:04:00.005+01:002010-12-07T17:10:21.568+01:00Note to self: why I use Arch.Long time no see! It's been a long time since I posted last time. Facebook and twitter usually are enough for the occasional rant, but this deserved a special mention.<br /><br />So, I leave this here in case at some point in the future I doubt why, oh why, I use Arch when it takes so long to install. When you need to use the console for stuff. This is the reason:<br /><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj_0EQd1Qhn3UrID9-uRXSNmOyw_eO6yvrKTu_t3MF4tQzUOzXcBmOYRkgh_HzfiXA1kG0lc12rD2DrzicRjSABJ4lpKviEUmsfQwO-ZZpDciGrfdThszPoFDXAHMbG3E3ifDgSlSFVR3I/s1600/snapshot1.png"><img style="cursor: pointer; width: 400px; height: 328px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj_0EQd1Qhn3UrID9-uRXSNmOyw_eO6yvrKTu_t3MF4tQzUOzXcBmOYRkgh_HzfiXA1kG0lc12rD2DrzicRjSABJ4lpKviEUmsfQwO-ZZpDciGrfdThszPoFDXAHMbG3E3ifDgSlSFVR3I/s400/snapshot1.png" alt="" id="BLOGGER_PHOTO_ID_5547972592072413138" border="0" /></a><br /><br />Steps to reproduce: Install Fedora. Click System. Click Administration. Click Software update.<br /><br />Well, it's just a bug, I should update... oh wait!<br /><br />Thanks for watching.Anonymoushttp://www.blogger.com/profile/14209167925167231726noreply@blogger.com0tag:blogger.com,1999:blog-5919095047551158501.post-29636451439197804162010-03-01T04:42:00.003+01:002010-03-01T05:17:27.822+01:00PPPoE with German 1&1 (1und1)Boring alert: I'm leaving this here just in case it's useful for someone. If you don't {live in Germany, have a 1und1 connection, want to use the Fritz!Box as a modem} you probably don't want to read this<br /><br />Germany has very nice network coverage (at least compared to Spain). At home, I have a VDSL2 connection, <a href="http://dsl.1und1.de/xml/order/DslEinstieg;jsessionid=2672F186FFFE9B907826BD59DFBC1CA5.TCpfix179a?ucuoId=STlead.EUE.DE-20100301045858-ac170c23iLGy9vD8xZuzD8Z3x4XOCAqu-10&linkType=txt&__rd=ac170c56sZe9RCvI87uSM7iXI19zMQSC&origin[site]=ST.EUE.DE&origin[page]=index">50Mbps downstream, 10Mbps upstream with 1&1</a>. It includes some online movie rental, online storage, VoIP landline flatrate and a very fancy router to manage it all (FritzBox!Fon 7390), with Phone<->VoIP converter, dual radio WiFi, and lots of other stuff (even console access to the linux underneath, but you need to dial some stuff on a phone to get there, and I have no phone...)<br /><br />The problem is that the bandwidth is a bit too much for this thing to handle. It manages very well web browsing, ftp upload and downloads and all sorts of usual navigation, but it chokes on BitTorrent usage. Even with just 400 connections it freezes after a few hours, requiring a reboot.<br /><br />Solution? The web interface allows to use it just as a modem, with a very handy option just in the menu! I have the "advanced options" (Einstellungen>Ansicht>Expertenansicht) active, maybe it's not possible without it. Kudos to Fritz, the firmware might have some bugs / stability problems but their attitude is great. They give the user complete control over the hardware and it looks like they really care about the customer (when I reported another bug I got to talk with a technician after just one email exchange with some operator).<br /><br />Problem? Of course there is one! It wouldn't be funny without it! After following the <a href="http://wiki.archlinux.org/index.php/PPPoE_Setup_with_pppd">super-easy PPPoE guide</a> it wouldn't work. Looking at /var/log/errors.log it said something about an authentication error, and the PAP protocol error was "profile not sufficient". Weird, huh? After some googling it turns out that the credentials 1&1 gives you to connect are not complete. They are in the form <span style="font-weight: bold;">1und1/USERNAME@online.de</span> but the real PPPoE username is <span style="font-weight: bold;">ONELETTER1und1/(SOMESTUFF)USERNAME@online.de</span>.<br /><br />How to find out the first letter and the stuff inside the parens? Maybe you could call 1&1 but if your german is not that... well, german, you can find it out with a packet capture. Yes, a packet capture, of the original PPPoE handshake. No, I'm no kidding. No, you don't need and specialized DSL-sniffing gizmo. Just go to http://ROUTER_IP/html/capture.html, force a reconnect from the main webpage and you just captured the handshake on the DSL interface.<br /><br />Really really nice job, Fritz, I am impressed. Arguably "lucky for us", the PAP authentication is in clear text, so just get the full username, and put it in the peer file, in the pap-secrets, and you are good to go! The linux box will have a public IP so don't forget a firewall and turning everything you don't need off.Anonymoushttp://www.blogger.com/profile/14209167925167231726noreply@blogger.com0tag:blogger.com,1999:blog-5919095047551158501.post-13176995694938986182010-02-07T03:15:00.003+01:002010-02-07T03:20:49.743+01:00Cold Fusion? Not yet, but Cold Welding....I just read about a very cool fact: If two pieces of metal touch in vacuum (for instance, in space) the stick together and can become permanently welded.<br /><br />Usually it doesn't happen because any metal that has been in earth's atmosphere has a thin layer of oxide that prevents the effect. Even those that we send to space, since they already been to earth.<br /><br />More info, as always, at https://secure.wikimedia.org/wikipedia/en/wiki/Cold_welding.Anonymoushttp://www.blogger.com/profile/14209167925167231726noreply@blogger.com0tag:blogger.com,1999:blog-5919095047551158501.post-57543659011785441752010-01-28T09:45:00.004+01:002010-01-28T10:12:44.165+01:00Happy new year! (+ OVH DynDNS)Starting this year I'll try to write this blog in English as far as it can be useful or relevant. Rants about Spain will be in Spanish ;)<br /><br />The first post of 2010 will be about dyndns with ovh. Ovh (www.ohv.es / www.ovh.fr) is a very cheap DNS registrar / hosting / whatever company with datacenters in Europe. Recently I got a DNS domain (for now just for fun, in the future maybe for profit...) and they offer a Dyndns service to update the IP, since my connection is not static. They explain how to change the IP automatically using different programs on different OS's. This, however, is not a easy task if you want to do it "your way".<br /><br />On debian there are two nice programs to do so, ez-update and ddclient. AFAIK, ez-ipupdate doesn't support NATed machines, so it was out of the question. But ddclient is also not so easy to get to work, because of the sub-prime ovh service. After a lot of trial and error, and thanks to the <a href="https://www.dyndns.com/developers/specs/syntax.html">dyndns.org API page</a> I got the update-url:<br /><blockquote><span style="font-size:85%;">https://DYNDNS-USER:OVH-PASSWORD@www.ovh.es/nic/update?system=dyndns&hostname=DOMAIN&myip=IP</span></blockquote><br />Now all the caveats:<br />- DYNDNS-USER is NOT your ovh user. It's the username created when you activate the DynDNS service at the ovh web interface. In my case is my.particular.domain.com-dyndns.<br />- PASSWORD is your regular ovh password.<br />- DOMAIN is the subdomain that you have activated as dyndns-capable at the ovh web.<br />- IP is... well, guess what...<br /><br />Here half the work is done, but stil we need to get ddclient working. The proper configuration file is:<br /><blockquote style="font-family: courier new;"><span style="font-size:85%;">protocol=dyndns2<br />use=web<br />server=members.dyndns.org<br />login=some-dyndns.org-user<br />password='dyndns.org-password'<br />something-something.dyndyns-dot-org-domain.com<br /><br />protocol=dyndns<br />use=web<br />server=www.ovh.es<br />login=MYDOMAIN-dyndns<br />password='MYPASSWORD'<br />HOSTNAME</span></blockquote>The first section is about some other dynamic dns account that we may or may not have. We should at the second section here.<br />The program complaints about "dyndns" not being a valid protocol string, but both "dyndns1" and "dyndns2" don't work properly with ovh. The rest, I think is already quite clear. In case of doubt just leave a comment :) I hope it will be useful!Anonymoushttp://www.blogger.com/profile/14209167925167231726noreply@blogger.com0tag:blogger.com,1999:blog-5919095047551158501.post-80775722502535868532009-11-17T18:24:00.003+01:002009-11-17T21:16:44.683+01:00Connect to the internet from Linux through a Windows Mobile phone*Post en inglés por si le es útil a alguien ;)<br />_______________________________<br /><br />Maybe with *buntu it's stupid easy, but as far as my experience goes, they probably tried to make it easy but it fails catastrophically in 50% of the cases. This is how to connect you linux box to the internet using the "Share connection" funcion of many phones, directly from the command line, so it should work in any linux distro, even in *buntu! Of course, some commands must be run as root, so be warned that if you type "rm -rf /" by mistake, I accept no responsability for your (incredibly dumb) actions.<br /><br /><span style="font-weight: bold;">Via USB</span>: plug the phone to the computer, select "USB" as the PC connection in the application, press conect on the phone screen and type "dhcpcd eth1" in the console. If the browser gets stuck in a "Waiting for [domain]" step, try "ifconfig eth1 mtu 1394" and the reload the website again.<br />Good to go? Then I'm glad.<br />Something failed? Try: modprobing rdnis_host, using dhclient instead of dhcpcd or trying a different interface. To find out which one is the correct one just do a "ifconfig -a" before and after pressing connect on the phone screen. Or try with different MTU values, of course for the USB network interface.<br />If it still doesn't work, something definitely sucks: you with linux, me as a teacher or life. I'm sorry either way.<br /><br /><span style="font-weight: bold;">Via Bluetooth</span>: ok, pay attention because this one is not as straightforward as the USB one. Of course you need BT working in your computer, so if you don't, go read some howto, install bluez utils and keep reading.<br />- First select "Bluetooth PAN" as the PC connection on the phone screen and press connect.<br />Now, if you haven't used bluetooth between you linux box and your phone before, you have to introduce them to each other. If you have, it'll be enough to do the pand and dhcp steps.<br />- Ok, let's start with the phone. In the application's menu, go to BT config and under "Mode" make sure your phone is "discoverable" by other devices.<br />- Now with the computer. First, activate the BT device, either by a physical switch or any other specific method your hardware manufacturer happened to use.<br />- After your BT light is on and shining, find your phone by typing "hcitool scan". Among all kind of crap, including "hello kitty" depending on your location, you should see your phone. And its MAC address. So remember it. Or copy it to paste it in the next step if you are not a geek.<br />- Next step: connect to the phone. Type "pand -c MAC_ADDRESS". If it's the first time, your phone will ask you if you really want him to talk to this stranger. Now pay attention: on your computer, open a new console and run "bluez-simple-agent" and on your phone answer yes. You will be prompted a code on both. Enter the same code in both. Press enter/ok on both. You can close the new console on the computer now and on the phone, the messages that will pop up.<br />- Ok, so the computer and the phone are connected now, or at least they should be. Confirm it by looking for "Connected" on the phone and doing a "hcitool con" on the PC. You should also have a new network device, bnep0 on the linux box.<br />- Last step, similar as with the USB process: "dhcpcd bnep0", or your dhcp client of choice for that matter. You shouln't need to modify the MTU here.<br /><br />If you have some problem you can leave a comment and we'll figure out what's sucking in that moment :)Anonymoushttp://www.blogger.com/profile/14209167925167231726noreply@blogger.com0tag:blogger.com,1999:blog-5919095047551158501.post-30518998523472662482009-10-09T11:37:00.003+02:002009-10-09T11:43:09.497+02:00¡Vaya día! ¡Y acaba de empezar!Hoy tiene pinta de que va a ser un día ajetreado. Entre que la NASA va a estampar un cohete contra la luna y a Obama le han dado el Nobel de la paz, todo el mundo está que echa humo.<br /><br />Y como opinar es gratis, ¡yo no voy a ser menos!<br /><span style="font-weight: bold;">Acerca del tema NASA:</span> van los tíos a buscar agua en la luna para ver si pueden establecer bases permanentes y algunos americanos se piensan que van a volar la luna. Y que Dios se enfadará por ello. Vivir para ver. Al menos, <a href="http://twitter.com/theNorb/status/4730412991">alguno se lo toma con humor</a>.<br /><span style="font-weight: bold;">Acerca del tema Obama:</span> <a href="https://twitter.com/bartpolot/status/4730462119">nada más que añadir....</a>Anonymoushttp://www.blogger.com/profile/14209167925167231726noreply@blogger.com0tag:blogger.com,1999:blog-5919095047551158501.post-78564118035926844292009-10-07T09:22:00.005+02:002009-10-07T09:41:57.735+02:00La ciencia en España no necesita tijerasSiguiendo la <a href="http://twitter.com/Irreductible/status/4529229371">iniciativa</a> de <a href="http://aldea-irreductible.blogspot.com/2008/06/la-iniciativa-la-ciencia-en-espana-no.html">La Aldea Irreductible</a> pongo mi granito de arena. Como estoy muy vago y ocupado al mismo tiempo, seré breve.<br /><br /><span style="font-weight: bold;">La ciencia en España no necesta tijeras... porque, para empezar, apenas hay de dónde recortar.</span><br /><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://farm3.static.flickr.com/2488/3973473121_e76fde787c_o.jpg"><img style="cursor: pointer; width: 567px; height: 567px;" src="http://farm3.static.flickr.com/2488/3973473121_e76fde787c_o.jpg" alt="" border="0" /></a><br /><br />PD: <a href="http://www.mimesacojea.com/2009/10/ciencia-espanola-2020-o-la-ciencia-en.html">algunos artículos</a> son geniales...Anonymoushttp://www.blogger.com/profile/14209167925167231726noreply@blogger.com0tag:blogger.com,1999:blog-5919095047551158501.post-58508600211823919912009-10-07T00:18:00.002+02:002009-10-07T00:22:17.007+02:00OktoberfestQuien quiera una descripción detallada que lea la wikipedia o las miles de "Guías de Viaje" que habrá acerca de Munich.<br /><br />Yo me limitaré a resumir mi impresión en una frase: <span style="font-weight: bold;">el Oktoberfest es igualito que las fiestas de un pueblo, solo que éste </span><span style="font-style: italic; font-weight: bold;">pueblo</span><span style="font-weight: bold;"> tiene millón y medio de habitantes.</span>Anonymoushttp://www.blogger.com/profile/14209167925167231726noreply@blogger.com0tag:blogger.com,1999:blog-5919095047551158501.post-11291787634669592262009-10-01T22:54:00.001+02:002009-10-02T00:27:56.822+02:00Encontrar un sitio donde vivir en MunichBueno, mucho tiempo sin escribir, muchas cosas por contar, pero poco tiempo para hacerlo. Entre Facebook, twitter y Google Reader voy compartiendo mis inquietudes y contando todo lo que me apetece, por lo que estoy dejando el blog un poco de lado. De todas formas, antes de darlo por muerto, aún contaré alguna que otra cosa que pueda ser útil a alguien en el futuro, aparte de note-to-self de cosas que me pueden venir bien a mí.<br /><br />Hoy hablaré un poco sobre el alojamiento en Munich, cosa que todo el mundo dice que es muy difícil y muy caro y esto sólo es cierto en parte.<br /><br />El precio de una habitación en un piso compartido no me ha sorprendido nada, pero será porque Madrid tampoco es una ciudad barata. Dependiendo de la zona, el tipo de piso y el tamaño de la habitación, el precio oscila entre 250€ y 500€, lo más normal son habitaciones entre 320€ y 390€ y suelen ser grandecitas, de unos 14 m^2. La dificultad de encontrar algo si que puede ser más grande, por la enorme cantidad de demanda que hay, a un anuncio pueden llegar a contestar 70 personas. Los apartamentos y estudios son más caros pero suele ser mucho más fácil encontrar uno, puesto que no hace falta "conectar" con gente, ya que no vive nadie ahí. Vas a verlo y si te gusta te lo quedas.<br /><br />Por supuesto, la búsqueda hay que hacerla desde ahí, así que hay que ir con antelación. Nadie quiere un compañero de piso al que sólo ha conocido por internet, así que es casi imposible encontrar algo desde España. Yo recomiendo alojarse temporalmente en los hostales/albergues que hay cerca del Hauptbahnhof (estación central de tren). Son baratos, limpios, con gente muy amable y bien situados. He estado en el 4you y en el wombats y no tengo nada que reprochar a ninguno. El 4you incluye desayuno, así que sale un pelín más rentable ;)<br />IMPORTANTE: si se va en septiembre, ir la primera quincena. La segunda quincena está ocupada por el Oktoberfest (irónico, la "fiesta de octubre" es en septiembre) y es im-po-si-ble encontrar sitio en ningún albergue ni hotel a 100km a la redonda de Munich.<br /><br />El mejor sitio donde buscar es la página <a href="http://www.wg-gesucht.de">http://www.wg-gesucht.de</a> donde hay más de 30 anuncios nuevos cada día. Un par de consejos sobre su uso:<br />- Lo primero, aprender algo de alemán. Con lo básico basta, para entender los anuncios tampoco hace falta ser un experto. Si hay dificultades, <a href="http://translate.google.es/?hl=es&sl=de&tl=en#">san google traductor</a> al rescate.<br />- Filtrar por precio máximo y fechas de entrada. Los resultados vienen ordenados por fecha de publicación, lo más seguro es que los anuncios de más de un día ya no sean válidos por la alta demanda.<br />- No vale la pena filtrar por dónde están las habitaciones. La red de metro y cercanías (UBahn y SBahn) es tan buena que desde cualquier lado al centro hay menos de 20 minutos. Además, también hay buses y tranvías.<br />- Si el anuncio incluye número de teléfono, toca llamar, no hay verguenza que valga. Por supuesto, a no ser que uno sea rico (entonces mejor buscar un apartamento o un piso para uno solo) lo suyo es comprar una tarjeta SIM alemana. En la Neuhauserstrasse/Kaufingerstrasse (entre Stachus y Marienplatz) hay un montón de tiendas de móviles e incluso un Saturn (como el MediaMarkt). Si alguien pone su número de teléfono, recibirá tantas llamadas que lo más seguro es que los mails los ignore. Si en el texto del anuncio pone que llameis o mandeis un mail, da igual: mejor llamar. Es mucho más fácil conseguir una cita por teléfono que por mail. Respecto al idioma, pues lo ideal es hablar alemán, pero si no es tu fuerte tampoco es una tragedia. Casi todo el mundo habla inglés asi que con un "Good morning, I'm calling for the room you announced on the internet" se darán por aludidos que el alemán no es lo tuyo y te contestarán en inglés (o te mandarán a la mierda, que tampoco pasa nada: siguiente anuncio).<br />- Si se escribe un mail, también es mejor escribirlo en alemán. De nuevo, no pasa nada por escribirlo en inglés, pero en este caso, poner alguna que otra frase en alemán, que se note que hay interés en aprender e integrarse. Aunque no lo exijan, siempre, siempre, siempre hay que poner un parrafito sobre uno mismo: descripción, intereses, que es lo que se busca, etc.<br />- Hacerse con el vocabulario. WG (WohnGemeinschaft, piso compartido), Kalt/Warm Miete (mensualidad sin/con gastos incluidos), Zwischenmiete (disponible por tiempo limitado, por ejemplo alguien que se va de Erasmus y alquila su cuarto sólo durante 6 meses)... Muy importante es la expresión "Zweck-WG": significa que es un piso compratido sólo para dormir, donde no se busca la convivencia entre los compañeros. Normalmente la gente NO busca "Zweck-WG".<br />- Suscribirse a las alertas por email. No funcionan del todo bien, pero vienen bien para enterarse el primero de anuncios nuevos, lo cual es una ventaja para llamar / mandar mail. Lo ideal es también visitar la web por si hay algún anuncio que no llega.<br />- Si alguien va a estudiar a la TUM física, mates o informática (alguna más creo que también, no se cual), el campus está en Garching, un pueblo a 10km al norte de Munich. Se llega en metro en la línea 6 (azul). En este caso vale la pena buscar pisos no sólo en Munich, sino también en el pueblo (en la web "Garching bei München").<br /><br />Una vez se ha conseguido una cita, pues a ver la habitación. Las habitaciones y los pisos en general están genial, así que lo realmente importante es ir a conocer a la gente y que ellos te conozcan. Ahí evidentemente las primeras veces uno se pone nervioso, pero tras un par de "entrevistas" le coges el tranquillo. Por supuesto, creo que no haría falta decirlo pero por si acaso, hay que ser uno mismo ;)<br /><br />Por último, tomárselo con calma, ¡no desesperarse ni deprimirse! Es normal que se tarde bastante, hay muuuchos candidatos a cada habitación. Aprovechar para pasarlo bien, conocer a gente en los albergues (algunos también buscando piso) e ir viendo la ciudad. Si, como yo, no se encuentra nada a la primera, pues a retirarse estratégicamente durante el Oktoberfest y volver con más ganas a principios de octubre :D<br /><br />Yo por suerte, he aprovechado las amistades hechas en la primera ronda y voy a llegar a ver el Oktoberfest este año, alojándome dos días en el piso de un chaval que conocí en el albergue y tuvo la suerte de encontrar habitación en Garching. Luego para no abusar, otra vez al albergue a seguir buscando.<br /><br />¡Seguiré informando!Anonymoushttp://www.blogger.com/profile/14209167925167231726noreply@blogger.com9tag:blogger.com,1999:blog-5919095047551158501.post-64552632003651501402009-08-13T01:59:00.006+02:002009-08-13T03:01:21.676+02:00Microsoft WGA y la seguridad.Microsoft se preocupa porque sus usuarios estén seguros y no usen software pirata. Y sobre todo se preocupan por su bolsillo, pa que nos vamos a engañar. Y ojo, esto no me parece mal, son una empresa y no una ONG y su objetivo es ganar dinero.<br /><br />Lo que pasa es que como para ganar dinero hagan cosas como el WGA lo llevan claro. Para bajarse el DirectX SDK por ejemplo, hace falta pasar el test del WGA. Lo primero, (por el bien de los usuarios, será) el modo de validación es un control ActiveX... en una página http. Así de primeras, ya puede venir alguien y hacernos todo el lío sólo por intentar validar el software. Como los ActiveX <a href="http://www.google.es/search?q=activex+vulnerability">no me gustan</a> ni un pelo, y con origen desconocido pues casi que menos (entre otros motivos...), decidí buscarme la vida. Y por buscarme la vida me refiero a una consulta a google:<br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhmcZNemHhTcS8gsFf8E26oEtmAHLn7TEIbJ3S5h6FHO4vs4DxPpGPiqbzmCNm1EUE-uXZ8Q40vJDIfZDzZyYgCnPS7_88iDiymCf3s1C1-NpYb-MSght55s-PqYQ1tWyujQLhBl6VGYA0/s1600-h/DX9.PNG"><img style="cursor: pointer; width: 400px; height: 154px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhmcZNemHhTcS8gsFf8E26oEtmAHLn7TEIbJ3S5h6FHO4vs4DxPpGPiqbzmCNm1EUE-uXZ8Q40vJDIfZDzZyYgCnPS7_88iDiymCf3s1C1-NpYb-MSght55s-PqYQ1tWyujQLhBl6VGYA0/s400/DX9.PNG" alt="" id="BLOGGER_PHOTO_ID_5369234359631028130" border="0" /></a><br /><br />Lo lógico sería que la URL que aparece, tan aleatoria ella, fuera un link de un sólo uso para algún cliente que en su día pasó el test del algodón. Pues casi. Yo <a href="http://download.microsoft.com/download/3/A/5/3A53CE87-F5C9-4CE5-92E1-5E2AF4841741/DXSDK_Mar09.exe">lo dejo</a> para que veais que pasa. Será que buscar en google es sinónimo de pasar el WGA, porque mientras escribo esto se están bajando los 500+ MB de DX9...Anonymoushttp://www.blogger.com/profile/14209167925167231726noreply@blogger.com0tag:blogger.com,1999:blog-5919095047551158501.post-37356994924033251412009-08-08T11:40:00.003+02:002009-08-08T11:45:20.775+02:00Seguridad en PHPMuy buenas a todos! ¿Que tal va el verano? Después de un mes de Julio sin posts, empiezo con algo ligerito, ya despotricaré más tarde.<br />Via el sobresaturado <a href="https://twitter.com/developerworks">developerworks</a> de IBM, he encontrado <a href="http://www.ibm.com/developerworks/opensource/library/os-php-secure-apps/index.html?ca=dgr-twtr7Habits-Secure-PHPdth-OS&S_TACT=105AGY83&S_CMP=TWDW">un buen artículo</a> que nos recuerda las bases de seguridad a la hora de programar en PHP, que muchas veces nos ponemos a tirar código y pueden pasar cosas malas.Anonymoushttp://www.blogger.com/profile/14209167925167231726noreply@blogger.com0