Saturday, July 10, 2010

Ověření S/MIME e-mailu pomocí openSSL

S/MIME je standart pro zabezpečení elektronické pošty. Pokud dostanete podepsaný e-mail je potřeba ho ověřit. Ověření je jednoduché. Stačí mít nainstalováno openSSL. Potom stačí jen uložit e-mail do souboru, např. mail.txt a v příkazové řádce spustit následující příkazy (jde o bash syntaxi, uživatelé woken musí použít cygwin pro přesnou reprodukci). Následující příkaz extrahuje certifikát:

openssl smime -pk7out -in mail.txt | openssl pkcs7 -print_certs > extract.crt

Nyní je potřeba extrahovaný certifikat ověřit:

openssl smime -CAfile extract.crt -verify -in mail.txt

Pokud je verifikace úspěšná vypíše se na konci výstupu Verification successful. V opačném případě je verifikace neúspěšná a s e-mailem je něco špatně (někdo manipuloval s obsahem, špatně podepsaný mail, ...).

Friday, June 11, 2010

HTC Evo 4G - recenze

Před pár týdny prezentoval Google na své konferenci Google I/O nový supertelefon HTC Evo 4G s operačním systémem Android. HTC Evo je naprosto výjimečný telefon, jako jeden z velice mála zvládá 4G připojení, má HDMI výstup, dvě kamery, velmi užitečný stojánek a mnoho dalších vychytávek. Pokud se o tomto telefonu chcete dozvědět více, čtěte recenzi na serveru www.svetandroida.cz.

Wednesday, June 2, 2010

Menší tip pro linuxáky

Každý správný linuxový geek už asi zažil, že ve Vimu zeditoval soubor, ale potom zjistil, že zrovna nemá práva pro uložení změn. No prostě opruz. Vždycky jsem si říkal, že to nějak jde, ale byl jsem tak trochu líný hledat ten správný příkaz. Až teď jsem na něj náhodou narazil na:
Příkaz je to opravdu jednoduchý:
:w !sudo tee %

Saturday, January 30, 2010

Web Browser JavaScript Test

The quality of web browsers is frequently discussed. Some favour Mozilla Firefox, some Opera, some Google Chrome, and many curse Internet Explorer. I'm not using Windows therefore IE is no concern of mine.

I met this web page today and I've decided to run all the diagnostic tests that are referenced there. These test include:
  • V8 Benchmark Suite - version 5
  • Acid3 Web Standarts Test
  • Sunspider JavaScript Benchmark
  • Dromaeo Performance Tests
I ran all these tests on my 64-bit Karmic Koala. I tested Mozilla Firefox version 3.5.7, Google Chrome version 4.0.249.43 and Opera 10.10.

Guess who the winner is. Not surprisingly, it's the youngest contestant - Google Chrome. Its V8 JavaScript engine is legen...wait for it...dary. Overall benchmark results are in the table. You can clearly see that Google Chrome dominates in all the JavaScript tests. There is a huge gap between Chrome and the second Firefox. The poorest did Opera. Acid3 test showed some problems in Firefox, all other browsers were flawless.


ChromeFirefoxOpera
V82763211168
Acid3100/10093/100100/100
Sunspider596.2 ms2909.4 ms4953.4 ms
Dromaeo209.83 runs/s44.79 runs/s28.43 runs/s

Sunday, December 6, 2009

TOEFL registration

Recently, I decided to take the TOEFL exam. TOEFL is really useful if you want to get a position in a foreign company or if you want to study abroad. So I googled where I have to register: www.ets.org.

To sign up for the test you have to register at the web page at first place. So I tried to do it. I intentionally use a verb 'try' here because I failed. Why? The reason is a little strange architecture of the site. It doesn't allow anyone to have multiple user accounts. If you had registered some time ago you have to remember your login information! Write it down! They are not mailing any login information! Although the architecture of the web page seem really strange and inapt, there's a reason why ETS needs a web page with limited registration. The delay between two subsequent TOEFL exams is limited.

If you had registred and you don't remember you login information, the site provides some assistance to retrieve login information. Unfortunately, I found all these assistance procedures completely useless. I wasn't even able to figure out my user name. And, due to some lower/uppercase issues, I also failed to provide correct answer for the control question. After few wrong tries the site was blocking all other tries.

In case you have troubles, you can call a help desk. But it's an american phone number. I'm not really eager to call to the US! So my last chance was an e-mail. Fortunatelly, several emails and days later, ETS representatives sent me a new password and my forgotten user name. Really, write it down!

Friday, October 16, 2009

Python Challenge

Recently, I was writing about a convenient way of learning some Vim basics. Today I'm writing about a convenient way of learning Python. Python is an interpreted programming language, very useful for various computations, it's an extremely strong "calculator".

Learning a new programming language always brings some inconvenience. If you are an experienced programmer, you can usually figure out an algorithm solving the problem quickly. Then the problem is to realise how to write it down in the new language, and learning the syntax remains the biggest problem for you. I came across an interesting way of learning Python - Python Challenge. You can find it on the address http://www.pythonchallenge.com. The learning is done by a series of task you have to fulfil. A task is often in the form of a riddle and you have to write a simple program to solve it.

So, if you are interested in learning Python and/or enjoy solving riddles, try it!

Friday, September 25, 2009

The Power of Vim

Every *nix programmer definetely knows Vim editor. Vim is an extremely strong editor. Although there are many GUI-based editors, I think Vim is superior. Once a programmer masters the efficient commands and command combinations, he be much faster in his work.

Although I know and use Vim several years, I don't know every command it provides. There are too many of them! Recently, I ran into a blog post mentioning a tutorial for Vim called 'vimtutor' which I hadn't know before. If you have Vim installed, try it!. Type 'vimtutor' and let it guide you through the tutorial. It shows only the basic commands, still, I think it's a great start to Vim.